mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Squashed 'config/nvim/' content from commit 0bd687c
git-subtree-dir: config/nvim git-subtree-split: 0bd687c8b69605fa1c7c88222354158b1c2de2f8
This commit is contained in:
commit
f4858d42a8
36 changed files with 906 additions and 0 deletions
22
lua/lsp/init.lua
Normal file
22
lua/lsp/init.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
local on_attach = require "lsp.attach"
|
||||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
require("nvim-lsp-installer").on_server_ready(function(server)
|
||||
local opts = { on_attach = on_attach }
|
||||
|
||||
local ok, server_opts = pcall(require, "lsp.providers." .. server.name)
|
||||
if ok then
|
||||
opts = vim.tbl_deep_extend("force", opts, server_opts or {})
|
||||
end
|
||||
|
||||
server:setup(opts)
|
||||
|
||||
vim.cmd [[ do User LspAttachBuffers ]]
|
||||
|
||||
require("lsp.null").setup()
|
||||
require("lspconfig")["null-ls"].setup {}
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue