sublimelsp / LSP-clangd

C/C++ support for Sublime's LSP plugin provided through clangd.
MIT License
42 stars 1 forks source link

Using MSYS2's clangd #10

Closed takase1121 closed 1 year ago

takase1121 commented 1 year ago

I installed clangd in MSYS2 but I can't use it with this plugin. It'll be great if the plugin also supports usage via MSYS2.

My command:

"command": ["C:/msys64/msys2_shell.cmd", "-defterm", "-here", "-no-start", "-mingw64", "-c", "clangd"],
LDAP commented 1 year ago

The command is overwritten internally. You could try to place a script named clangd on path and call clangd there.

takase1121 commented 1 year ago

That would work, but I do hope the plugin has some way to do this automatically.

rchl commented 1 year ago

Intention of packages like that is to manage the server themselves. Otherwise you might not be utilizing the full advantage of it and you could potentially just not use it at all and create custom LSP server configuration instead.

(That said, this comes up quite often that people want to mix local server and helper package so not sure ...)

LDAP commented 1 year ago

I may add that option in the future.

zhiayang commented 1 year ago

this is an important feature from the old LSP-clangd that somehow got nuked after it got split out.

for various reasons, I have my own install of llvm+clang (built with PGO) that is not in the PATH, and I want to use that for this plugin.

kutu commented 1 year ago

I would like to be able to set binary option to custom path to clangd.exe This way I can choose clangd per project, in .sublime-project file

berteauxjb commented 1 year ago

Adding on to what has already been said.

The clangd binary on my system is called clangd-12 and is not found by this package. I was previously able to override the command setting in .sublime-project, but I am no longer able to do so now that the clangd server configuration was split from the LSP package.

rchl commented 1 year ago

As a temporary workaround you can still create custom clangd configuration instead of using this package.

Mentioned in release notes: https://github.com/sublimelsp/LSP/releases/tag/4070-1.23.0