Skip to content

Passing extra command line arguments to haskell-language-server #462

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

Closed
cdsmith opened this issue Sep 21, 2021 · 2 comments · Fixed by #464
Closed

Passing extra command line arguments to haskell-language-server #462

cdsmith opened this issue Sep 21, 2021 · 2 comments · Fixed by #464
Labels
help wanted type: enhancement An enhancement to an already existing feature

Comments

@cdsmith
Copy link
Contributor

cdsmith commented Sep 21, 2021

I find myself in a situation where I'd like to limit the memory usage of haskell-language-server, because it grows over time and ultimately makes the machine unusable if I leave it running too long. Basically, I want to pass +RTS -M10G to haskell-language-server. Unfortunately, it appears I can't add command line arguments in the option for the server executable, and I don't see another way to accomplish it.

I would like an option that allows adding arbitrary command line arguments to haskell-language-server. I don't think limiting memory usage is, itself, important enough to be worth an option, so generic command line args would be better.

@jneira jneira added the type: enhancement An enhancement to an already existing feature label Sep 21, 2021
@jneira
Copy link
Member

jneira commented Sep 21, 2021

Thanks for the suggestion, it makes total sense and other vscode extensions allow something similar, prs welcome! 😄
Related #214 as other way to alter the behaviour of the lsp server

@cdsmith
Copy link
Contributor Author

cdsmith commented Sep 21, 2021

I'm preparing a pull request for this. serverExecutablePath has a resource scope, but it looks like that's in flux. Should I add the new argument with the same scope, or give it a machine scope? I don't understand the reason for the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type: enhancement An enhancement to an already existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants