return { -- tools { "williamboman/mason.nvim", opts = function(_, opts) vim.list_extend(opts.ensure_installed, { "stylua", "selene", "luacheck", "shellcheck", "shfmt", "tailwindcss-language-server", "typescript-language-server", "css-lsp", }) end, }, { "ray-x/lsp_signature.nvim", opts = {}, config = function(_, opts) require'lsp_signature'.setup(opts) end }, { 'nvimdev/lspsaga.nvim', config = function() require('lspsaga').setup({}) end, dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' -- optional } }, -- lsp servers { "neovim/nvim-lspconfig", opts = { inlay_hints = { enabled = false }, ---@type lspconfig.options servers = { cssls = {}, tailwindcss = { root_dir = function(...) return require("lspconfig.util").root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts', 'postcss.config.js', 'postcss.config.cjs', 'postcss.config.mjs', 'postcss.config.ts', 'package.json', 'node_modules', '.git')(...) end, }, tsserver = { root_dir = function(...) return require("lspconfig.util").root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git")(...) end, single_file_support = false, settings = { typescript = { inlayHints = { includeInlayParameterNameHints = "literal", includeInlayParameterNameHintsWhenArgumentMatchesName = false, includeInlayFunctionParameterTypeHints = true, includeInlayVariableTypeHints = false, includeInlayPropertyDeclarationTypeHints = true, includeInlayFunctionLikeReturnTypeHints = true, includeInlayEnumMemberValueHints = true, }, }, javascript = { inlayHints = { includeInlayParameterNameHints = "all", includeInlayParameterNameHintsWhenArgumentMatchesName = false, includeInlayFunctionParameterTypeHints = true, includeInlayVariableTypeHints = true, includeInlayPropertyDeclarationTypeHints = true, includeInlayFunctionLikeReturnTypeHints = true, includeInlayEnumMemberValueHints = true, }, }, }, }, html = {}, yamlls = { settings = { yaml = { keyOrdering = false, }, }, }, lua_ls = { -- enabled = false, single_file_support = true, settings = { Lua = { workspace = { checkThirdParty = false, }, completion = { workspaceWord = true, callSnippet = "Both", }, misc = { parameters = { -- "--log-level=trace", }, }, hint = { enable = true, setType = false, paramType = true, paramName = "Disable", semicolon = "Disable", arrayIndex = "Disable", }, doc = { privateName = { "^_" }, }, type = { castNumberToInteger = true, }, diagnostics = { disable = { "incomplete-signature-doc", "trailing-space" }, -- enable = false, groupSeverity = { strong = "Warning", strict = "Warning", }, groupFileStatus = { ["ambiguity"] = "Opened", ["await"] = "Opened", ["codestyle"] = "None", ["duplicate"] = "Opened", ["global"] = "Opened", ["luadoc"] = "Opened", ["redefined"] = "Opened", ["strict"] = "Opened", ["strong"] = "Opened", ["type-check"] = "Opened", ["unbalanced"] = "Opened", ["unused"] = "Opened", }, unusedLocalExclude = { "_*" }, }, format = { enable = false, defaultConfig = { indent_style = "space", indent_size = "2", continuation_indent_size = "2", }, }, }, }, }, gopls = { setup = { cmd = { "gopls", "serve" }, -- use cmd in path, I can update it easily settings = { gopls = { analyses = { nilness = true, unusedparams = true, unusedwrite = true, useany = true, }, staticcheck = false } }, root_dir = require 'lspconfig'.util.root_pattern(".git", "go.mod", "go.work"), init_options = { usePlaceholders = true, completeUnimported = true }, }, }, }, setup = {}, }, }, }