diff --git a/lua/functions.lua b/lua/functions.lua index 00c2dd8..cc0a44f 100644 --- a/lua/functions.lua +++ b/lua/functions.lua @@ -157,6 +157,7 @@ function t3_make_ctags() }) end + vim.api.nvim_create_autocmd("FileType", { pattern = { "markdown", "norg", "md", "wiki" }, -- Set for markdown file type callback = function() diff --git a/lua/keymaps.lua b/lua/keymaps.lua index a391a68..5b058fd 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -132,13 +132,6 @@ vim.api.nvim_create_autocmd("FileType", { }) -- COC Keybindings -function ShowDocumentation() - if CocAction("hasProvier", "hover") then - CocActionAsync("doHover") - else - vim.cmd("h " .. vim.bo.filetype) - end -end vim.keymap.set( "n", "K", ":call ShowDocumentation()", { noremap = true, silent = true, desc = "Show Documentation" }) vim.keymap.set( "n", "l", "", {desc = "LSP" }) diff --git a/lua/utils/t3_functions.lua b/lua/utils/t3_functions.lua index fcb3181..32eab66 100644 --- a/lua/utils/t3_functions.lua +++ b/lua/utils/t3_functions.lua @@ -185,3 +185,12 @@ vim.api.nvim_create_user_command("Vsplit", function() vim.cmd("vsplit") vim.cmd("wincmd l") end, {}) + +function ShowDocumentation() + if CocAction("hasProvider", "hover") then + CocActionAsync("doHover") + else + vim.cmd("h " .. vim.bo.filetype) + end +end +