flippity fuck
This commit is contained in:
parent
e9a8b28907
commit
d5faa08253
11 changed files with 201 additions and 57 deletions
|
@ -1,19 +1,33 @@
|
|||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'neovim/nvim-lspconfig'
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-nvim-lua",
|
||||
"neovim/nvim-lspconfig",
|
||||
"mtoohey31/cmp-fish",
|
||||
"petertriho/cmp-git",
|
||||
},
|
||||
config= function()
|
||||
local cmp = require('cmp')
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{name = 'nvim_lsp'},
|
||||
{ name = "nvim_lua" },
|
||||
{
|
||||
name = "nvim_lsp",
|
||||
entry_filter = function(entry, ctx)
|
||||
local kind = require("cmp.types").lsp.CompletionItemKind[entry:get_kind()]
|
||||
|
||||
if kind == "Text" then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
},
|
||||
{ name = "neorg" },
|
||||
{ name = "fish" },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
|
@ -21,13 +35,25 @@ return {
|
|||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "git" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
}),
|
||||
require("cmp_git").setup(),
|
||||
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<S-NL>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-S-K>'] = cmp.mapping.scroll_docs(-4),
|
||||
[' '] = cmp.mapping.confirm(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<S-NL>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-S-K>"] = cmp.mapping.scroll_docs(-4),
|
||||
[" "] = cmp.mapping.confirm(),
|
||||
}),
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue