Describe the bug
With TS enabled, I no longer get LSP warnings. LSP errors work just fine, but for LSP warnings all I get is a W in the gutter, but not the virtual text that comes with it.
To Reproduce
Given a folder with the following three files:
foo.go
package main
var f = func(a int) {
a = 2
}
go.mod (so that the LSP kicks in):
module foo
and test.vim (the sample config):
packadd nvim-lspconfig
packadd nvim-treesitter
lua << LUA
require'nvim_lsp'.gopls.setup{
cmd = {"gopls", "serve"},
settings = {gopls = {staticcheck = true}}
}
require'nvim-treesitter.configs'.setup{highlight = {enable = true}}
LUA
then running nvim -u test.vim foo.go will show a W in the gutter, but no virtual text for it.
Disabling the TS plugin (OR simply toggling off highlighting) and trying again, will reveal the actual warning text: _"argument a is overwritten before first use"_.
You can also introduce any error in the Go code (just type some garbage in there) and you will see that errors work fine, with or without TS.
Expected behavior
I expect TS to not break LSP warnings.
Output of :checkhealth nvim_treesitter
highlights.scm found.locals.scm found.textobjects.scm found.folds.scm query found for goOutput of nvim --version
NVIM v0.5.0-715-gc5ceefca7
Additional context
I use the latest master for the TS (and lspconfig) plugins.
Hi and thanks for reporting!
This is actually a known issue upstream, caused by luahl and recent patches made to neovim.
Got it, looks like this issue, right: https://github.com/neovim/neovim/issues/12943 ? Should we close this ticket then and wait for the upstream to fix?
leave it open here, we'll close once upstream is fixed :)
I guess that's fixed now: https://github.com/neovim/neovim/pull/13038
only accidentally in that case. We have yet to implement priority :]