]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/lua/plugins/lsp.lua
nvim: import full lspconfig spec from lazyvim
[dotfiles.git] / nvim / lua / plugins / lsp.lua
index 3354f7d22a3f0005fa5a3e1b6d73cdf585794a46..aa4f1848166e2c8bf167328f33630d9a05e904a6 100644 (file)
@@ -12,6 +12,39 @@ return {
       keys[#keys+1] = { "gr", false }
     end,
     opts = {
+      diagnostics = {
+        underline = true,
+        update_in_insert = false,
+        virtual_text = {
+          spacing = 4,
+          source = "if_mani",
+          prefix = "●",
+        },
+        severity_sort = true,
+        signs = {
+          text = {
+            [vim.diagnostic.severity.ERROR] = " ",
+            [vim.diagnostic.severity.WARN]  = " ",
+            [vim.diagnostic.severity.HINT]  = " ",
+            [vim.diagnostic.severity.INFO]  = " ",
+          },
+        },
+      },
+      inlay_hints = { enabled = false, },
+      codelens = { enabled = false, },
+      document_highlight = { enabled = true, },
+      capabilities = {
+        workspace = {
+          fileOperations = {
+            didRename = true,
+            willRename = true,
+          },
+        },
+      },
+      format = {
+        formatting_options = nil,
+        timeout_ms = nil,
+      },
       -- Automatically format on save
       -- autoformat = false,
       -- LSP Server Settings
@@ -20,6 +53,18 @@ return {
         lua_ls = {
           settings = {
             Lua = {
+              workspace = { checkThirdParty = false, },
+              codeLens = { enable = true, },
+              completion = { callSnippet = "Replace", },
+              doc = { privateName = { "^_" }, },
+              hint = {
+                enable = true,
+                setType = false,
+                paramType = true,
+                paramName = "Disable",
+                semicolon = "Disable",
+                arrayIndex = "Disable",
+              },
               diagnostics = {
                 disable = { "missing-fields", },
               },
@@ -28,25 +73,6 @@ return {
         },
         -- 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