diff options
author | Mathias Fussenegger <f.mathias@zignar.net> | 2021-05-26 19:24:20 +0200 |
---|---|---|
committer | Mathias Fussenegger <f.mathias@zignar.net> | 2021-05-26 19:27:04 +0200 |
commit | e06a73900fb54524676e8314bfe824ceea040481 (patch) | |
tree | 515e1c96280c1f084cab1af8c30e4087d70eb911 /runtime/lua/vim/lsp/util.lua | |
parent | 0b905be47b969baf20fb4fe9828341ddfc356092 (diff) | |
download | rneovim-e06a73900fb54524676e8314bfe824ceea040481.tar.gz rneovim-e06a73900fb54524676e8314bfe824ceea040481.tar.bz2 rneovim-e06a73900fb54524676e8314bfe824ceea040481.zip |
lsp: Ensure floating markdown buffers are deleted on hide
After the change to use fancy_floating_markdown for the signature help I
noticed that scratch buffers start to accumulate.
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 7809c9b7e3..ad60d1bb03 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -1159,6 +1159,7 @@ function M.fancy_floating_markdown(contents, opts) local winnr = api.nvim_open_win(bufnr, false, M.make_floating_popup_options(width, height, opts)) vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, stripped) api.nvim_buf_set_option(bufnr, 'modifiable', false) + api.nvim_buf_set_option(bufnr, 'bufhidden', 'wipe') -- Switch to the floating window to apply the syntax highlighting. -- This is because the syntax command doesn't accept a target. |