feat: complete LSP and formatter configuration

- Add missing LSPs: lua_ls, bashls, yamlls, jsonls, marksman, taplo, sqls
  - Add missing formatters: prettier, shfmt, sqlfluff, cmake_format
  - Configure ruff with import organization and auto-fixes
  - Tune basedpyright to reduce diagnostic noise (basic mode)

  All LSPs verified attaching and formatters working correctly.
This commit is contained in:
dlond 2025-10-08 23:10:35 +13:00
parent 611ed89f33
commit 647b352970
3 changed files with 93 additions and 39 deletions

14
.tmuxp.nvim.half.json Normal file
View File

@ -0,0 +1,14 @@
{
"session_name": "nvim",
"tmux_options": "-f /Users/dlond/.config/tmux/tmux.conf",
"windows": [
{
"window_name": "editor",
"layout": "even-vertical",
"panes": [
{ "shell_command": ["nvim ."] },
{ "shell_command": [] }
]
}
]
}

View File

@ -67,16 +67,21 @@ function M.get_servers()
analysis = { analysis = {
autoSearchPaths = true, autoSearchPaths = true,
diagnosticMode = 'openFilesOnly', diagnosticMode = 'openFilesOnly',
typeCheckingMode = 'standard', typeCheckingMode = 'basic',
useLibraryCodeForTypes = true, useLibraryCodeForTypes = true,
diagnosticSeverityOverrides = { diagnosticSeverityOverrides = {
reportOptionalCall = 'none', reportOptionalCall = 'none',
reportOptionalSubscript = 'none', reportOptionalSubscript = 'none',
reportOptionalMemberAccess = 'none',
reportOptionalIterable = 'none',
reportAttributeAccessIssue = 'none', reportAttributeAccessIssue = 'none',
reportUnknownMemberType = 'warning', reportUnknownMemberType = 'none',
reportUnknownVariableType = 'warning', reportUnknownVariableType = 'none',
reportUnknownAssignmentType = 'warning', reportUnknownArgumentType = 'none',
reportUnknownParameterType = 'none',
reportUnknownAssignmentType = 'none',
reportMissingTypeStubs = 'none',
}, },
}, },
}, },
@ -99,6 +104,41 @@ function M.get_servers()
root_dir = util.root_pattern('CMakeLists.txt', '.git'), root_dir = util.root_pattern('CMakeLists.txt', '.git'),
}, },
-- Lua Language Server
lua_ls = {
settings = {
Lua = {
runtime = { version = 'LuaJIT' },
diagnostics = {
globals = { 'vim' },
},
workspace = {
library = vim.api.nvim_get_runtime_file('', true),
checkThirdParty = false,
},
telemetry = { enable = false },
},
},
},
-- Bash Language Server
bashls = {},
-- YAML Language Server
yamlls = {},
-- JSON Language Server
jsonls = {},
-- Markdown Language Server
marksman = {},
-- TOML Language Server
taplo = {},
-- SQL Language Server
sqls = {},
-- Add more servers here as needed -- Add more servers here as needed
-- Example: -- Example:
-- rust_analyzer = { -- rust_analyzer = {

View File

@ -14,20 +14,20 @@ return {
lua = { 'stylua' }, lua = { 'stylua' },
c = { 'clang_format' }, c = { 'clang_format' },
cpp = { 'clang_format' }, cpp = { 'clang_format' },
-- Use ruff for Python formatting (includes isort and is faster than black python = { 'ruff_organize_imports', 'ruff_format', 'ruff_fix' },
-- Ensure 'ruff' is installed via Home Manager (pkgs.ruff)
python = { 'ruff_format', 'ruff_fix' },
-- python = { 'isort', 'black' },
nix = { 'alejandra' }, -- Add nix formatter nix = { 'alejandra' }, -- Add nix formatter
-- Add other filetypes and formatters, e.g.: -- Add other filetypes and formatters, e.g.:
-- javascript = { "prettier" }, javascript = { 'prettier' },
-- typescript = { "prettier" }, typescript = { 'prettier' },
-- css = { "prettier" }, css = { 'prettier' },
-- html = { "prettier" }, html = { 'prettier' },
-- json = { "prettier" }, json = { 'prettier' },
-- yaml = { "prettier" }, yaml = { 'prettier' },
-- markdown = { "prettier" }, markdown = { 'prettier' },
-- bash = { "shfmt" }, bash = { 'shfmt' },
sh = { 'shfmt' },
cmake = { 'cmake_format' },
sql = { 'sqlfluff' },
}, },
-- Configure format_on_save behavior -- Configure format_on_save behavior
format_on_save = { format_on_save = {