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 0fb6a4a7b4
commit 2ba65a9f5f
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 = {
{ name = 'nvim_lsp' },
{ name = 'buffer' },
{
name = 'buffer',
option = {
keyword_length = 4,
},
},
{ name = 'luasnip' },
{ name = 'path' },
},

View File

@ -86,12 +86,12 @@ return {
},
fmt(
[[
---
title: {1}
date: {3}
id: {4}
tags: [{2}]
---
---
title: {1}
date: {3}
id: {4}
tags: [{2}]
---
]],
{
@ -147,5 +147,20 @@ return {
},
{ 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
InfoBiblio
Réaménagement
biodiversité
hyperindustrialisés

Binary file not shown.