-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
highlighting gets column wrong in tab-indented code (clangd / ccls) #200
Comments
I can't reproduce this with a simple dummy file and a fresh Eglot installation without the setting Here's the file I tried
There are some tabs in the deepest levels of foo. When I but my cursor on Can you give me a simple test file and a recipe for reproducing this starting with Note: setting |
Well this is embarrassing, I can't reproduce it with I'll try to find out which part of my configuration causes this and will let you know! Sorry to waste your time... |
Are you setting |
yes, I set it to 8 |
Aha! It appears whitespace-mode is the culprit, I could reproduce the problem by running |
Hello,
I happily use eglot (1.4 from MELPA) with ccls-7.0.1 and noticed that the highlighted region for symbols is not correct in tab-indented files (all ASCII), it is shifted to the left by the number of tabs preceding the region. The same happens when using clangd -7.0.1. I have not tested other language servers.
Reading a bit through the eglot sources, I found that setting the
eglot-move-to-column-function
to'eglot-move-to-lsp-abiding-column
solves the problem for me, by correctly converting lsp column values to emacs column values.Is this a problem of eglot or should ccls/clangd behave differently?
Should this configuration be documented, or event made default for ccls/clangd servers?
Thanks!
The text was updated successfully, but these errors were encountered: