completion: set buffer completion to 4 chars

- Set the keyword_length to 4 in order to lighten the buffer completion.
- Add a markdown snippet to add a tags line in my incremental notes.

Co-Authored-by: iGor milhit <igor@milhit.ch>
iGor milhit 2023-06-28 07:22:51 +02:00
parent e3e920572d
commit c940b3f6af
Signed by: igor
GPG Key ID: 692D97C3D0228A99
4 changed files with 29 additions and 7 deletions

View File

@ -588,7 +588,12 @@ cmp.setup {
}, },
sources = { sources = {
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'buffer' }, {
name = 'buffer',
option = {
keyword_length = 4,
},
},
{ name = 'luasnip' }, { name = 'luasnip' },
{ name = 'path' }, { name = 'path' },
}, },

View File

@ -147,5 +147,20 @@ return {
}, },
{ repeat_duplicates = true } { repeat_duplicates = true }
) )
),
s(
{
trig = "tags",
name = "Tags",
dscr = "Insert a one-line tags array, in a text file (markdown)."
},
fmt(
[[
tags: [{}]
]],
{
i(1, "tags")
}
)
) )
} }

View File

@ -6,3 +6,5 @@ neovim
lua lua
InfoBiblio InfoBiblio
Réaménagement Réaménagement
biodiversité
hyperindustrialisés

Binary file not shown.