From 30ed245d008045a505a87ab21d22ada45dd1f4b5 Mon Sep 17 00:00:00 2001 From: Jakub Łuczyński Date: Sat, 7 Dec 2019 12:34:22 +0100 Subject: LSP: Add jump when calling gotodef (#11521) --- 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 b9990ed082..3798b30a46 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -313,6 +313,8 @@ end function M.jump_to_location(location) if location.uri == nil then return end local bufnr = vim.uri_to_bufnr(location.uri) + -- Save position in jumplist + vim.cmd "normal! m'" -- TODO(ashkan) use tagfunc here to update tagstack. api.nvim_set_current_buf(bufnr) local row = location.range.start.line -- cgit