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

fixed language server only running for filetypes with tree-sitter Language #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

parkerbedlan
Copy link

I found that even when I setup lspconfig with something like this:

lspconfig.harper_ls.setup {
    filetypes = { "markdown", "text", "lua" },
}

that the harper linter would only run for lua files, not markdown or text files. I realized that this is because if new_from_language_id returns None, the linter simply wouldn't run. So I instead had the wildcard pattern return an arbitrary tree-sitter Language, and it fixed the problem.

@elijah-potter
Copy link
Owner

Thanks for bringing your issue to my attention, unfortunately, I cannot merge this request in its current state.

The lack of support for the text filetype is not a bug--there simply isn't any support for it.
Its somewhat difficult to pin down how to treat those files since they are often not actually English.
Your solution to this seems to be to treat text files as .toml files, which isn't a robust enough solution for the main repository.

I replaced my harper-ls config with your snippet and was unable to replicate your issue. Would it be possible for me to get a copy of your whole Neovim config? I'd love to find the root problem.

@elijah-potter elijah-potter force-pushed the master branch 2 times, most recently from 93d4d8d to c1ac34d Compare May 14, 2024 01:54
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.

None yet

2 participants