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
{{ message }}
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.
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
NVIM v0.9.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.
-- 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.shellcheck,
},
debug=true,
})
endlocalfunctionload_plugins()
-- only add other plugins if they are necessary to reproduce the issuerequire("packer").startup({
{
"wbthomason/packer.nvim",
{
"jose-elias-alvarez/null-ls.nvim",
requires= { "nvim-lua/plenary.nvim" },
config=null_ls_config,
},
--{-- 'neovim/nvim-lspconfig',-- config = function() require 'lspconfig'.bashls.setup { } end,--},
},
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
First of all, for me this problem is not related to shellcheck, but to ltrs. I just haven't found an LS that does the same thing as null-ls. Anyway, I think it's the same problem. And it affects any null-ls diagnostic builtins.
The problem occurs if any character that counts as two (Cyrillic, Japanese Kana, etc.) is written in front of the diagnosed site. It leads to a shift of the diagnosed position.
Steps to reproduce:
create sample file
open file nvim --clean -u <cfg_path> <sample_file>
nix way: nix run nixpkgs/963006aab35e3e8ebbf6052b6bf4ea712fdd3c28#neovim-unwrapped -- --clean -u <cfg_path> <sample_file>
now comment out null_ls.builtins.diagnostics.shellcheck, and uncomment lspconfig lines
repeat the first two steps
Sample file:
#!/usr/bin/env bashecho"лдофыва $foo"echo"$bar"
Results:
with bashls
just shellcheck via null-ls
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
The same as with other LS
Actual Behavior
Incorrect position of the diagnosed site
Debug Log
[TRACE Sun 28 May 2023 04:50:45 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method exit
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/client.lua:97: starting null-ls client
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method initialize
[DEBUG Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/client.lua:152: unable to notify client for method textDocument/didOpen (client not active): {
textDocument = {
uri = "file:///home/name_snrl/trash/test.sh"
}
}
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method initialized
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method textDocument/didOpen
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/generators.lua:21: running generators for method NULL_LS_DIAGNOSTICS_ON_OPEN
[DEBUG Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:320: spawning command "shellcheck" at /home/name_snrl/trash with args { "--format", "json1", "--source-path=/home/name_snrl/trash", "--external-sources", "-" }
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:204: error output: nil
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/helpers/generator_factory.lua:205: output: {"comments":[{"file":"-","line":3,"endLine":3,"column":15,"endColumn":19,"level":"warning","code":2154,"message":"foo is referenced but not assigned.","fix":null},{"file":"-","line":4,"endLine":4,"column":7,"endColumn":11,"level":"warning","code":2154,"message":"bar is referenced but not assigned.","fix":null}]}
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/diagnostics.lua:181: received diagnostics from source 1
[TRACE Sun 28 May 2023 04:53:59 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/diagnostics.lua:182: { {
code = 2154,
col = 14,
end_col = 18,
end_lnum = 2,
end_row = 3,
lnum = 2,
message = "foo is referenced but not assigned.",
row = 3,
severity = 2,
source = "shellcheck"
}, {
code = 2154,
col = 6,
end_col = 10,
end_lnum = 3,
end_row = 4,
lnum = 3,
message = "bar is referenced but not assigned.",
row = 4,
severity = 2,
source = "shellcheck"
} }
[TRACE Sun 28 May 2023 04:58:15 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:102: received LSP request for method shutdown
[TRACE Sun 28 May 2023 04:58:15 +05] /tmp/nvim/site/pack/packer/start/null-ls.nvim/lua/null-ls/rpc.lua:127: received LSP notification for method exit
Help
Yes
Implementation Help
I need an explanation of the difference between how null-ls and other LSs provide diagnostic data. As I see it, null-ls just uses vim.diagnostic.set(), but how do other LSs do it?
I think we need to add some hook to convert row column values to virtual
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
NVIM v0.9.0
Dev Version?
Operating System
NixOS rev: 963006aab35e3e8ebbf6052b6bf4ea712fdd3c28
Minimal Config
Steps to Reproduce
First of all, for me this problem is not related to
shellcheck
, but toltrs
. I just haven't found an LS that does the same thing asnull-ls
. Anyway, I think it's the same problem. And it affects anynull-ls
diagnostic builtins.The problem occurs if any character that counts as two (Cyrillic, Japanese Kana, etc.) is written in front of the diagnosed site. It leads to a shift of the diagnosed position.
Steps to reproduce:
nvim --clean -u <cfg_path> <sample_file>
nix way:
nix run nixpkgs/963006aab35e3e8ebbf6052b6bf4ea712fdd3c28#neovim-unwrapped -- --clean -u <cfg_path> <sample_file>
null_ls.builtins.diagnostics.shellcheck,
and uncommentlspconfig
linesSample file:
Results:
with bashls
just shellcheck via null-ls
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
The same as with other LS
Actual Behavior
Incorrect position of the diagnosed site
Debug Log
Help
Yes
Implementation Help
I need an explanation of the difference between how null-ls and other LSs provide diagnostic data. As I see it, null-ls just uses vim.diagnostic.set(), but how do other LSs do it?
I think we need to add some hook to convert row column values to virtual
Requirements
The text was updated successfully, but these errors were encountered: