rshkarin / mason-nvim-lint

Extension to mason.nvim that makes it easier to use nvim-lint with mason.nvim
Apache License 2.0
36 stars 10 forks source link

Linters not in mapping cannot be resolved #14

Open laurentgoudet opened 1 month ago

laurentgoudet commented 1 month ago

I am using psalm as a linter (as the language server is cooked for my project) but it seems that mason-nvim-lint cannot auto-install it, i.e. getting Linter [psalm] cannot be resolved into a Mason package. Make sure to only provide valid linter names.

Adding the linter to mapping.lua solves the issue, but as the linters list at https://github.com/mfussenegger/nvim-lint?tab=readme-ov-file#available-linters is far longer than the one in https://github.com/rshkarin/mason-nvim-lint/blob/main/lua/mason-nvim-lint/mapping.lua, I wonder how that plugin is meant to work: do all the packages need to be mapped (even if the tool name & nvim-lint names are the same)? If that's the case, should there be a default mapping (when the names are consistent)?

laurentgoudet commented 1 month ago

Created a PR to add psalm but let me know if that not the best solution/if a fallback should be more suitable.