micangl / cmp-vimtex

Vimtex source for nvim-cmp.
MIT License
87 stars 5 forks source link

Removing autocompletion for regular commands #21

Closed ThSGM closed 5 months ago

ThSGM commented 7 months ago

I'm trying to figure out how to disable all the regular LaTeX symbol autocompletions:

image

I'd basically like to only display autocompletion data related to things like labels, bibliographic citations, etc. rather than all the commands from packages!

I tried to read the cmp-vimtex documentation but could not figure out what the trigger would be. Currently my sources are:

        sources = cmp.config.sources {
          { name = 'ultisnips', priority = 1000 },
          -- { name = 'omni', priority = 1000 },
          { name = 'vimtex', priority = 750 },
          -- { name = 'nvim_lsp', priority = 600 },
          -- { name = 'buffer', priority = 500 },
          -- { name = 'otter', priority = 500 },
          -- { name = 'path', priority = 250 },
        },

so I have only enabled ultisnips and vimtex sources. The long list of suggestions goes away if I comment out the vimtex sources line.

micangl commented 7 months ago

Sure, the Latex package-related commands are provided by Vimtex. Currently, I'm really short of free time, so my advice is to check Vimtex's documentation to see if there's a way to configure the omnifunc to fit your needs.