errata-ai / vale-ls

:zap: An implementation of the Language Server Protocol (LSP) for the Vale command-line tool.
MIT License
67 stars 4 forks source link

Passing initializationParams #16

Closed ChrisChinchilla closed 4 months ago

ChrisChinchilla commented 4 months ago

I am not sure if this is a vale-ls question or a VSCode question, but I've been looking back and forth in code here, the Sublime extension, and other LSP extensions, and I am completely stuck on how to pass the initializationParams to the server. How does vale-ls expect them? Can they be something like --configPath=xxx or something else?

I am really struggling to find any examples, at least in the VSCode extension space, that suit the way the parameters are presented in https://vale.sh/docs/integrations/guide/#vale-ls, so if anyone has any ideas, that would be great!

jdkato commented 4 months ago

It should be something like this:

let clientOptions: LanguageClientOptions = {
    // ...
    initializationOptions: myOptions,
};

where myOptions is a Record<string, any>.

ChrisChinchilla commented 4 months ago

Yup, this is working, thanks!