Closed sainnhe closed 5 years ago
Can't reproduce, looks like your around source is disabled, consider checkout the log: https://github.com/neoclide/coc.nvim/wiki/Debug-coc.nvim#using-logger-module
here is the log coc-nvim.log
but I still have no idea what is going on, I have already enabled around source
"coc.source.around.enable": true,
There's no line contains around
, it could be disabled by use vim function like coc#config
.
Try coc.nvim with minimal vimrc.
I've tried a minimal vimrc provided by README.md, but it dosen't work still.
And meanwhile, I find that the around
source works intermittently. it works in some situations, but fails sometimes.
But the buffer
source doesn't work all the time.
Maybe this is not a common problem, I'm trying to get ncm2-coc to work, hope this would solve my problem.
Coc doesn't generate keywords for git ignored files and none empty filetype. Also check your iskeywords option.
OK, I find the reason. That's because I create a "dotfiles" repo which is located in $HOME, and exclude all files
~/.git/info/exclude
*
and then use git add -f
to add some dotfiles. So coc only works when edit those dotfiles.
Dotfiles - ArchWiki
Is there any option to force coc to generate keywords for git ignored files in a certain repo?
I've made coc generate words for ignored files, you can use "coc.source.buffer.ignoreGitignore"
to toggle those words in completion.
Thanks for your work, but unfortunately, it still doesn't work. I have already upgraded coc to latest version, and tried to toggle
"coc.source.buffer.ignoreGitignore": true,
"coc.source.buffer.ignoreGitignore": false,
But both around
and buffer
source still don't work when I edit git ignored files.
Personally, I thought there should be a "coc.source.around.ignoreGitignore"
option to toggle around
source in completion, because around
source still seems to be disabled when edit git ignored files.
No need for "coc.source.around.ignoreGitignore"
, it always return words of current buffer.
I think you didn't compile code from master branch, you have to not use tag:*
in Plug
command.
It works, thanks!
Coc doesn't generate keywords for git ignored files and none empty filetype. Also check your iskeywords option.
@chemzqm Sorry to necrobump this issue, is there a way to configure coc
so it does not ignore none empty filetype? I imagine this was added for performance sake, but if I type some keyword on another file I want to reference it on the current one if I have both buffers opened.
@Pablo1107 no, it sucks, you can simply invoke <C-n>
for keywords completion of vim, it even works without any plugin.
Demo
This is how coc behaves:
And this is how ncm2 behaves:
What I expect: complete buffer words like ncm2
My config
init.vim
coc-settings.json