neoclide / coc-lists

Common lists for coc.nvim
264 stars 24 forks source link

helptags list doesn’t display helptags for packages added after launch #141

Open TSFoster opened 1 year ago

TSFoster commented 1 year ago

Hi,

I have opt packages that I only packadd to vim when loading specific filetypes (e.g. I have the line vim.cmd "packadd emmet-vim" in ftplugin/html.lua). While I can do :help emmet after loading an HTML file into a buffer, I can't find the same doc with :CocList helptags.

I'm adding this to this repo because the problem I'm experiencing is related to the helptags list. Based on a couple of quick greps, I think the problem might be that coc.nvim's workspace.env doesn't update, so workspace.env.runtimepath doesn't reflect changes to &rtp. Do I have that right?

chemzqm commented 1 year ago

No, it's automatically updated by use OptionSet autocmd, the autocmd may not fired or you don't have tags file created in doc folder.

TSFoster commented 1 year ago

Ok, interesting. I can see that the OptionSet autocmd gets triggered when using :packadd from the command line, but not if it's being called within a ftplugin/*.lua or ftplugin/*.vim file. I don't know if this is a bug with neovim or what is supposed to happen.