return { -- lspconfig { "neovim/nvim-lspconfig", ---@class PluginLspOpts -- init = function () local keys = require("lazyvim.plugins.lsp.keymaps").get() -- TODO: setup a new mapping for this -- { "gr", "Telescope lsp_references", desc = "References" }, keys[#keys+1] = { "gr", false } end, opts = { -- Automatically format on save -- autoformat = false, -- LSP Server Settings ---@type lspconfig.options servers = { lua_ls = { settings = { Lua = { diagnostics = { disable = { "missing-fields", }, }, }, }, }, -- Add clangd extensions -- https://github.com/p00f/clangd_extensions.nvim ruff_lsp = { root_dir = function(fname) return require("lspconfig.util").root_pattern("pyproject.toml", "setup.cfg", "ruff.toml")(fname) end, }, pylsp = { settings = { pylsp = { plugins = { autopep8 = { enabled = false }, flake8 = { enabled = false }, mccabe = { enabled = false }, pycodestyle = { enabled = false }, pydocstyle = { enabled = false }, pyflakes = { enabled = false }, -- covered by flake8 } } } } }, -- you can do any additional lsp server setup here -- return true if you don't want this server to be setup with lspconfig ---@type table setup = { -- example to setup with typescript.nvim -- tsserver = function(_, opts) -- require("typescript").setup({ server = opts }) -- return true -- end, -- Specify * to use this function as a fallback for any server -- ["*"] = function(server, opts) end, }, }, }, }