Closed Zeioth closed 5 months ago
bashls and null-ls appear both loaded.
And I can autoformat correctly.
Ok I've tested in a old version of none-ls and it seems this is a requirement for the code actions feature to be available:
require("null-ls").builtins.code_actions.shellcheck
Because the built-in has been removed it seems there is no way to do this anymore.
If you are not against bash-language-server, you could make a PR to there. I mentioned the exact line of code somewhere in #81.
You could use gbprod/none-ls-shellcheck.nvim in the meantime.
I guess I would leave this open to track the progress on bash-language-server
Issue solved by adding this to none-ls config:
require("null-ls").register(require("none-ls-shellcheck.code_actions"))
but it requires the none-ls dependency "gbprod/none-ls-shellcheck.nvim".
It was documented. Sorry.
Maybe "gbprod/none-ls-shellcheck.nvim"
should be shipped by default with none-ls and do require("null-ls").register(require("none-ls-shellcheck.code_actions"))
if shellcheck is loaded?
Unless the fact linting still requires shellcheck
to be installed is a bug. I have shellcheck installed. It doesn't appear listed on :LSPInfo but it works. If I uninstall shellcheck, linting stops working.
Maybe
"gbprod/none-ls-shellcheck.nvim"
should be shipped by default with none-ls and dorequire("null-ls").register(require("none-ls-shellcheck.code_actions"))
if shellcheck is loaded?
This was intended and will not change.
As long as we add it to the wiki in the future it's cool.
As long as we add it to the wiki in the future it's cool.
The wiki is open for everyone to edit. It's appreciated if you could do it!
I can't take care of the wiki atm sorry. But I will be helping with QA from NormalNvim
Another report: Unless I'm wrong → beautysh is not loaded anymore event after installing "nvimtools/none-ls-extras.nvim".
Another report: Unless I'm wrong → beautysh is not loaded anymore event after installing "nvimtools/none-ls-extras.nvim".
Intended, see #81 still. beautysh is only useful for zsh (because it does not fail on parsing), but it formats the code wrongly so you might encounter some unknown issues with it.
Re-opened, as this one seems to actually be a bug.
It is currently necessary to do
"gbprod/none-ls-shellcheck.nvim"
local nls = require("null-ls")
local shellcheck_code_actions = require("none-ls-shellcheck.code_actions")
nls.register(shellcheck_code_actions) -- shell code actions.
in order to enable shell code actions. This shouldn't be necessary. According to this bashls should include code actions already, which is not the case.
If you are not against bash-language-server, you could make a PR to there. I mentioned the exact line of code somewhere in #81.
found it, https://github.com/nvimtools/none-ls.nvim/discussions/81#discussioncomment-8583064 & https://github.com/bash-lsp/bash-language-server/blob/afd0d82c5a0a3cbedef8098b8944d9b01c47657e/server/src/shellcheck/index.ts#L239
cc @skovhus you might want to take a look at this. :)
tl;dr: users are missing disable SC#### for this line / this file
code actions in bash-lsp.
I've re-tested and even without
local nls = require("null-ls")
local shellcheck_code_actions = require("none-ls-shellcheck.code_actions")
bashls do have code actions.
The confusion came from the fact standalone shellcheck offer different code actions (often unnecesary ones, like "ignore rule").
So there are now less scenarios where code actions are usable but the code actions offered to us are actually useful.
So this can be closed, sorry for the noise.
FAQ
Issues
Neovim Version
v0.9.5
Dev Version?
Operating System
arch
Minimal Config
Steps to Reproduce
x
Reproducibility Check
minimal_init.lua
template and that my issue is reproducible by runningnvim --clean -u minimal_init.lua
and following the steps above.Expected Behavior
x
Actual Behavior
x
Debug Log
x
Help
No
Implementation Help
As indicated here I've installed
shellcheck
on mason, as replacement for the built-in thebash-language-server
.What works:
What doesn't work:
More info: Previously I had code actions working with:
Requirements