update completion
This commit is contained in:
@@ -49,3 +49,11 @@ autocmd({ 'BufWritePre' }, {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
autocmd({'FileType'}, {
|
||||||
|
group = CrentistGroup,
|
||||||
|
pattern = { 'json' },
|
||||||
|
callback = function (e)
|
||||||
|
vim.keymap.set("n", "<M-F>", function() vim.cmd('silent %!jq .') end, {buffer = e.buf})
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ return {
|
|||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
snippets = {
|
snippets = {
|
||||||
|
preset = 'luasnip',
|
||||||
expand = function(snippet) require('luasnip').lsp_expand(snippet) end,
|
expand = function(snippet) require('luasnip').lsp_expand(snippet) end,
|
||||||
active = function(filter)
|
active = function(filter)
|
||||||
if filter and filter.direction then
|
if filter and filter.direction then
|
||||||
@@ -20,7 +21,7 @@ return {
|
|||||||
jump = function(direction) require('luasnip').jump(direction) end,
|
jump = function(direction) require('luasnip').jump(direction) end,
|
||||||
},
|
},
|
||||||
|
|
||||||
completion = { list = { selection = "auto_insert" } },
|
completion = { list = { selection = { preselect = false, auto_insert = true } } },
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = 'enter',
|
preset = 'enter',
|
||||||
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' },
|
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' },
|
||||||
@@ -32,9 +33,12 @@ return {
|
|||||||
nerd_font_variant = 'mono'
|
nerd_font_variant = 'mono'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
cmdline = {
|
||||||
|
sources = {},
|
||||||
|
},
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
default = { 'lsp', 'luasnip', 'path', 'buffer' },
|
default = { 'lsp', 'snippets', 'path', 'buffer' },
|
||||||
cmdline = {},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
signature = { enabled = true }
|
signature = { enabled = true }
|
||||||
|
|||||||
Reference in New Issue
Block a user