-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagnostics Appear and Disappear #202
Comments
I don't think it's directly related to #180 (which is due to code chunks with indentations), but it looks like something I want to fix anyways
but it looks like even printing the error is stopped by another error. And the first error
is probably unrelated. It may be that I have to change the shape of the |
The |
Thanks for looking at my issue, I really appreciate it, it is a huge help.
Yeah, I only got that one once. It happened when I was writing up my issue. The output from the
What is interesting is that I don't get any error output with the transient diagnostics outside of debug mode - I only get diagnostics that disappear. Further transient diagnostics only show up for Further, when I run but otter still says the buffers exist:
|
I was printing the args to lspconfig.pylsp.setup({
settings = {
pylsp = {
plugins = {
pycodestyle = { enabled = false },
-- type checker
pylsp_mypy = {
enabled = true,
report_progess = true,
},
-- auto-completion options
jedi_completion = { enabled = true, fuzzy = true },
-- import sorting
pyls_isort = { enabled = true },
},
},
},
}) What it looks like is (and the logs bellow show that) Logs Without PyLSPLogs by changing local sync_diagnostics = function(args)
if vim.tbl_contains(vim.tbl_values(keeper.rafts[main_nr].buffers), args.buf) then
local diags = args.data.diagnostics
vim.print("sync_diagnostics diagnostics", args)
vim.diagnostic.reset(nss[args.buf], main_nr)
if config.cfg.handle_leading_whitespace then
for _, diag in ipairs(diags) do
local offset = keeper.get_leading_offset(diag.lnum, main_nr)
diag.col = diag.col + offset
diag.end_col = diag.end_col + offset
end
end
vim.diagnostic.set(nss[args.buf], main_nr, diags, {})
end
end
Logs With PyLSP
|
It's Ok, that makes sense. It seems niche that one would have two language servers providing diagnostics for the same language (I personally use just pyright), but nonetheless something I would like to fix. What is the effect of this in a pure python buffer? Do the diagnostics just accumulate? |
Hello, Thanks for I just wanted to chime in to say:
I'd say it's relatively common, given that pyright can serve as a type checker and ruff has more extensive linting functionality. Also Lazyvim enables both, so by default many users will have them both.
Indeed, when both are enabled in a Python file, the diagnostics are merged (see screenshot) I'll keep looking into this on my end. Let me know if there is anything specific I can do to help debugging! |
I have now also configured
with the default quarto/otter config, we see Now if we investigate the otter buffer for python with |
Disabling I'm glad about any more hints. |
Multiple LSPs
Typically yes, for instance:
True that, I've heard the same and this is my use case. Ruff Diagnostics not Working in Injected Buffers
Ruff Diagnostics in Pure
|
Yes, but curiously they do with the extra manual step I described above (only ruff, no pyright configured, manually open otter buffer, |
Some extra info I gathered:
In the LSP log, ruff typically outputs this message when you start editing a python file, and re-prints it on every keypress when you edit.
In the case of I'll keep looking into this when I have more time, but wanted to share this in case it's useful. Thanks! |
Hi!
I have an issue that I suspect is related to #180.
All of my problems appear in the context of a quarto document.
Otter Config
The Symptoms
Observations
Buffers are created, and modifying the code at the end of the readme to show the current languages like
outputs
Buffers are written to disk (because of config) and do match what is expected.
When I Write in a Code Cell
(Because of verbose mode)
After editing for a while I got this instead of the above message
The Code
This is the code where the symptoms appeared.
LspInfo
The text was updated successfully, but these errors were encountered: