Feat: activate treesitter
This commit is contained in:
parent
e04c89b57a
commit
07de246f77
@ -66,32 +66,21 @@ cmp.setup{
|
||||
mapping = {
|
||||
-- ["<cr>"] = cmp.mapping.confirm({select = true, behavior = cmp.ConfirmBehavior.Replace}),
|
||||
["<Tab>"] = cmp.mapping.confirm({select = true, behavior = cmp.ConfirmBehavior.Insert}),
|
||||
-- ["<Tab>"] = cmp.mapping(function(fallback)
|
||||
-- if vim.fn.pumvisible() == 1 then
|
||||
-- feedkey("<C-n>", "n")
|
||||
-- elseif vim.fn["vsnip#available"]() == 1 then
|
||||
-- feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
||||
-- elseif has_words_before() then
|
||||
-- cmp.complete()
|
||||
-- else
|
||||
-- fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
|
||||
-- end
|
||||
-- end, { "i", "s" }),
|
||||
|
||||
-- ["<S-Tab>"] = cmp.mapping(function()
|
||||
-- if vim.fn.pumvisible() == 1 then
|
||||
-- feedkey("<C-p>", "n")
|
||||
-- elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
||||
-- feedkey("<Plug>(vsnip-jump-prev)", "")
|
||||
-- end
|
||||
-- end, { "i", "s" }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'vsnip' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer', keyword_length = 4 },
|
||||
{ name = 'spell', keyword_length = 4 },
|
||||
{
|
||||
name = 'buffer',
|
||||
keyword_length = 4,
|
||||
keyword_pattern = [[\d\@!\k\k*]],
|
||||
options = {
|
||||
-- keyword_pattern = [[\k\+]]-- for non ascii caracters
|
||||
keyword_pattern = [[\d\@!\k\k*]],
|
||||
}
|
||||
},
|
||||
-- { name = 'spell', keyword_length = 4 },
|
||||
},
|
||||
experimental = {
|
||||
-- I like the new menu better! Nice work hrsh7th
|
||||
|
@ -5,8 +5,8 @@ require'nvim-treesitter.configs'.setup {
|
||||
enable = true,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
enable = false,
|
||||
}
|
||||
}
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
-- vim.opt.foldmethod = "expr"
|
||||
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
|
Loading…
Reference in New Issue
Block a user