imc-trading / svlangserver

MIT License
100 stars 13 forks source link

Single file linting #41

Open dylanpjx opened 1 year ago

dylanpjx commented 1 year ago

Hi, I’m using the LSP with nvim. Under server_configurations on nvim_lspconfig, it states that there is single file support enabled by default.

However, I don’t get linting on files unless in a git repository. Is it possible to enable linting globally and how would I go about achieving this?

kkanhere commented 1 year ago

The language server's functionality is tied to a workspace not a repo. So I would recommend checking if your LSP engine is correctly detecting a workspace and informing the language server so. Would suggest checking the deubg info from your LSP for the language server. The language server should log this info including the files it is indexing etc.

dylanpjx commented 1 year ago

The workspace is determined by LSP's root_dir option right? Is it possible to lint individual files outside of workspaces?

To clarify: tsserver has single_file_support as well. If the option is enabled, and the user is not in a workspace, the current folder that the file resides in will be used as a fallback workspace. That's what I'm trying to achieve.

kkanhere commented 1 year ago

Unfortunately no such support exists for this language server right now. I have added it to the TBD list. But pull requests always appreciated. Thanks