Skip to content

Forward user preferences in initialization options #218

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

Conversation

dnjstrom
Copy link
Contributor

@dnjstrom dnjstrom commented Jun 8, 2021

This PR adds an optional preferences property to the initialization options that is forwarded through to the tsserver, allowing user preferences like importModuleSpecifierPreference to be set.


Tested to work locally with neovim and lsp-config given this config:

nvim_lsp.tsserver.setup {
    init_options = {
      preferences = {
        importModuleSpecifierPreference = "relative"
      }
    }
}

@rmagatti
Copy link

rmagatti commented Jun 9, 2021

Nice, this is much better than what I had!

@rmagatti
Copy link

Anything we still need to get this in? Might want to bump the package version and changelog as well perhaps?

@DonnieWest DonnieWest merged commit 3b1eedf into typescript-language-server:master Jun 16, 2021
@DonnieWest
Copy link
Collaborator

@dnjstrom thanks! This is awesome :)

@DonnieWest
Copy link
Collaborator

@rmagatti I suppose I need to come up with a better release philosophy 😅

For now, I'll give some time for these other PRs to wrap up and we'll discuss cutting a new release

@dnjstrom dnjstrom deleted the feature/accept-preferences-at-initialization branch June 16, 2021 07:10
@toto1384
Copy link

Is there a watch all files option in here? I've been looking for a way to enable this for a while

@rchl
Copy link
Member

rchl commented Aug 24, 2022

Which option specifically are you talking about? Is it something that vscode has?

@toto1384
Copy link

Yes, it's this one: "typescript.tsserver.experimental.enableProjectDiagnostics": true,

@rchl
Copy link
Member

rchl commented Aug 24, 2022

That's not supported. There is related pr #361 but it's not really correctly done and would need to be implemented properly.

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.

5 participants