This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Adapt code to package manager of your choice. | |
-- I am using lazy.nvim in this example | |
local help_tag_mapping = { | |
['<CR>'] = function(prompt_bufnr) | |
local selection = require('telescope.actions.state').get_selected_entry() | |
if not selection then | |
return | |
end | |
local doc_path = selection.filename or selection.path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local api = vim.api | |
local cmd = vim.cmd | |
local fn = vim.fn | |
local iter = vim.iter | |
local autocmd = api.nvim_create_autocmd | |
local close_win = api.nvim_win_close | |
local create_buf = api.nvim_create_buf | |
local create_namespace = api.nvim_create_namespace | |
local get_current_win = api.nvim_get_current_win |