Forgot what a bunch of plugins did so I cleared out the unwated ones and put comments with descriptions of what the plugins do for the more unknown ones. Bonus - great plugin idea! Add comments to you config file about what the plugin does OR an cmp/blink type app that grabs the description from the repo.
This commit is contained in:
@ -1,49 +1,58 @@
|
||||
return {
|
||||
'saghen/blink.cmp',
|
||||
lazy = false, -- lazy loading handled internally
|
||||
-- optional: provides snippets for the snippet source
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'rafamadriz/friendly-snippets',
|
||||
'L3MON4D3/LuaSnip',
|
||||
'L3MON4D3/LuaSnip', version = 'v2.*',
|
||||
},
|
||||
version = 'v0.*',
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
preset = "default",
|
||||
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
['<C-e>'] = { 'hide', 'fallback' },
|
||||
['<Tab>'] = {
|
||||
function(cmp)
|
||||
if cmp.snippet_active() then return cmp.accept()
|
||||
else return cmp.select_and_accept() end
|
||||
end,
|
||||
'snippet_forward',
|
||||
'fallback'
|
||||
},
|
||||
['<S-Tab>'] = { 'snippet_backward', 'fallback' },
|
||||
|
||||
["<Tab>"] = {
|
||||
"select_next",
|
||||
"snippet_forward",
|
||||
"fallback",
|
||||
},
|
||||
['<Up>'] = { 'select_prev', 'fallback' },
|
||||
['<Down>'] = { 'select_next', 'fallback' },
|
||||
['<C-p>'] = { 'select_prev', 'fallback' },
|
||||
['<C-n>'] = { 'select_next', 'fallback' },
|
||||
|
||||
["<S-Tab>"] = {
|
||||
"select_prev",
|
||||
"snippet_backward",
|
||||
"fallback",
|
||||
},
|
||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
||||
['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
|
||||
},
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = 'normal',
|
||||
},
|
||||
completion = {
|
||||
menu = { auto_show = function(ctx) return ctx.mode ~= 'cmdline' end },
|
||||
-- keyword = { range = 'prefix', regex = '[%w_\\-]'},
|
||||
-- trigger = { show_on_blocked_trigger_characters = function()
|
||||
-- if vim.api.nvim_get_mode().mode == 'c' then return {} end
|
||||
-- return { ' ', '\n', '\t' }
|
||||
-- end },
|
||||
},
|
||||
snippets = {
|
||||
expand = function(snippet) require('luasnip').lsp_expand(snippet) end,
|
||||
active = function(filter)
|
||||
if filter and filter.direction then
|
||||
return require('luasnip').jumpable(filter.direction)
|
||||
end
|
||||
return require('luasnip').in_snippet()
|
||||
end,
|
||||
jump = function(direction) require('luasnip').jump(direction) end,
|
||||
},
|
||||
|
||||
highlight = {
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = 'normal',
|
||||
}
|
||||
},
|
||||
trigger = {
|
||||
completion = {
|
||||
keyword_regex = '[%w_\\-]',
|
||||
blocked_trigger_characters = { ' ', '\n', '\t' },
|
||||
show_on_insert_on_trigger_character = true,
|
||||
}
|
||||
},
|
||||
sources = {
|
||||
providers = {
|
||||
{
|
||||
{ 'blink.cmp.sources.lsp' },
|
||||
{ 'blink.cmp.sources.path' },
|
||||
{ 'blink.cmp.sources.snippets', score_offset = -1 },
|
||||
},
|
||||
{ { 'blink.cmp.sources.buffer' } },
|
||||
}
|
||||
},
|
||||
default = {'lsp', 'path', 'snippets', 'buffer'},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user