Compare commits
No commits in common. "12a5420ee928e05fddb522aad77a8a52874e52b3" and "78bad0191497397f6019a50437f3fb9fd60d1d7b" have entirely different histories.
12a5420ee9
...
78bad01914
3 changed files with 1 additions and 41 deletions
|
@ -79,12 +79,6 @@ with builtins;
|
||||||
conf = readFile ./nvim-cmp.lua;
|
conf = readFile ./nvim-cmp.lua;
|
||||||
event = [ "InsertEnter" ];
|
event = [ "InsertEnter" ];
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{
|
|
||||||
plugin = nvim-autopairs;
|
|
||||||
conf = /* lua */ ''
|
|
||||||
require("nvim-autopairs").setup({})
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
{ plugin = cmp-async-path; }
|
{ plugin = cmp-async-path; }
|
||||||
{ plugin = cmp-buffer; }
|
{ plugin = cmp-buffer; }
|
||||||
{ plugin = cmp-cmdline; }
|
{ plugin = cmp-cmdline; }
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
require("mini.align").setup()
|
require("mini.align").setup()
|
||||||
require("mini.move").setup()
|
require("mini.move").setup()
|
||||||
|
require("mini.pairs").setup()
|
||||||
require("mini.starter").setup()
|
require("mini.starter").setup()
|
||||||
|
|
||||||
require("mini.statusline").setup({
|
require("mini.statusline").setup({
|
||||||
|
|
|
@ -76,39 +76,4 @@ cmp.setup.cmdline(":", {
|
||||||
}, {
|
}, {
|
||||||
{ name = "cmdline" },
|
{ name = "cmdline" },
|
||||||
}),
|
}),
|
||||||
enabled = function()
|
|
||||||
-- Set of commands where cmp will be disabled
|
|
||||||
local disabled = {
|
|
||||||
IncRename = true,
|
|
||||||
}
|
|
||||||
-- Get first word of cmdline
|
|
||||||
local cmd = vim.fn.getcmdline():match("%S+")
|
|
||||||
-- Return true if cmd isn't disabled
|
|
||||||
-- else call/return cmp.close(), which returns false
|
|
||||||
return not disabled[cmd] or cmp.close()
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
-- If you want insert `(` after select function or method item
|
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.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["*"],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Disable for functional languages
|
|
||||||
haskell = false,
|
|
||||||
nix = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
)
|
|
||||||
|
|
Loading…
Reference in a new issue