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

support relative paths in the command and generate a config file in .idea that can be committed #336

Closed
DetachHead opened this issue Jun 10, 2024 · 7 comments · Fixed by #340

Comments

@DetachHead
Copy link

for my use case, the language server will always be located at .venv/scripts/basedpyright-langserver.exe (on windows at least). ideally i would be able to just enter basedpyright-langserver as the command and it would pick it up from the current sdk:

338075764-cf9e9649-e2ef-4767-8c0b-e4db84d9a672

specifying the full path works, but that's not ideal because i would like the language server to be saved in a config file that i can commit, so that others in my team can have the LSP configured automatically without them having to set it up themselves

@angelozerr
Copy link
Contributor

I wonder if we fill the workspace directory with project root path, it will fix your issue.

Ifbit is working we should perhaps provide a New field working directory filled by défaut with the project root path.

@fbricon what do you think about that?

@KotlinIsland
Copy link

Inteliij has macro fields so this complexity is abstracted away

@angelozerr
Copy link
Contributor

Inteliij has macro fields so this complexity is abstracted away

Could you explain more your suggestion please.

@KotlinIsland
Copy link

image
(file watchers plugin)

So macro fields can contain pre-defined values that expand, this is great for shared config.

See: https://github.com/JetBrains/intellij-community/blob/master/platform/execution-impl/src/com/intellij/ide/macro/MacrosDialog.java

@angelozerr
Copy link
Contributor

Thanks so much @KotlinIsland for your great idea. I didn't know this macro syntax and it is indeed a great idea.

I have created a PR for that at https://github.com/redhat-developer/lsp4ij/pull/340/files (with some documentation), hope you (and @DetachHead ) will like it

@angelozerr
Copy link
Contributor

specifying the full path works, but that's not ideal because i would like the language server to be saved in a config file that i can commit, so that others in my team can have the LSP configured automatically without them having to set it up themselves

You can now uses macro, see doc at at https://github.com/redhat-developer/lsp4ij/blob/main/docs/UserDefinedLanguageServer.md#macro-syntax

@DetachHead
Copy link
Author

awesome that works, thanks! only other thing is being able to commit the language server config. i will raise a separate issue for that

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

Successfully merging a pull request may close this issue.

3 participants