updated secrets baseline config

This commit was merged in pull request #1.
This commit is contained in:
2026-06-06 15:54:15 -06:00
parent 5511da5a98
commit 5656c2d385
13 changed files with 451 additions and 141 deletions

View File

@@ -167,6 +167,68 @@ return {
},
},
-- -------------------------------------------------------------------------
-- Zig (+ C/C++) debugging via codelldb
-- -------------------------------------------------------------------------
{
"mfussenegger/nvim-dap",
ft = { "zig" },
config = function()
local dap = require("dap")
-- Prefer codelldb on $PATH, fall back to Mason's install location
local codelldb = vim.fn.exepath("codelldb")
if codelldb == "" then
codelldb = vim.fn.stdpath("data") .. "/mason/bin/codelldb"
end
dap.adapters.codelldb = {
type = "server",
port = "${port}",
executable = {
command = codelldb,
args = { "--port", "${port}" },
},
}
dap.configurations.zig = {
{
-- Project build (build.zig). Runs `zig build` first so a fresh
-- debug binary exists, then asks which exec under zig-out/bin to run.
name = "Launch (zig build)",
type = "codelldb",
request = "launch",
program = function()
vim.fn.system({ "zig", "build", "--summary", "none" })
return vim.fn.input("Executable: ", vim.fn.getcwd() .. "/zig-out/bin/", "file")
end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
args = {},
},
{
-- Single file. Compiles the current .zig with debug info next to it,
-- then launches that binary.
name = "Launch (current file)",
type = "codelldb",
request = "launch",
program = function()
local src = vim.fn.expand("%:p")
local out = vim.fn.expand("%:p:r")
vim.fn.system({ "zig", "build-exe", src, "-O", "Debug", "-femit-bin=" .. out })
return out
end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
args = {},
},
}
-- Reuse the same configs for C/C++ buffers - codelldb handles them too
dap.configurations.c = dap.configurations.zig
dap.configurations.cpp = dap.configurations.zig
end,
},
-- ─────────────────────────────────────────────────────────────────────────
-- DAP UI keymaps + auto open/close (the spec itself is loaded as a dep above)
-- ─────────────────────────────────────────────────────────────────────────
@@ -239,7 +301,7 @@ return {
{
"jay-babu/mason-nvim-dap.nvim",
opts = {
ensure_installed = { "python", "delve", "js" },
ensure_installed = { "python", "delve", "js", "codelldb" },
},
},

View File

@@ -77,6 +77,7 @@ return {
{ "<leader>c", group = "Code" },
{ "<leader>cg", group = "Go" },
{ "<leader>cgp", group = "Profile" },
{ "<leader>cz", group = "Zig" },
{ "<leader>d", group = "Debug" },
{ "<leader>D", group = "Database" },
{ "<leader>f", group = "Find" },

View File

@@ -11,9 +11,9 @@ return {
"neovim/nvim-lspconfig",
opts = {
servers = {
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
-- Go
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
gopls = {
root_markers = { "go.work", "go.mod", ".git" },
settings = {
@@ -60,9 +60,29 @@ return {
},
},
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
-- Zig
-- -----------------------------------------------------------------
zig = {
root_markers = { "build.zig", "build.zig.zon" },
settings = {
zls = {
enable_build_on_save = true,
-- "watch" or specify a step name your build.zig defines
build_on_save_step = "install",
semantic_tokens = "full",
enable_inlay_hints = true,
inlay_hints_show_parameter_name = true,
inlay_hints_show_builtin = true,
inlay_hints_show_variable_type_hints = true,
warn_style = true,
},
},
},
-- -----------------------------------------------------------------
-- Lua
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
lua_ls = {
root_markers = {
".luarc.json",
@@ -83,9 +103,9 @@ return {
},
},
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
-- TypeScript / JavaScript
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
ts_ls = {
root_markers = { "tsconfig.json", "jsconfig.json", "package.json", ".git" },
settings = {
@@ -114,9 +134,9 @@ return {
},
},
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
-- Web (HTML / CSS / JSON / YAML)
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
html = {
root_markers = { "package.json", ".git" },
filetypes = { "html", "templ" },
@@ -143,9 +163,9 @@ return {
},
},
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
-- Markdown / SQL / Docker
-- ─────────────────────────────────────────────────────────────────
-- -----------------------------------------------------------------
marksman = {
root_markers = { ".marksman.toml", ".git" },
},

View File

@@ -37,6 +37,7 @@ return {
-- DAP adapters
"delve",
"js-debug-adapter",
"codelldb",
},
},
},

View File

@@ -7,15 +7,17 @@ return {
{
"nvim-neotest/neotest",
lazy = true,
ft = { "go", "ptyhon" },
ft = { "go", "ptyhon", "zig" },
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter", -- noetest-zig parses tests via treesitter
-- Adapters
"nvim-neotest/neotest-go",
"nvim-neotest/neotest-python",
"lawrence-laz/neotest-zig",
},
config = function()
require("neotest").setup({
@@ -39,6 +41,14 @@ return {
dap = { justMyCode = false },
args = { "--disable-warnings", "-q" },
}),
-- Zig: requires a standard `test` step in build.zig for project-wide runs;
-- individual .zig files also work.
-- dap.adapter must match the adapter named registered in dap.lua (codelldb) so <leader>dT-style
-- debug-test works from the summary too
require("neotest-zig")({
dap = { adapter = "codelldb" },
}),
},
})
end,

View File

@@ -36,6 +36,9 @@ return {
"markdown",
"markdown_inline",
-- Zig
"zig",
-- Build / config
"ninja",
"sql",

View File

@@ -1,5 +1,14 @@
-- Zig language support via the official Codeberg-hosted plugin.
-- Loads only on zig files.
--
-- The rest of the Zig toolchain is wired in alongside the other languages so
-- it benefits from the same lazy-loading and config:
-- * LSP (zls) ........... lspconfig.lua (servers.zls) + mason.lua
-- * Treesitter parser ... treesitter.lua ("zig")
-- * Tests in-buffer ..... neotest.lua (neotest-zig adapter, ft=zig)
-- * Debug (codelldb) .... dap.lua (dap.configurations.zig) + mason
-- * Run/build tasks ..... overseer/template/user/zig_{build,run,test}.lua
-- * Quick keymaps ....... keymaps.lua (<leader>cz*) + which-key group
return {
{