This commit is contained in:
Dominic DiTaranto 2026-03-07 16:11:49 -05:00
parent b9e9689708
commit f53c254f88
9 changed files with 229 additions and 51 deletions

View file

@ -85,3 +85,4 @@ if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
fi fi
export TERM="xterm-kitty" export TERM="xterm-kitty"
export PICO_SDK_PATH=/usr/share/pico-sdk

View file

@ -9,6 +9,8 @@ vim.o.linebreak = true
vim.o.ignorecase = true vim.o.ignorecase = true
vim.o.smartcase = true vim.o.smartcase = true
vim.o.smartindent = true
vim.o.indentexpr = ""
vim.o.inccommand = 'split' vim.o.inccommand = 'split'
vim.o.cursorline = true vim.o.cursorline = true
@ -34,6 +36,7 @@ vim.diagnostic.config({
require("config.keymaps") require("config.keymaps")
require("config.autocmds") require("config.autocmds")
require("config.plugins.autosave") require("config.plugins.autosave")
require("config.plugins.autopairs")
require("config.plugins.barbar") require("config.plugins.barbar")
require("config.plugins.blink") require("config.plugins.blink")
require("config.plugins.dashboard") require("config.plugins.dashboard")
@ -83,3 +86,31 @@ vim.lsp.config("lua_ls", {
}, },
}, },
}) })
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto' },
callback = function()
vim.lsp.start({
name = 'clangd',
cmd = {
'clangd',
'--background-index',
'--clang-tidy',
'--header-insertion=never',
-- Mandatory for Arch Linux to find ARM headers
'--query-driver=/usr/bin/arm-none-eabi*',
},
root_dir = vim.fs.dirname(vim.fs.find({ 'compile_commands.json', '.git' }, { upward = true })[1]),
init_options = {
fallbackFlags = {
-- Arch-specific paths (verify 14.2.0 matches your 'ls' output)
'-isystem', '/usr/arm-none-eabi/include',
'-isystem', '/usr/arm-none-eabi/include/c++/14.2.0',
'-isystem', '/usr/arm-none-eabi/include/c++/14.2.0/arm-none-eabi',
'--target=arm-none-eabi',
},
},
})
end,
})

View file

@ -0,0 +1,41 @@
return {
cmd = { "basedpyright-langserver", "--stdio" },
filetypes = { "python" },
root_markers = {
"pyproject.toml",
"setup.py",
"setup.cfg",
"requirements.txt",
"Pipfile",
"pyrightconfig.json",
".git",
},
on_attach = function(client, bufnr)
-- This specifically prevents BasedPyright from inserting a second bracket
client.server_capabilities.documentOnTypeFormattingProvider = false
end,
settings = {
basedpyright = {
analysis = {
diagnosticSeverityOverrides = {
reportAny = false,
reportOptionalOperand = "warning",
reportOptionalMemberAccess = false,
reportOptionalSubscript = false,
reportAttributeAccessIssue = false,
reportMissingTypeArgument = false,
reportMissingTypeStubs = false,
reportUnknownArgumentType = false,
reportUnknownMemberType = false,
reportUnknownParameterType = false,
reportUnknownVariableType = false,
reportUnusedCallResult = false,
},
autoSearchPaths = true,
useLibraryCodeForTypes = true,
diagnosticMode = "openFilesOnly",
typeCheckingMode = "basic",
},
},
},
}

View file

@ -0,0 +1,11 @@
return {
cmd = {
"clangd",
"--background-index",
"--clang-tidy",
"--header-insertion=never",
-- Mandatory for Arch Linux ARM toolchain
"--query-driver=/usr/bin/arm-none-eabi-*"
}
}

View file

@ -1,4 +1,4 @@
vim.lsp.config("pylsp", { return {
settings = { settings = {
pylsp = { pylsp = {
plugins = { plugins = {
@ -9,43 +9,5 @@ vim.lsp.config("pylsp", {
}, },
}, },
}, },
}) }
vim.lsp.config('basedpyright', {
cmd = { 'basedpyright-langserver', '--stdio' },
filetypes = { 'python' },
root_markers = {
'pyproject.toml',
'setup.py',
'setup.cfg',
'requirements.txt',
'Pipfile',
'pyrightconfig.json',
'.git',
},
settings = {
basedpyright = {
analysis = {
diagnosticSeverityOverrides = {
reportAny = false,
reportOptionalOperand = "warning",
reportOptionalMemberAccess = false,
reportOptionalSubscript = false,
reportAttributeAccessIssue = false,
reportMissingTypeArgument = false,
reportMissingTypeStubs = false,
reportUnknownArgumentType = false,
reportUnknownMemberType = false,
reportUnknownParameterType = false,
reportUnknownVariableType = false,
reportUnusedCallResult = false,
},
autoSearchPaths = true,
useLibraryCodeForTypes = true,
diagnosticMode = 'openFilesOnly',
typeCheckingMode = 'basic',
},
},
},
})

View file

@ -0,0 +1,10 @@
vim.pack.add({ "https://github.com/windwp/nvim-autopairs" })
require("nvim-autopairs").setup({
check_ts = true, -- Use treesitter to help with indentation
ts_config = {
python = { "string" }, -- Don't add pairs in python string nodes
},
map_cr = true,
enable_check_bracket_line = true,
})

View file

@ -20,5 +20,6 @@ require("mason-tool-installer").setup({
"ruff", "ruff",
"selene", "selene",
"stylua", "stylua",
"clangd",
}, },
}) })

