vim.diagnostic.config({ virtual_text = true, signs = true, underline = true, severity_sort = true, }) vim.lsp.config['ccls'] = { cmd = { 'ccls' }, root_markers = { '.ccls-cache', '.ccls' }, filetypes = { 'c', 'cpp', 'cc', 'h' }, } vim.lsp.config['rust_analyzer'] = { cmd = { 'rust-analyzer' }, root_markers = { 'Cargo.toml' }, filetypes = { 'rs' }, } vim.lsp.config['gopls'] = { cmd = { 'gopls' }, root_markers = { 'go.mod', 'go.work' }, filetypes = { 'go' }, } vim.lsp.config['lua_ls'] = { cmd = { 'lua-language-server' }, root_markers = { '.luarocks', '.git' }, filetypes = { 'lua' }, settings = { Lua = { runtime = { version = 'LuaJIT', path = vim.split(package.path, ';'), }, diagnostics = { globals = { 'vim' }, }, workspace = { library = vim.api.nvim_get_runtime_file("", true), }, telemetry = { enable = false, }, }, }, } vim.lsp.enable('ccls') vim.lsp.enable('rust_analyzer') vim.lsp.enable('gopls') vim.lsp.enable('lua_ls')