mass update
This commit is contained in:
parent
d5faa08253
commit
c613a6d0e3
21 changed files with 361 additions and 128 deletions
|
|
@ -1,59 +1,79 @@
|
|||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"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")
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"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")
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{ name = "nvim_lua" },
|
||||
{
|
||||
name = "nvim_lsp",
|
||||
entry_filter = function(entry, ctx)
|
||||
local kind = require("cmp.types").lsp.CompletionItemKind[entry:get_kind()]
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{
|
||||
name = "lazydev",
|
||||
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
|
||||
},
|
||||
{ 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
|
||||
if kind == "Text" then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
},
|
||||
{ name = "neorg" },
|
||||
{ name = "fish" },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
-- You need Neovim v0.10 to use vim.snippet
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
{ name = "neorg" },
|
||||
{ name = "fish" },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
-- You need Neovim v0.10 to use vim.snippet
|
||||
vim.snippet.expand(args.body)
|
||||
end,
|
||||
},
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "git" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "git" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
require("cmp_git").setup(),
|
||||
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(),
|
||||
}),
|
||||
})
|
||||
end,
|
||||
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(),
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
config = function()
|
||||
local lazydev = require("lazydev")
|
||||
require("lazydev").setup()
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.config("lua_ls", {
|
||||
root_dir = function(bufnr, on_dir)
|
||||
on_dir(lazydev.find_workspace(bufnr))
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue