sidebar.nvim
sidebar.nvim copied to clipboard
Diagnostics section
Not showing python diagnostic
Do you have a language server configured? Diagnostic information will only be available if you have Neovim lsp configured.
yes. all configured. but
hi @RAprogramm we need a bit more info to track this down.
- nvim version
- language server name
- your sidebar setup
- nvim v0.6.1 build type: release
- i tryed pyright, jedi and pyls.
maybe problem with virtual enviroment?
here is what i am telling about
also i find this
not critical, but sometimes icons looks pretty, and sometimes like this
in sidebar.lua
you don't have diagnostics
listed as one of the sections enabled (lines 8-12) and yet you have it in the sidebar.
1- Please make sure to have diagnostics
listed in the enabled sections.
2- How and where are calling sidebar.lua
in your dotfiles?
No no, when I posted previous screenshot, "diagnostocs" was in my config section. .nvim/lua/config/sidebar.lua
hi @RAprogramm did u manage to get it working? if not, do you have your dotfiles available so I can take a look?
https://github.com/RAprogramm/neovim-IDE this is my neovim config. diagnostic still not working in virtualenvironment python. in lua works good.
I cannot reproduce unfortunately. In the screenshot I'm using your dotenv, pyright, debian (sid) and neovim 0.6.1. It works in both a virtualenv and outside of a virtualenv.
A couple of things you can try tho:
1- try running :LspInfo
and check that your lsp is running properly.
2- run :lua vim.diagnostic.setqflist()
and see if the quickfix is populated correctly.
Let me know what you get with the commands above.
I've just run into the same issue but with lua. My diagnostic section is empty. My sidebar configuration:
require("sidebar-nvim").setup({
["diagnostics"] = {
icon = "",
},
sections = { "datetime", "git", "diagnostics" },
})
Results of :LspInfo
:
Language client log: /home/kghost/.cache/nvim/lsp.log
Detected filetype: lua
1 client(s) attached to this buffer:
Client: sumneko_lua (id: 1, pid: 480206, bufnr: [12])
filetypes: lua
autostart: true
root directory: /home/kghost/workspace/dot-files
cmd: lua-language-server
Configured servers list: vimls, rnix, yamlls, sumneko_lua, tsserver, bashls
Results of :lua vim.diagnostic.setqflist()
:
programs/neovim/init.lua|2 col 20-23 warning| Undefined global `vim`.
1 programs/neovim/init.lua|19 col 1-4 warning| Undefined global `vim`.
2 programs/neovim/init.lua|23 col 1-4 warning| Undefined global `vim`.
3 programs/neovim/init.lua|24 col 1-4 warning| Undefined global `vim`.
4 programs/neovim/init.lua|31 col 3-6 warning| Undefined global `vim`.
5 programs/neovim/init.lua|53 col 3-6 warning| Undefined global `vim`.
6 programs/neovim/init.lua|64 col 22-25 warning| Undefined global `vim`.
7 programs/neovim/init.lua|82 col 11-14 warning| Undefined global `vim`.
8 programs/neovim/init.lua|83 col 4-7 warning| Undefined global `vim`.
9 programs/neovim/init.lua|261 col 1-4 warning| Undefined global `vim`.
[Quickfix List] Diagnostics
hi @ghostbuster91
are you still experiencing this issue with the latest Sidebar updates?
if so, what version of neovim are you using?
It seems that diagnostics only update on file save, while it should update every time e.g enter normal mode
it actually updates using an autocommand
event called DiagnosticChanged
(see: https://neovim.io/doc/user/diagnostic.html#DiagnosticChanged)
it actually updates using an
autocommand
event calledDiagnosticChanged
(see: neovim.io/doc/user/diagnostic.html#DiagnosticChanged)
For me it only updated on file save. Strange
it actually updates using an
autocommand
event calledDiagnosticChanged
(see: neovim.io/doc/user/diagnostic.html#DiagnosticChanged)For me it only updated on file save. Strange
🤔 what happens if you call :lua vim.diagnostic.setqflist({open = true })
before saving? Does it show the expected results?
also what language server and neovim version are you using?
it actually updates using an
autocommand
event calledDiagnosticChanged
(see: neovim.io/doc/user/diagnostic.html#DiagnosticChanged)For me it only updated on file save. Strange
thinking what happens if you call
:lua vim.diagnostic.setqflist({open = true })
before saving? Does it show the expected results?also what language server and neovim version are you using?
Doesnt show any results. Neovim nightly, LSP is eslint and tsserver
it actually updates using an
autocommand
event calledDiagnosticChanged
(see: neovim.io/doc/user/diagnostic.html#DiagnosticChanged)For me it only updated on file save. Strange
thinking what happens if you call
:lua vim.diagnostic.setqflist({open = true })
before saving? Does it show the expected results? also what language server and neovim version are you using?Doesnt show any results. Neovim nightly, LSP is eslint and tsserver
Any chance it's an issue with your setup? I'm also using both eslint and tsserver and they update fine the qflist, but I'm using 0.7
it actually updates using an
autocommand
event calledDiagnosticChanged
(see: neovim.io/doc/user/diagnostic.html#DiagnosticChanged)For me it only updated on file save. Strange
thinking what happens if you call
:lua vim.diagnostic.setqflist({open = true })
before saving? Does it show the expected results? also what language server and neovim version are you using?Doesnt show any results. Neovim nightly, LSP is eslint and tsserver
Any chance it's an issue with your setup? I'm also using both eslint and tsserver and they update fine the qflist, but I'm using 0.7
What I mean is setqflist works fine, its just sidebar isnt showing anything when i run the cmd
you're saying that you can see the qflist populated with the diagnostics?
both setqflist
and the diagnostics section uses the same source of diagnostics 🤔
would you be able to create a minimal config that replicates the problem?
you're saying that you can see the qflist populated with the diagnostics?
both
setqflist
and the diagnostics section uses the same source of diagnostics thinkingwould you be able to create a minimal config that replicates the problem?
I am not very good with minimal configs sadly. My full config is in https://github.com/Suyashtnt/dotfiles/tree/master/users/tntman/config/nvim
I also encountered the same issue. I'm also in nightly so maybe there is something with that.
Ran :lua vim.diagnostic.setqflist({open = true }) and everything seems fine
Editing and saving the buffer I was able to make it work once. but just for a while
I'll try to do a minimal replication of the error because I'd really like it to get it working. I love the plugin!
I was able to get it working by removing one of the two checks that see if the buffers are open in tho diagnostic component.
Particularly, open_bufs[bufnr] was almost always throwing nil
I don't know what side effects this can bring, tho.