Adjusting COC

This commit is contained in:
2025-09-12 12:22:00 -04:00
parent 27d301895b
commit 8954b671f6
3 changed files with 96 additions and 7 deletions

View File

@@ -187,10 +187,11 @@ vim.api.nvim_create_user_command("Vsplit", function()
end, {})
function _G.ShowDocumentation()
if vim.fn.CocAction("hasProvider", "hover") then
vim.fn.CocActionAsync("doHover")
local filetype = vim.bo.filetype
if filetype == "vim" or filetype == "help" then
vim.cmd("h " .. vim.fn.expand("<cword>"))
else
vim.cmd("h " .. vim.bo.filetype)
vim.fn.CocActionAsync("doHover")
end
end