diff --git a/runtime/ftplugin/checkhealth.lua b/runtime/ftplugin/checkhealth.lua index a10c1dfdcb..74ee47b5f1 100644 --- a/runtime/ftplugin/checkhealth.lua +++ b/runtime/ftplugin/checkhealth.lua @@ -9,6 +9,16 @@ vim.keymap.set('n', '[[', function() require('vim.treesitter._headings').jump({ count = -1, level = 1 }) end, { buf = 0, silent = false, desc = 'Jump to previous section' }) +-- Look for tags in help tags files +vim.bo.tags = vim + .iter(vim.api.nvim_get_runtime_file('doc/tags doc/tags-??', true)) + :map(vim.fn.fnameescape) + :map(function(path) + return vim.fn.escape(path, ',') + end) + :join(',') + vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '') .. '\n sil! exe "nunmap gO"' .. '\n sil! exe "nunmap ]]" | sil! exe "nunmap [["' + .. '\n setlocal tags<'