Open samhed opened 1 year ago
@samhed I had the same problem, but the culprit turned out to be not the coc-html
, but coc-nav
. The solution was some autocmds to turn it off, when entering html buffer and turn it on when leaving. You can add this to your coc.lua
:
vim.api.nvim_create_augroup("CocNavToggle", { clear = true })
vim.api.nvim_create_autocmd("BufEnter", {
group = "CocNavToggle",
pattern = "*.html",
command = "call CocActionAsync('deactivateExtension', 'coc-nav')",
desc = "Turn off coc-nav for html"
})
vim.api.nvim_create_autocmd("BufLeave", {
group = "CocNavToggle",
pattern = "*.html",
command = "call CocActionAsync('toggleExtension', 'coc-nav')",
desc = "Turn on coc-nav for other files"
})
I can no longer reproduce this issue. I have both coc-html and coc-nav installed, and I did not add the autocmd's you suggested. @d-mitrofanov-v can you reproduce the issue if you remove those autocmd's?
Scratch that. I still see the bug if I open an HTML file in a split window. Can confirm that your autocmd's works.
I get the following message for every single line I type in a HTML file when coc-html is installed:
Doing
CocDisable
doesn't help, but if I uninstall coc-html the error goes away.init.vim: Same configuration for CoC as suggested here: https://github.com/neoclide/coc.nvim#example-lua-configuration
coc-settings:
neovim version: