big changes

This commit is contained in:
Alex Muszynski
2025-09-16 11:30:40 -04:00
parent 7ba677f20a
commit cf8447c347
10 changed files with 44 additions and 68 deletions
+34 -2
View File
@@ -154,10 +154,41 @@ return { -- LSP Configuration & Plugins
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local lspconfig = require 'lspconfig'
local root_patterns = { 'CMakeLists.txt', '.git' }
local servers = {
clangd = {},
clangd = {
-- tell clangd where to find compile_commands.json
cmd = {
'clangd',
'--background-index',
'--clang-tidy',
'--compile-commands-dir=build', -- <-- point at the build folder
},
root_dir = lspconfig.util.root_pattern(unpack(root_patterns)),
-- clangd auto-detects filetypes c/cpp/etc.
},
arduino_language_server = {
-- point at the binary (Mason puts it on your PATH)
cmd = {
'arduino-language-server',
'-cli',
'arduino-cli',
'-cli-config',
os.getenv 'HOME' .. '/.arduino15/arduino-cli.yaml',
'-fqbn',
'arduino:avr:uno', -- <- replace with your boards FQBN
'--verbose',
},
filetypes = { 'arduino', 'ino', 'pde' },
root_dir = function(fname)
return lspconfig.util.root_pattern('*.ino', '.git')(fname) or vim.loop.cwd()
end,
settings = {}, -- no extra settings for now
},
gopls = {},
pyrefly = {},
--pyright = {},
rust_analyzer = {},
markdownlint = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
@@ -207,7 +238,8 @@ return { -- LSP Configuration & Plugins
'typescript-language-server',
-- Python
'ruff',
'pyright',
'pyrefly',
--'pyright',
-- C
'clangd',
-- markdown