update nvim config to use lazynvim
This commit is contained in:
parent
3f51767fbe
commit
867a86f153
18 changed files with 366 additions and 273 deletions
|
@ -1,42 +0,0 @@
|
|||
-- Set the following keybinds only after LSP attachment
|
||||
local on_attach = function(_, bufnr)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
end
|
||||
|
||||
-- Initialize servers that don't need any extra config
|
||||
local simple_servers = {}
|
||||
for _, lsp in pairs(simple_servers) do
|
||||
require("lspconfig")[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- LSP: Lua (Sumneko)
|
||||
local runtime_path = vim.split(package.path, ";")
|
||||
table.insert(runtime_path, "lua/?.lua")
|
||||
table.insert(runtime_path, "lua/?/init.lua")
|
||||
|
||||
require("lspconfig").sumneko_lua.setup {
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
path = runtime_path,
|
||||
},
|
||||
diagnostics = {
|
||||
globals = {"vim"},
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue