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

feat: cli option to prevent 'start build' message #847

Closed
wants to merge 1 commit into from
Closed

feat: cli option to prevent 'start build' message #847

wants to merge 1 commit into from

Conversation

dkirchhof
Copy link

@dkirchhof dkirchhof commented Nov 13, 2023

Hey,

when I updated the language server manually for my Neovim config, I always set the askToStartBuild option in the code to false.
Since I don't have to extract the server code from the vscode extension anymore (many thanks for the npm package) I wouldn't like to change the code manually, so an option for the cli would be usefull.

Without overcomplicating the code, I just added a second optional param to the cli.

@aspeddro
Copy link
Contributor

How is your setup configuration?

@dkirchhof
Copy link
Author

With these changes:

require'lspconfig'.rescriptls.setup {
    cmd = { 'rescript-language-server', '--stdio', '--dont-ask' },
}

@aspeddro
Copy link
Contributor

aspeddro commented Nov 13, 2023

I need to document this, but you can pass the configuration at startup

require'lspconfig'.rescriptls.setup {
  cmd = { 'rescript-language-server', '--stdio' },
  init_options = {
    extensionConfiguration = {
      askToStartBuild = false
    },
  }
}

@dkirchhof
Copy link
Author

Oh great. Didn't know that. So I will close my PR. Would be nice, if it will be documented somewhere in the lspconfig docs?!

@dkirchhof dkirchhof closed this Nov 13, 2023
@aspeddro
Copy link
Contributor

yes

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

Successfully merging this pull request may close these issues.

2 participants