mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	LSP: support tagstack #12096
This commit is contained in:
		| @@ -421,7 +421,13 @@ function M.jump_to_location(location) | |||||||
|   local bufnr = vim.uri_to_bufnr(location.uri) |   local bufnr = vim.uri_to_bufnr(location.uri) | ||||||
|   -- Save position in jumplist |   -- Save position in jumplist | ||||||
|   vim.cmd "normal! m'" |   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) |   api.nvim_set_current_buf(bufnr) | ||||||
|   local row = location.range.start.line |   local row = location.range.start.line | ||||||
|   local col = location.range.start.character |   local col = location.range.start.character | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Yen3
					Yen3