View file

@ -11,7 +11,8 @@ vim.pack.add({
}) })
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
ensure_installed = {}, ensure_installed = {"python"},
indent = { enable = true },
modules = {}, modules = {},
sync_install = false, sync_install = false,
auto_install = true, auto_install = true,

View file

@ -0,0 +1,120 @@
{
"plugins": {
"asyncomplete-lsp.vim": {
"rev": "d5d91e1ad70edb00368c11d3e81008835ac14dd1",
"src": "https://github.com/prabirshrestha/asyncomplete-lsp.vim"
},
"asyncomplete.vim": {
"rev": "17b654a87a834d4e835fb7467e562b4421ad9310",
"src": "https://github.com/prabirshrestha/asyncomplete.vim"
},
"auto-save.nvim": {
"rev": "979b6c82f60cfa80f4cf437d77446d0ded0addf0",
"src": "https://github.com/Pocco81/auto-save.nvim"
},
"barbar.nvim": {
"rev": "fb4369940a07dda35fa4d7f54cf4a36aa00440e6",
"src": "https://github.com/romgrk/barbar.nvim"
},
"basedpyright": {
"rev": "513aa518c60e4fe8e9b3cb87c115dc75427013f4",
"src": "https://github.com/DetachHead/basedpyright"
},
"blink.cmp": {
"rev": "b19413d214068f316c78978b08264ed1c41830ec",
"src": "https://github.com/saghen/blink.cmp"
},
"conform.nvim": {
"rev": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9",
"src": "https://github.com/stevearc/conform.nvim"
},
"dashboard-nvim": {
"rev": "0775e567b6c0be96d01a61795f7b64c1758262f6",
"src": "https://github.com/nvimdev/dashboard-nvim"
},
"everforest-nvim": {
"rev": "557bce922401e247a596583679bc181d4d688554",
"src": "https://github.com/neanias/everforest-nvim.git"
},
"lualine.nvim": {
"rev": "3946f0122255bc377d14a59b27b609fb3ab25768",
"src": "https://github.com/nvim-lualine/lualine.nvim"
},
"mason-lspconfig.nvim": {
"rev": "b1d9a914b02ba5660f1e272a03314b31d4576fe2",
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
},
"mason-tool-installer.nvim": {
"rev": "517ef5994ef9d6b738322664d5fdd948f0fdeb46",
"src": "https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim"
},
"mason.nvim": {
"rev": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800",
"src": "https://github.com/mason-org/mason.nvim"
},
"mini.nvim": {
"rev": "6e885e4c27743ae6bf5957ea78ce86c032835f09",
"src": "https://github.com/echasnovski/mini.nvim"
},
"nvim-autopairs": {
"rev": "59bce2eef357189c3305e25bc6dd2d138c1683f5",
"src": "https://github.com/windwp/nvim-autopairs"
},
"nvim-dap": {
"rev": "5860c7c501eb428d3137ee22c522828d20cca0b3",
"src": "https://github.com/mfussenegger/nvim-dap"
},
"nvim-dap-python": {
"rev": "64652d1ae1db80870d9aac7132d76e37acd86a26",
"src": "https://github.com/mfussenegger/nvim-dap-python"
},
"nvim-lspconfig": {
"rev": "abf6d190f2c06818489c0bd4b926e7e3a06c5e51",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"nvim-surround": {
"rev": "fcfa7e02323d57bfacc3a141f8a74498e1522064",
"src": "https://github.com/kylechui/nvim-surround"
},
"nvim-tree.lua": {
"rev": "1eda2569394f866360e61f590f1796877388cb8a",
"src": "https://github.com/nvim-tree/nvim-tree.lua"
},
"nvim-treesitter": {
"rev": "42fc28ba918343ebfd5565147a42a26580579482",
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
},
"nvim-treesitter-textobjects": {
"rev": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef",
"src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
},
"nvim-web-devicons": {
"rev": "8dcb311b0c92d460fac00eac706abd43d94d68af",
"src": "https://github.com/nvim-tree/nvim-web-devicons"
},
"plenary.nvim": {
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
"src": "https://github.com/nvim-lua/plenary.nvim"
},
"prettier.nvim": {
"rev": "ca6452de1accc68a1062e72f58679caa488b501a",
"src": "https://github.com/MunifTanjim/prettier.nvim"
},
"render-markdown.nvim": {
"rev": "6e0e8902dac70fecbdd8ce557d142062a621ec38",
"src": "https://github.com/MeanderingProgrammer/render-markdown.nvim"
},
"telescope.nvim": {
"rev": "83a3a713d6b2d2a408491a1b959e55a7fa8678e8",
"src": "https://github.com/nvim-telescope/telescope.nvim"
},
"venv-selector.nvim": {
"rev": "58bae72c84b9f7f864c879ec1896e384296f9ffb",
"src": "https://github.com/linux-cultist/venv-selector.nvim"
},
"vim-lsp-settings": {
"rev": "139d4adf61f0699cc97744d4e6dfb8a6317397f5",
"src": "https://github.com/mattn/vim-lsp-settings"
}
}
}