completion: support non ascii with cmp-buffer
- Supports non ASCII chars in text completion (cmp-buffer). - Restore the luasnip configuration inside the nvim-cmp configuration, as it is indeed closely related. I didn't understood it in the first place. Co-Authored-by: iGor milhit <igor@milhit.ch>
parent
43841e7a5b
commit
e5298b6bb3
9
init.lua
9
init.lua
|
@ -547,7 +547,9 @@ mason_lspconfig.setup_handlers {
|
|||
end,
|
||||
}
|
||||
|
||||
-- [[ Configure LuaSnip ]]
|
||||
-- [[ Configure nvim-cmp, and LuaSnip ]]
|
||||
-- See `:help cmp`
|
||||
local cmp = require 'cmp'
|
||||
local luasnip = require 'luasnip'
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
luasnip.config.setup {
|
||||
|
@ -566,10 +568,6 @@ require("luasnip.loaders.from_lua").load({paths = "~/.config/nvim/my_snippets/"}
|
|||
-- https://www.ejmastnak.com/tutorials/vim-latex/luasnip/#refreshing-snippets-from-a-separate-vim-instance
|
||||
vim.keymap.set('n', '<Leader>L', '<Cmd>lua require("luasnip.loaders.from_lua").load({paths = "~/.config/nvim/my_snippets/"})<CR>', { desc = 'Reload [L]uaSnippets' })
|
||||
|
||||
-- [[ Configure nvim-cmp ]]
|
||||
-- See `:help cmp`
|
||||
local cmp = require 'cmp'
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
|
@ -611,6 +609,7 @@ cmp.setup {
|
|||
name = 'buffer',
|
||||
option = {
|
||||
keyword_length = 4,
|
||||
keyword_pattern = [[\k\+]],
|
||||
},
|
||||
},
|
||||
{ name = 'luasnip' },
|
||||
|
|
Loading…
Reference in New Issue