all repos

dotfiles @ a6d1f45fd60ac16f4498c560b6e9b9b8962a0c74

my dotfiles

config/nvim/lua/lsp/init.lua (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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