nvim-cmp icon indicating copy to clipboard operation
nvim-cmp copied to clipboard

feat: `enabled` for sources

Open ssiyad opened this issue 2 years ago • 1 comments

This PR adds enabled for individual sources.

This option can be used to toggle source based on context/conditions (https://github.com/hrsh7th/nvim-cmp/issues/806). I wanted dictionary to be enabled only in comments and, I was able to achieve that by

enabled = function (ctx)
    return context.in_treesitter_capture('comment')
end

ssiyad avatar Nov 19 '22 21:11 ssiyad

Is there anything blocking this PR?

MariaSolOs avatar Sep 23 '23 00:09 MariaSolOs

@hrsh7th anyway we can get this PR through?

PeterCardenas avatar Feb 18 '24 06:02 PeterCardenas