neoclide / coc-snippets

Snippets solution for coc.nvim
970 stars 41 forks source link

Can not hide the completion in markdown file. #329

Closed sokinpui closed 1 year ago

sokinpui commented 1 year ago

I have the same request as this issue, I have try to add those line in vimrc

augroup CocSnippetsGroup
  autocmd!
  autocmd BufNew,BufRead * execute "CocDisable"
  autocmd User CocNvimInit call CocAction('toggleSource', 'snippets')
  autocmd BufNew,BufEnter *.java,*.vim,*.haskell,*.rs execute "silent! CocEnable"
augroup end

but error report when I try to open vimrc with vim.

Error detected while processing BufRead Autocommands for "*"..function <SNR>27_Disable[5]..coc#rpc#request[4]..<SNR>30_request[34]..BufRead Autocommands for "*"
..function <SNR>27_Disable[5]..coc#rpc#request[4]..<SNR>30_request:
line   29:
E605: Exception not caught: Error on "detach" request: Plugin not ready

I want only show snippets in completion list when editing markdown files.

when I enter CocAction('toggleSource', 'snippets') in command mode in markdown file, I receive E492: Not an editor command: CocAction('toggleSource', 'snippets')

chemzqm commented 1 year ago

but error report when I try to open vimrc with vim.

Fixed on coc.nvim.

when I enter CocAction('toggleSource', 'snippets') in command mode in markdown file, I receive E492: Not an editor command: CocAction('toggleSource', 'snippets')

Use :call CocAction('toggleSource', 'snippets')