-
Notifications
You must be signed in to change notification settings - Fork 79
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(client): we dont want to attach a source if its command is not executable. #124
🐛fix(client): we dont want to attach a source if its command is not executable. #124
Conversation
for more information, see https://pre-commit.ci
closes #90 |
Correct me if I'm wrong: seems none-ls.nvim/lua/null-ls/sources.lua Lines 101 to 107 in f5632db
generator._failed )?
|
Ok I just discovered the next: none-ls architecture
mason-null-ls
This provokes mason-null-ls is not able to find external sources. Possible solution AFixing the issue in mason-null-ls. Pros: Fixes the issue. Everything keep working the same. Possible solution BFixing the issue in none-ls (as in this PR). Pros: It fixes the issue. |
…of cliens.lua `should_attach`.
for more information, see https://pre-commit.ci
For now I'm gonna try to implement the solution in |
…command-is-not-available'
I've implemented a plugin to load internal and external sources intelligently when using mason: https://github.com/Zeioth/none-ls-autoload.nvim But I would still consider merging this PR, so we don't register things we know for a fact are not going to work when trying to run them. |
Because the tests are not passing, and we already have the plugin to solve this. Let's close the PR. |
(for sources which command is different than nil).
Problem
A explicitly registered external source will be attached even if the source command is not actually executable. This create several unwanted scenarios:
This is inconsistent with the behavior of builtins, which will only attach if the executable is available. This inconsistent behavior is likely to be a regression.
Example
The next formatter appear attached even though we uninstalled it and rebooted neovim (bottom right of the image).
Trying to run the formatter will of cause an error.
Solution