Adding neodev plugin for better vim lsp
Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
@@ -21,10 +21,10 @@ opt.softtabstop = 4
|
||||
opt.shiftwidth = 4
|
||||
opt.expandtab = true
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
||||
opt.swapfile = false
|
||||
opt.backup = false
|
||||
opt.undofile = true
|
||||
opt.undodir = vim.fn.expand("~") .. "/.vim/undodir"
|
||||
|
||||
opt.smartindent = true
|
||||
opt.wrap = false
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user