codota / tabnine-vim

Vim client for TabNine. https://vimawesome.com/plugin/tabnine-vim
https://www.tabnine.com/install/vim
GNU General Public License v3.0
669 stars 36 forks source link

filetype blacklist is being ignored #75

Closed michaelb closed 3 years ago

michaelb commented 3 years ago

Issue Details: Tabnine does not respect the blacklist, be it from the g:ycm_filetype_blacklist vim variable, or even the default config in third_party/ymcd/ycmd/default_settings.json

There is an early 'return 1' in a function that short-circuits the logic and basically allow completion for any filetype. Though, removing it does not seem to cause any kind of issue [on my system, should be tested elsewhere just in case]. Git blames @zxqfl , so I might just tag him, but the commit message is unrelated. Maybe a test config was pushed?

I cannot stress how annoying it is to have undesired completion in some buffers, such as the telescope prompt, but i guess others similar things (fzf, floating windows).

See my pull request for the fix

avnerbarr commented 3 years ago

@dimacodota

hoschi commented 3 years ago

@michaelb the PR removes markdown from the ignored file type list, was this on purpose? I actually installed the PR just to disable Tabnine for Markdown 🙈

michaelb commented 3 years ago

It was some time ago, but it was on purpose. I though that markdown is most often written as part of a project, and code-aware prose completion wasn't so bad (you don't have any lsp feature ofc).

But anyway, with this PR the

let g:ycm_blacklist_filetype key should be respected

(All -read: too much- info about that is available in :help youcompleteme)

Edit: alternatively, you can fork my fork (🍴) and add any language to blacklist to the relevant section of 'third_party/ycmd/ycmd/default_settings.json')

hoschi commented 3 years ago

let g:ycm_filetype_blacklist works indeed with the PR, I just wondered, because the docs still say markdown is ignored by default: https://github.com/michaelb/tabnine-vim/blob/master/doc/youcompleteme.txt#L2413

michaelb commented 3 years ago

whoops you're right. I'll update the docs (selfish me wants to keep markdown completion)