Closed alexlafroscia closed 6 years ago
For the time being, I decided to do this:
autocmd BufRead *.ts,*.tsx call cm#disable_source('cm-bufkeyword')
autocmd BufRead *.ts,*.tsx call cm#disable_source('cm-tmux')
Discussion should move to https://github.com/ncm2/ncm2/issues/3
What would be the recommended way to disable a source only when another is available?
For example, I have TypeScript completion enabled in a project. By default, I also get buffer completion. The buffer completion is fine for some languages, but is going to recommend things that aren't actually in scope, and I trust that the TypeScript completion will give me everything that's actually relevant. I want to keep the buffer completion enabled by default, but when TypeScript is available instead, turn buffer completion off.
I thought about adding something like
to my
ftplugin/typescript.vim
file, but am pretty sure that would turn buffer completion off for all files once I have opened a TypeScript file.