-
Notifications
You must be signed in to change notification settings - Fork 305
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 hover and echo status message hidden by "--No lines in buffer--" #1510
Comments
It seems to be something with when a swap file is written. When I set set updatetime=0 The float doesn't disappear until I write the file to disk. I think when I write the file to disk that is when the swap file is written as well. I tried writing to disk with the default update time and the floating window stayed active, apart from a flicker. So I think it is something with writing a swap file and not the buffer's file. |
I was facing the same issue. Seems like this may be related to the
Removing |
Somehow, my Vim seems to be also generating a While trying to fix this exact issue I've changed a few things in this area, ultimately adding a configuration option to disable the "hide on CursorHold" behavior: let g:lsp_diagnostics_float_hide_on_cursor_hold = 0 The first change in the series is posted for review. - Plug 'prabirshrestha/vim-lsp'
+ Plug 'ilya-bobyr/vim-lsp'
+ let g:lsp_diagnostics_float_hide_on_cursor_hold = 0 Or, maybe, be even more precise with the exact change you want: - Plug 'prabirshrestha/vim-lsp'
+ Plug 'ilya-bobyr/vim-lsp', { 'commit': '61e72298180f7937cf5c141e6482ab9cbc64f3b9' }
+ let g:lsp_diagnostics_float_hide_on_cursor_hold = 0 It would also be nice to get someone else to try my changes. |
Steps to reproduce:
echo "foo()\nbar()" > /tmp/foo.py
vim -u /tmp/minimal.vim /tmp/foo.py
undefined name 'foo'
in a popup window and in the status message. Both the window and the status disappear after a few seconds (maybe 5 seconds after moving the cursor?) and the status message becomes--No lines in buffer--
.Curiously, if
g:lsp_diagnostics_float_delay
is500
instead of2000
or1000
, the "No lines in buffer" message doesn't show up and the diagnostic status message stays in place, though the hover window still disappears after a few seconds. (Is the floating window supposed to disappear? I'd really like it to stay visible until I move the cursor.) 500 seems to be the magic value; anything larger results in "No lines in buffer" messages overwriting the status line while anything smaller doesn't.Contents of
/tmp/minimal.vim
, assumes vim-plug is already installed:This happens on the system vim for macOS 12.7 (9.0 with patches 1-1544), MacVim 9.0.1897, and a recent gvim on Debian Linux (9.0, don't have the patch list handy). It's not limited to any particular LSP; I've seen it with the Python and Julia LSPs from
vim-lsp-settings
as well as a company-internal LSP at work.The text was updated successfully, but these errors were encountered: