summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/custom/config/language-servers.lua
blob: a88258d53ef124c024832d92e758bb212537f6c3 (plain)
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
34
35
36
37
38
39
40
41
42
-- NOTE: a table or true to enable, false to disable
return {
    lua_ls = {
        settings = {
            diagnostics = { globals = { 'vim' } },
            telemetry = { enabled = false },
            hint = { enable = true },
            workspace = {
                library = {
                    [vim.fn.expand('$VIMRUNTIME/lua')] = true,
                    [vim.fn.stdpath('config') .. '/lua'] = true,
                },
            },
        },
    }, -- lua
    clangd = {
        cmd = { 'clangd', '--clang-tidy' },
        root_dir = function(fname)
            return require('lspconfig/util').root_pattern(
                '.clang-tidy',
                '.clang-format',
                'compile_commands.json',
                '.git'
            )(fname) or vim.fn.getcwd()
        end,
    }, -- c/cpp
    pyright = {
        settings = {
            python = {
                pythonPath = '~/python/venv/bin/python',
            },
        },
    }, -- python
    bashls = true, -- bash
    taplo = true, -- toml
    lemminx = true, -- xml
    yamlls = true, -- yaml
    jsonls = true, -- json
    html = true, -- html
    cssls = true, -- css
    tsserver = true, -- javascript/typescript
}