fix: editor updates
This commit is contained in:
parent
54a77fb640
commit
97aa1d9a28
4 changed files with 18 additions and 17 deletions
|
@ -1,7 +1,10 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-nvim-lsp" },
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
|
@ -30,16 +33,13 @@ return {
|
|||
fallback()
|
||||
end
|
||||
end, { "i" }),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behaviour = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
}),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
|
||||
sources = cmp.config.sources({
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
event = "VeryLazy",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
@ -22,6 +23,7 @@ return {
|
|||
hide_gitignored = true,
|
||||
always_show = {
|
||||
".env",
|
||||
".env.local",
|
||||
},
|
||||
never_show = {
|
||||
".git",
|
||||
|
|
|
@ -37,18 +37,16 @@ return {
|
|||
opts = {
|
||||
servers = {
|
||||
tsserver = {},
|
||||
lua_ls = {}
|
||||
lua_ls = {},
|
||||
}
|
||||
},
|
||||
config = function(_, opts)
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local servers = opts.servers
|
||||
|
||||
for server, server_opts in pairs(servers) do
|
||||
local sopts = vim.tbl_deep_extend("force", server_opts, capabilities)
|
||||
lspconfig[server].setup(sopts)
|
||||
lspconfig[server].setup(server_opts)
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue