From 222ef0c00d97aa2d5e17ca6b14aea037155595ee Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Sat, 4 Dec 2021 23:14:38 +0200 Subject: feat(lsp,diagnostic): open folds in jump-related functions (#16520) --- runtime/lua/vim/lsp/util.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua/vim/lsp/util.lua') diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index fad2b962b5..059e66c53a 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -965,6 +965,8 @@ function M.jump_to_location(location) local row = range.start.line local col = get_line_byte_from_position(0, range.start) api.nvim_win_set_cursor(0, {row + 1, col}) + -- Open folds under the cursor + vim.cmd("normal! zv") return true end -- cgit