Coc.nvim: Force a specific filetype to use only a specific source?

Created on 7 Mar 2020  路  11Comments  路  Source: neoclide/coc.nvim

Is it possible to force CoC to use only, say, the coc-tags source for a specific filetype (like, for files with .bar extension)? What do I put in my ~/.vim/coc-settings.json config?

question

All 11 comments

Reopening as I got the question wrong.

I suspect the most straightforward solution to this question is to use a custom g:coc_data_home (check :h g:coc_data_home) that's set on a FileType autocmd, that will just contain the extensions you need, otherwise you would have to disable the filetype per source in case there's general sources installed. This would also need coc.nvim to be lazy loaded for g:coc_data_home to take effect. It's not trivial setting.

@oblitum Could you please stop closing my issues without providing anything even remotely close to a solution?

WTF, mate?

Like, with this :h g:coc_data_home: I have only coc-tag now in my coc_data_home but CoC still suggests not only tags but also every word it finds in other open buffers.

@oblitum So, I would be grateful if you could re-open this one, too.

Could you please stop closing my issues without providing anything even remotely close to a solution?

No. You're not posting issues as you're not filling any templates. Please check README that demands you to ask on gitter if you have a question.

@obitum Templates are suggested for bug reports and feature suggestions. These my questions aren't any of those

@oblitum And I also DID asked on gitter but haven't received a reply (not even an answer) in 24 hours.

@097115 hence the README demands you to go to gitter first, otherwise the issue tracker can get littered with question. You should be patient, as ask again. @chemzqm for example responds many after several hours have gone by. This is free software, so, stop with ETA expectations.

@oblitum I FUCKING DID GO TO GITTER FIRST, how else should I type this out for you?

But I see, you'll just never admit you were wrong (and really just spamming), so it's pointless to discuss. Thanks for the support, mate. You really did your best to provide a brilliant impression of CoC team.

There is an API to invoke completion of specific source, you can also disable auto completion on type.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FrankLA0203 picture FrankLA0203  路  3Comments

zhou13 picture zhou13  路  3Comments

skylite21 picture skylite21  路  3Comments

hackingcat picture hackingcat  路  3Comments

czepluch picture czepluch  路  3Comments