First commit.
This commit is contained in:
commit
164e828e70
22 changed files with 1241 additions and 0 deletions
44
after/plugin/autopairs.lua
Normal file
44
after/plugin/autopairs.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
require("nvim-autopairs").setup {}
|
||||
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local cmp = require('cmp')
|
||||
local handlers = require('nvim-autopairs.completion.handlers')
|
||||
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
cmp_autopairs.on_confirm_done({
|
||||
filetypes = {
|
||||
-- "*" is a alias to all filetypes
|
||||
["*"] = {
|
||||
["("] = {
|
||||
kind = {
|
||||
cmp.lsp.CompletionItemKind.Function,
|
||||
cmp.lsp.CompletionItemKind.Method,
|
||||
},
|
||||
handler = handlers["*"]
|
||||
}
|
||||
},
|
||||
lua = {
|
||||
["("] = {
|
||||
kind = {
|
||||
cmp.lsp.CompletionItemKind.Function,
|
||||
cmp.lsp.CompletionItemKind.Method
|
||||
},
|
||||
---@param char string
|
||||
---@param item table item completion
|
||||
---@param bufnr number buffer number
|
||||
---@param rules table
|
||||
---@param commit_character table<string>
|
||||
handler = function(char, item, bufnr, rules, commit_character)
|
||||
-- Your handler function. Inpect with print(vim.inspect{char, item, bufnr, rules, commit_character})
|
||||
end
|
||||
}
|
||||
},
|
||||
-- Disable for tex
|
||||
tex = false,
|
||||
sh = false,
|
||||
bash = false,
|
||||
zsh = false,
|
||||
}
|
||||
})
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue