Closed danielyrovas closed 2 months ago
Hello,
Could you please provide me with a code example where the linting issue occur with the plugin?
It would make debugging easier!
Thanks.
Yeah sure, here is a setup that shows the issue - this config doesn't have LSP setup, only nvim-lint.
rubocop: 1.62.1
here is a screenshot with the diagnostics:
I don't have the same linting messages as you, but it seems to be working (no LSP on Ruby here):
Maybe it comes from your linter configuration?
Idk what nvim-lint was picking up before, but if I set nvim-lint to only use rubocop I get the same lint messages as you, but still no diagnostic from tiny-inline :(
lint.linters_by_ft = {
ruby = { "rubocop" },
}
thanks for the great project btw
Thanks!
Just to be sure, can you try setting opts like so:
require("tiny-inline-diagnostic").setup({
options = {
multilines = true,
},
})
Thanks, but same result unfortunately:
I also tried nvim v10 and same result.
Are you lazy loading nvim-lint ? If so, just try to disable it, to check if it comes from here
It persists if I use this config with lazy=false
Thank you very much for this minimal config.
I've found the issue: inside the plugin, I create an autocmd for the LspEvent, which never triggers in your case.
So, I've added options.overwrite_events, which ideally shouldn't be modified, but in your case, it's the only solution.
What you need to do is set options.overwrite_events = { "BufWritePre" }
, and it should work.
The optimal set of overwrite_events
appears to be { "DiagnosticChanged" }
.
I've set this plugin up alongside nvim-lint. I have had no issue getting the (excellent) UI popping up for the errors from lua_lsp, however, I can't seem to get diagnostics from nvim-lint to appear. I believe they should work :tm: because nvim-lint is supposed to report the warnings to
vim.diagnostic
. I can see the diagnostics from nvim-lint in the normal neovim popup if I usevim.diagnostic.open_float()
I'm using no config: