diff options
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 53e2240ff5..9ca18cb2b1 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -421,7 +421,13 @@ function M.jump_to_location(location) local bufnr = vim.uri_to_bufnr(location.uri) -- Save position in jumplist vim.cmd "normal! m'" - -- TODO(ashkan) use tagfunc here to update tagstack. + + -- Push a new item into tagstack + local items = {} + table.insert(items, {tagname=vim.fn.expand("<cword>"), from=vim.fn.getpos('.')}) + vim.fn.settagstack(vim.fn.bufnr('%'), {items=items}, 't') + + --- Jump to new location api.nvim_set_current_buf(bufnr) local row = location.range.start.line local col = location.range.start.character |