update completion

This commit is contained in:
2025-02-18 17:31:23 +02:00
parent f7ff3f6f4f
commit 66fd13ec25
2 changed files with 15 additions and 3 deletions

View File

@@ -49,3 +49,11 @@ autocmd({ 'BufWritePre' }, {
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
})

View File

@@ -10,6 +10,7 @@ return {
opts = {
snippets = {
preset = 'luasnip',
expand = function(snippet) require('luasnip').lsp_expand(snippet) end,
active = function(filter)
if filter and filter.direction then
@@ -20,7 +21,7 @@ return {
jump = function(direction) require('luasnip').jump(direction) end,
},
completion = { list = { selection = "auto_insert" } },
completion = { list = { selection = { preselect = false, auto_insert = true } } },
keymap = {
preset = 'enter',
['<Tab>'] = { 'select_next', 'snippet_forward', 'fallback' },
@@ -32,9 +33,12 @@ return {
nerd_font_variant = 'mono'
},
cmdline = {
sources = {},
},
sources = {
default = { 'lsp', 'luasnip', 'path', 'buffer' },
cmdline = {},
default = { 'lsp', 'snippets', 'path', 'buffer' },
},
signature = { enabled = true }