aboutsummaryrefslogtreecommitdiff
path: root/Common/nvim/lua/lsp-conf.lua
blob: ec1754b0e3aa079341d735a6fa23b9844983d838 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require("mason").setup()
require("mason-lspconfig").setup({
    handlers = {
        function(server_name)
            vim.lsp.enable(server_name)
        end,
    }
})

vim.diagnostic.config({
    update_in_insert = true,
})

local highlights = {
    DiagnosticUnderlineError = { underline = false, bg = "LightRed" },
    DiagnosticUnderlineWarn  = { sp = "Orange", undercurl = true },
    DiagnosticUnderlineInfo  = { sp = "Cyan", undercurl = true },
    DiagnosticUnderlineHint  = { sp = "Cyan", undercurl = true },
    DiagnosticUnderlineOK = { underline = false },

    DiagnosticFloatingHint   = { link = "Normal" },
    DiagnosticFloatingInfo   = { link = "Normal" },
    DiagnosticFloatingWarn   = { link = "Normal" },
    DiagnosticFloatingOk     = { fg = "Green" },
}

for group, settings in pairs(highlights) do
    vim.api.nvim_set_hl(0, group, settings)
end

vim.opt.updatetime = 300
vim.opt.signcolumn = 'yes'
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist)