feat: configure blink.cmp

This commit is contained in:
ZotyDev 2026-02-23 14:54:34 -03:00
parent 01a7ce066a
commit 5119403850
Signed by: Zoty
SSH key fingerprint: SHA256:WsGEGivgl37t3Mth6uugXMOgMCTR7QolIepNbC+j/tA
6 changed files with 57 additions and 4 deletions

15
lua/plugins/autopairs.lua Normal file
View file

@ -0,0 +1,15 @@
return {
{
'windwp/nvim-autopairs',
event = "InsertEnter",
config = true,
},
{
'windwp/nvim-ts-autotag',
ft = { 'html', 'jsx', 'tsx', 'xml', 'svelte', 'vue' },
config = true,
},
{
'RRethy/nvim-treesitter-endwise',
},
}

View file

@ -6,11 +6,28 @@ return {
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
keymap = { preset = 'default' },
keymap = {
preset = 'none',
['<C-space>'] = { 'show', 'fallback' },
['<C-e>'] = { 'cancel', 'fallback' },
['<CR>'] = { 'accept', 'fallback' },
['<Tab>'] = { 'select_next', 'fallback' },
['<S-Tab>'] = { 'select_prev', 'fallback' },
['<C-n>'] = { 'select_next', 'fallback' },
['<C-p>'] = { 'select_prev', 'fallback' },
['<C-d>'] = { 'scroll_documentation_down', 'fallback' },
['<C-u>'] = { 'scroll_documentation_up', 'fallback' },
},
completion = {
trigger = {
show_on_insert_on_trigger_character = false,
},
documentation = {
auto_show = false,
},
menu = {
auto_show = true,
},
},
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' }
@ -20,4 +37,3 @@ return {
},
},
}

View file

@ -2,4 +2,18 @@ return {
'mrcjkb/rustaceanvim',
version = '^8',
lazy = false,
init = function()
vim.g.rustaceamvim = {
server = {
settings = {
['rust-analyzer'] = {
completion = {
postfix = { enable = true },
autoimport = { enable = true },
},
},
},
},
}
end,
}