nvim-lua / completion-nvim

A async completion framework aims to provide completion to neovim's built in LSP written in Lua
Apache License 2.0
974 stars 78 forks source link

Chain sources are not respected #355

Closed ranjithshegde closed 3 years ago

ranjithshegde commented 3 years ago

Regardless of where I place the config for chain completion + modes, nor what i change in it, it always defaults to lsp+snippets in first mode, tags and buffer in second.

    Chain_complete_list = {
        vimwiki = {{mode = 'dict'}, {mode = 'thes'}, {completion_items = {'buffer', 'path'}}},
        markdown = {{mode = 'dict'}, {mode = 'thes'}, {completion_items = {'buffer', 'path'}}},
        supercollider = {
            {completion_items = {'UltiSnips', 'snippet'}},
            {completion_items = {'ts'}}
        },
        cpp = {
                 {complete_items = {'snippet', 'lsp', 'path'}},
                 {complete_items = {'tags', 'buffers', 'ts'}}, {mode = '<c-p>'},
                 {mode = '<c-n>'}
        },
        default = {
                {complete_items = {'snippet', 'lsp'}},
                {complete_items = {'ts', 'buffers', 'tags', 'path'}}, {mode = '<c-p>'},
                {mode = {<c-n>'}
        }
    }

I have tried the above, putting similar in packer.nvim after use, as a function, putting the above in vimL format in init.nvim, nothing works

ZeroKnight commented 3 years ago

Are you actually setting Chain_complete_list in your config or is this just an example? I'd make sure that you're setting vim.g.completion_chain_complete_list.

ranjithshegde commented 3 years ago

well I have tried both.. But now somehow with the same config it works. Possible some other plugin was interfering. I have no idea. Closing for now