updated configuration

This commit is contained in:
2026-01-12 23:12:11 -07:00
parent 6d79fde026
commit dc98d50a31
14 changed files with 1219 additions and 224 deletions

194
lua/plugins/lsp.lua Normal file
View File

@@ -0,0 +1,194 @@
-- LSP Configuration
-- Extends LazyVim's built-in LSP support
return {
-- Mason: manage LSP servers, linters, formatters
{
"mason-org/mason.nvim",
opts = {
ensure_installed = {
-- LSP servers
"gopls", -- Go
"lua-language-server", -- Lua
"typescript-language-server", -- TypeScript/JavaScript
"html-lsp", -- HTML
"css-lsp", -- CSS
"json-lsp", -- JSON
"yaml-language-server", -- YAML
"marksman", -- Markdown
"sqlls", -- SQL
-- Linters
"golangci-lint",
"eslint_d",
"markdownlint",
-- Formatters
"gofumpt",
"goimports",
"prettier",
"stylua",
"sql-formatter",
-- DAP
"delve", -- Go debugger
},
},
},
-- LSP configuration
{
"neovim/nvim-lspconfig",
opts = {
servers = {
-- Go
gopls = {
settings = {
gopls = {
gofumpt = true,
codelenses = {
gc_details = false,
generate = true,
regenerate_cgo = true,
run_govulncheck = true,
test = true,
tidy = true,
upgrade_dependency = true,
vendor = true,
},
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
constantValues = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
analyses = {
fieldalignment = true,
nilness = true,
unusedparams = true,
unusedwrite = true,
useany = true,
},
usePlaceholders = true,
completeUnimported = true,
staticcheck = true,
directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" },
semanticTokens = true,
},
},
},
-- Lua
lua_ls = {
settings = {
Lua = {
workspace = {
checkThirdParty = false,
},
completion = {
callSnippet = "Replace",
},
diagnostics = {
globals = { "vim" },
},
},
},
},
-- TypeScript/JavaScript
ts_ls = {
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
},
},
-- HTML
html = {
filetypes = { "html", "templ" },
},
-- CSS
cssls = {},
-- JSON
jsonls = {},
-- YAML
yamlls = {
settings = {
yaml = {
keyOrdering = false,
schemas = {
["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
["https://json.schemastore.org/docker-compose.json"] = "docker-compose*.yml",
},
},
},
},
-- Markdown
marksman = {},
-- SQL
sqlls = {},
},
},
},
-- Treesitter for better syntax highlighting
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"go",
"gomod",
"gowork",
"gosum",
"lua",
"luadoc",
"typescript",
"javascript",
"tsx",
"html",
"css",
"json",
"jsonc",
"yaml",
"markdown",
"markdown_inline",
"sql",
"make",
"vim",
"vimdoc",
"bash",
"regex",
"diff",
"gitcommit",
"git_rebase",
},
highlight = { enable = true },
indent = { enable = true },
},
},
}