feat(lsp,diagnostic): open folds in jump-related functions (#16520)

This commit is contained in:
Dmytro Meleshko
2021-12-04 23:14:38 +02:00
committed by GitHub
parent 8dcf45c824
commit 222ef0c00d
2 changed files with 9 additions and 4 deletions

View File

@@ -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