Adding neodev plugin for better vim lsp

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2023-09-18 19:27:43 +02:00
parent 44e4e8addf
commit 0bb96dc00c
3 changed files with 15 additions and 5 deletions

View File

@@ -1,11 +1,17 @@
return {
"neovim/nvim-lspconfig",
dependencies = "hrsh7th/cmp-nvim-lsp",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"folke/neodev.nvim",
},
event = { "BufReadPre", "BufNewFile" },
config = function()
local neodev = require("neodev")
local lspconfig = require("lspconfig")
local cmp_nvim_lsp = require("cmp_nvim_lsp")
neodev.setup({})
local on_attach = function(client, bufnr)
local opts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts)
@@ -56,6 +62,9 @@ return {
diagnostics = {
globals = { "vim" },
},
completion = {
callSnippet = "Replace",
},
},
},
})