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

fix: remove invalid filetypes containing wildcards from typos_lsp and hyprls #3273

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

WieeRd
Copy link
Contributor

@WieeRd WieeRd commented Aug 20, 2024

I happened to have created a mapping of filetypes and every server in lspconfig. While inspecting them, I noticed some anomalies and found out that they were invalid/unnecessary misconfigurations that were added by accident.

This PR removes those anomalies.

typos_lsp

filetypes = { '*' },

* filetype pattern is unnecessary. If the filetypes field is omitted completely, lspconfig starts the server on BufReadPost instead of FileType.

hyprls

filetypes = { 'hyprlang', '*.hl', 'hypr*.conf', '.config/hypr/*.conf' },

The author of hyprls and the original PR to lspconfig confirmed that the filetypes with wildcards were added by mistake.

hyprland-community/hyprls#11 (comment)

Hi! I actually did a PR for lspconfig to include hyprls (see neovim/nvim-lspconfig#3137) but it's misconfigured: I mistook filetypes for file name patterns...

However someone fixed my mistake lmao, thx @mehalter

So the lspconfig should work if the hyprlang filetype is defined

Technically, they can stay in the code, useless but doing no harm.
But I wrote this PR because why not and also it actually hinder the plugin I'm writing.

@WieeRd
Copy link
Contributor Author

WieeRd commented Aug 20, 2024

I've tested and made sure both typos_lsp and hyprls properly autostarts and attaches after the changes.

@glepnir glepnir merged commit b2c7317 into neovim:master Aug 21, 2024
8 checks passed
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.

2 participants