mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
Trying to fix snippets
This commit is contained in:
parent
4bef218455
commit
29dc93d387
2 changed files with 8 additions and 2 deletions
|
|
@ -53,17 +53,17 @@ vim.cmd [[
|
|||
local luasnip = require 'luasnip'
|
||||
|
||||
cmp.setup {
|
||||
-- other configurations...
|
||||
mapping = {
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-n>', true, true, true), 'n')
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-y>', true, true, true), 'n')
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<Plug>luasnip-expand-or-jump', true, true, true), '')
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes('<C-p>', true, true, true), 'n')
|
||||
|
|
@ -73,6 +73,11 @@ cmp.setup {
|
|||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
|
||||
['<CR>'] = cmp.mapping(function(fallback)
|
||||
fallback()
|
||||
end, { 'i', 's' }),
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@
|
|||
nil
|
||||
marksman
|
||||
sumneko-lua-language-server
|
||||
stylua
|
||||
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue