local utils = require("nvim-lsp-setup.utils") local nvim_runtime_path = vim.split(package.path, ";") table.insert(nvim_runtime_path, "lua/?.lua") table.insert(nvim_runtime_path, "lua/?/init.lua") require("nvim-lsp-setup").setup({ default_mappings = false, mappings = { gD = "lua vim.lsp.buf.declaration()", gd = "Telescope lsp_definitions", gt = "Telescope lsp_type_definitions", gi = "Telescope lsp_implementations", gr = "Telescope lsp_references", K = "lua vim.lsp.buf.hover()", [""] = "lua vim.lsp.buf.signature_help()", ["rn"] = "lua vim.lsp.buf.rename()", ["ca"] = "Telescope lsp_code_actions theme=cursor", ["f"] = "lua vim.lsp.buf.formatting()", ["e"] = "lua vim.lsp.diagnostic.show_line_diagnostics()", ["d"] = "Telescope diagnostics", [""] = "lua vim.diagnostic.goto_prev()", [""] = "lua vim.diagnostic.goto_next()", }, on_attach = function(client) utils.format_on_save(client) require("illuminate").on_attach(client) end, servers = { ansiblels = {}, bashls = {}, dockerls = {}, eslint = {}, jsonls = {}, pylsp = {}, rust_analyzer = require("nvim-lsp-setup.rust-tools").setup({ server = { settings = { ["rust-analyzer"] = { cargo = { loadOutDirsFromCheck = true, }, checkOnSave = { command = "clippy" }, procMacro = { enable = true, }, }, }, }, }), sumneko_lua = { settings = { Lua = { runtime = { version = "LuaJIT", path = nvim_runtime_path }, diagnostics = { globals = { "vim" } }, workspace = { library = vim.api.nvim_get_runtime_file("", true) }, telemetry = { enable = false } } } }, terraformls = {}, volar = {}, }, })