You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked the FAQ and it didn't resolve my problem.
Issues
I have checked existing issues and there are no issues with the same problem.
Neovim Version
0.10.0
Dev Version?
I am using a stable Neovim release version, or if I am using a dev version of Neovim I have confirmed that my issue is reproducible on a stable version.
Operating System
WSL2 Ubuntu 22.04
Minimal Config
-- this template is borrowed from nvim-lspconfiglocalon_windows=vim.loop.os_uname().version:match("Windows")
localfunctionjoin_paths(...)
localpath_sep=on_windowsand"\\" or"/"localresult=table.concat({ ... }, path_sep)
returnresultendvim.g.loaded_remote_plugins=""vim.cmd([[set runtimepath=$VIMRUNTIME]])
localtemp_dir=vim.loop.os_getenv("TEMP") or"/tmp"vim.cmd("set packpath=" ..join_paths(temp_dir, "nvim", "site"))
localpackage_root=join_paths(temp_dir, "nvim", "site", "pack")
localinstall_path=join_paths(package_root, "packer", "start", "packer.nvim")
localcompile_path=join_paths(install_path, "plugin", "packer_compiled.lua")
localnull_ls_config=function()
localnull_ls=require("null-ls")
-- add only what you need to reproduce your issuenull_ls.setup({
sources= {
null_ls.builtins.diagnostics.codespell.with({extra_args= { "--count" }}),
-- null_ls.builtins.diagnostics.codespell.with({extra_args = { }}),
},
debug=true,
})
endlocalfunctionload_plugins()
-- only add other plugins if they are necessary to reproduce the issuerequire("packer").startup({
{
"wbthomason/packer.nvim",
{
"nvimtools/none-ls.nvim",
requires= { "nvim-lua/plenary.nvim" },
config=null_ls_config,
},
},
config= {
package_root=package_root,
compile_path=compile_path,
},
})
endifvim.fn.isdirectory(install_path) ==0thenvim.fn.system({ "git", "clone", "https://github.com/wbthomason/packer.nvim", install_path })
load_plugins()
require("packer").sync()
elseload_plugins()
require("packer").sync()
end
Steps to Reproduce
Create a file with a spell error, like foo.py
```python
# adn
```
Ensure codespell is available in you PATH and start neovim with nvim --clean -u minimal_init.lua foo.py.
No diagnostics are shown
Remove the "--count" argument from codespell. Re-run the steps above and the diagnostics is displayed.
Reproducibility Check
I confirm that my minimal config is based on the minimal_init.lua template and that my issue is reproducible by running nvim --clean -u minimal_init.lua and following the steps above.
Expected Behavior
Diagnostics from codespell should show up in Neovim.
codespell picks configuration up from pyproject.toml, so even when --count is not listed in extra_args, but it is active in pyproject.toml the unexpected behaviour also takes place.
Actual Behavior
No diagnostic is shown.
Debug Log
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/client.lua:114: starting null-ls client
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:106: received LSP request for method initialize
[DEBUG Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/client.lua:182: unable to notify client for method textDocument/didOpen (client not active): {
textDocument = {
uri = "file:///home/user/tmp/foo.py"
}
}
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:131: received LSP notification for method initialized
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:131: received LSP notification for method textDocument/didOpen
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_DIAGNOSTICS_ON_OPEN
[DEBUG Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:329: spawning command "codespell" at /home/gzagatti/tmp with args { "--count", "-" }
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:207: error output: 1
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:208: output: 1: # adn
adn ==> and
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/diagnostics.lua:181: received diagnostics from source 1
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/diagnostics.lua:182: {}
[TRACE Tue Jun 18 11:15:40 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:106: received LSP request for method shutdown
[TRACE Tue Jun 18 11:15:40 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:131: received LSP notification for method exit
Help
Yes, but I don't know how to start. I would need guidance
Implementation Help
Null-ls should take all the output from codespell but it only takes the last line of codespell which contains the error count. To fix this issue I would need help with collecting all the program output to then pass it to the diagnostics function.
Requirements
I have read and followed the instructions above and understand that my issue will be closed if I did not provide the required information.
The text was updated successfully, but these errors were encountered:
FAQ
Issues
Neovim Version
0.10.0
Dev Version?
Operating System
WSL2 Ubuntu 22.04
Minimal Config
Steps to Reproduce
foo.py
Ensure codespell is available in you PATH and start neovim with
nvim --clean -u minimal_init.lua foo.py
.No diagnostics are shown
Remove the "--count" argument from codespell. Re-run the steps above and the diagnostics is displayed.
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
Diagnostics from codespell should show up in Neovim.
codespell
picks configuration up frompyproject.toml
, so even when--count
is not listed inextra_args
, but it is active inpyproject.toml
the unexpected behaviour also takes place.Actual Behavior
No diagnostic is shown.
Debug Log
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/client.lua:114: starting null-ls client
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:106: received LSP request for method initialize
[DEBUG Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/client.lua:182: unable to notify client for method textDocument/didOpen (client not active): {
textDocument = {
uri = "file:///home/user/tmp/foo.py"
}
}
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:131: received LSP notification for method initialized
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:131: received LSP notification for method textDocument/didOpen
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_DIAGNOSTICS_ON_OPEN
[DEBUG Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:329: spawning command "codespell" at /home/gzagatti/tmp with args { "--count", "-" }
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:207: error output: 1
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/helpers/generator_factory.lua:208: output: 1: # adn
adn ==> and
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/diagnostics.lua:181: received diagnostics from source 1
[TRACE Tue Jun 18 11:15:00 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/diagnostics.lua:182: {}
[TRACE Tue Jun 18 11:15:40 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:106: received LSP request for method shutdown
[TRACE Tue Jun 18 11:15:40 2024] /tmp/nvim/site/pack/packer/start/none-ls.nvim/lua/null-ls/rpc.lua:131: received LSP notification for method exit
Help
Yes, but I don't know how to start. I would need guidance
Implementation Help
Null-ls should take all the output from
codespell
but it only takes the last line ofcodespell
which contains the error count. To fix this issue I would need help with collecting all the program output to then pass it to the diagnostics function.Requirements
The text was updated successfully, but these errors were encountered: