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

Single file linting #41

Open
dylanpjx opened this issue Jun 14, 2023 · 3 comments
Open

Single file linting #41

dylanpjx opened this issue Jun 14, 2023 · 3 comments

Comments

@dylanpjx
Copy link

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
Copy link
Collaborator

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
Copy link
Author

dylanpjx commented Jun 23, 2023

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
Copy link
Collaborator

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

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

No branches or pull requests

2 participants