Skip to content
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

Issues with vim-lsc, ccls and non-english characters #341

Open
ghost opened this issue Sep 14, 2020 · 2 comments
Open

Issues with vim-lsc, ccls and non-english characters #341

ghost opened this issue Sep 14, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 14, 2020

I'm using vim-lsc to get together with ccls. Unfortunately I'm having issues with folders that have non-english characters in them. When opening a file *.c file inside a folder with none-english characters I'm getting

[lsc:Error] Could not decode message: [{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/antonio/Documents/School/MDH/Courses/DVA117/tema_2/<f6>vningar/test/main.c","diagnostics":[]}}]

However, it seems as if lsc or ccls has now created a new folder titled "''$'\366''vningar'" instead of the swedish word "övningar". I don't know if this is an issues with ccls, lsc, linux or vim. Anyway, does someone have any idea on how to solve it? I think it's a problem with lsc or ccls, since I don't have any issues with swedish folder names when not using lsc.

@ghost
Copy link
Author

ghost commented Sep 14, 2020

I've now noticed that running "ccls --index ./" in the directory containing swedish characters does seem to work fine. Therefore, I think the issue is with vim-lsc and not ccls. I can, however, be wrong.

@ghost
Copy link
Author

ghost commented Sep 14, 2020

I don't really know programming (yet), but I went into the autload/lsc/uri.vim file inside the plugin directory and just removed \([^a-zA-Z0-9-_.~/]\) and \=s:EncodeChar(submatch(1)) that's inside ' ' on return substitute() under function! s:EncodePath(value)

Now it seems to work. Ofc, that isn't how you should do it. But since I don't know programming, I don't really know why it worked. Maybe someone that do know programming can come up with a better solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants