sublimelsp / LSP-clangd

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

Support running in docker container #13

Closed LinuxDevon closed 1 year ago

LinuxDevon commented 1 year ago

So I am wanting to run clangd from a docker container that uses my cross compiler. The paths are all based on the image so it makes it difficult to run from the local machine and doesn't find all the system files. Is it possible to do this already? I remember before when it wasn't a dedicated supported plugin I could overwrite the command but that doesn't seem to be working now.

Two options I see being helpful one that lets me do custom binary option and just set it to whatever. The other is docker binary option but not sure how that looks.

Any suggestions are greatly appreciated. Thank you for your help!

LDAP commented 1 year ago

Its already supported, see #11

LinuxDevon commented 1 year ago

Sorry for the overlap ask... For some reason when I searched the Issues it didn't show me this one :question:. Either way thank you! So this isn't released yet right? I would need to point this plugin to the github. That explains why I didn't see the option in the settings. Are there plans to add how to use docker / override to the README before release?

rchl commented 1 year ago

Indeed it seems to not be released yet. @LDAP is your intention to handle something more before releasing or what is the hold up?

rchl commented 1 year ago

That said, I wonder if it will really work correctly, even when overriding binary. Maybe I don't fully understand the use case but I feel like there would need to be support for mapping paths between docker<=>local in LSP that we don't have right now...

LDAP commented 1 year ago

Indeed it seems to not be released yet. @LDAP is your intention to handle something more before releasing or what is the hold up?

We can release the new version. The intention was to test a bit more, since I didn't use the plugin much since the PR.

LDAP commented 1 year ago

I released a new version just now.

LinuxDevon commented 1 year ago

Wanted to leave a comment that I did use it before the release and seemed to be functioning. I am going to test a bit more after your release. That was the part that tripped me up same as @rchl. I am going to close this issue since it was merged. We can open it up if there are problems found.