Compare commits
4 Commits
cbcd262024
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2906689a29 | |||
| 670f6325a1 | |||
| b548abcf80 | |||
| 42c30ed673 |
@@ -58,7 +58,7 @@ CSS, JSON, YAML, Markdown, SQL, Dockerfile, Python.
|
|||||||
| LSP | nvim-lspconfig + Mason (`gopls`, `zls`, `lua_ls`, `ts_ls`, `html`, `cssls`, `jsonls`, `yamlls`, `marksman`, `sqlls`, `dockerls`, `pyright`/`ruff`) |
|
| LSP | nvim-lspconfig + Mason (`gopls`, `zls`, `lua_ls`, `ts_ls`, `html`, `cssls`, `jsonls`, `yamlls`, `marksman`, `sqlls`, `dockerls`, `pyright`/`ruff`) |
|
||||||
| Completion | blink.cmp (LazyVim default; SQL routed to dadbod) |
|
| Completion | blink.cmp (LazyVim default; SQL routed to dadbod) |
|
||||||
| Formatting | conform.nvim via LazyVim's format pipeline |
|
| Formatting | conform.nvim via LazyVim's format pipeline |
|
||||||
| Debugging | nvim-dap + delve (Go), codelldb (Zig/C/C++) |
|
| Debugging | nvim-dap + delve (Go), codelldb (Zig/C/C++/Odin) |
|
||||||
| Testing | neotest (Go, Python, Zig) with in-buffer pass/fail signs |
|
| Testing | neotest (Go, Python, Zig) with in-buffer pass/fail signs |
|
||||||
| Coverage | nvim-coverage (Go) |
|
| Coverage | nvim-coverage (Go) |
|
||||||
| Task running | overseer.nvim (+ user templates) |
|
| Task running | overseer.nvim (+ user templates) |
|
||||||
@@ -143,9 +143,13 @@ Works in Go, Python, and Zig buffers; results show as signs in the gutter.
|
|||||||
|
|
||||||
### Debugging (DAP, `<leader>d`)
|
### Debugging (DAP, `<leader>d`)
|
||||||
|
|
||||||
Go uses delve; Zig/C/C++ use codelldb. Zig launch configs build with debug
|
Go uses delve; Zig/C/C++/Odin use codelldb. Zig launch configs build with
|
||||||
symbols first, then run (`Launch (zig build)` prompts for the exe under
|
debug symbols first, then run (`Launch (zig build)` prompts for the exe under
|
||||||
`zig-out/bin`; `Launch (current file)` compiles the open file).
|
`zig-out/bin`; `Launch (current file)` compiles the open file). Odin offers
|
||||||
|
`Launch (make build-debug)` (desi_explorer-style monorepo — runs
|
||||||
|
`make -C gui build-debug` and points at `bin/desi_explorer` with the repo's
|
||||||
|
`GUI_ENV_FILE`), `Launch (odin build .)` (plain debug `odin build`), and
|
||||||
|
`Launch (current file)`.
|
||||||
| Key | Action |
|
| Key | Action |
|
||||||
|-----|--------|
|
|-----|--------|
|
||||||
| `<leader>db` | Toggle breakpoint |
|
| `<leader>db` | Toggle breakpoint |
|
||||||
@@ -270,7 +274,7 @@ symbols first, then run (`Launch (zig build)` prompts for the exe under
|
|||||||
│ │ ├── lspconfig.lua # Per-server LSP config (gopls, zls, …)
|
│ │ ├── lspconfig.lua # Per-server LSP config (gopls, zls, …)
|
||||||
│ │ ├── treesitter.lua # Parsers
|
│ │ ├── treesitter.lua # Parsers
|
||||||
│ │ ├── formatting.lua # conform.nvim
|
│ │ ├── formatting.lua # conform.nvim
|
||||||
│ │ ├── dap.lua # Debugging (Go via delve, Zig via codelldb)
|
│ │ ├── dap.lua # Debugging (Go via delve, Zig/C/C++/Odin via codelldb)
|
||||||
│ │ ├── neotest.lua # Test runner (go/python/zig)
|
│ │ ├── neotest.lua # Test runner (go/python/zig)
|
||||||
│ │ ├── go-coverage.lua # Go coverage signs
|
│ │ ├── go-coverage.lua # Go coverage signs
|
||||||
│ │ ├── overseer.lua # Task runner
|
│ │ ├── overseer.lua # Task runner
|
||||||
@@ -284,7 +288,7 @@ symbols first, then run (`Launch (zig build)` prompts for the exe under
|
|||||||
│ │ ├── performance.lua # treesitter large-file guard
|
│ │ ├── performance.lua # treesitter large-file guard
|
||||||
│ │ ├── theme.lua # catppuccin
|
│ │ ├── theme.lua # catppuccin
|
||||||
│ │ └── zig.lua # Zig ft plugin (toolchain wired across files)
|
│ │ └── zig.lua # Zig ft plugin (toolchain wired across files)
|
||||||
│ └── overseer/template/user/ # go_*, zig_{build,run,test} task templates
|
│ └── overseer/template/user/ # go_*, odin_{build,run,test}, zig_{build,run,test} task templates
|
||||||
```
|
```
|
||||||
|
|
||||||
## Zig notes
|
## Zig notes
|
||||||
@@ -296,6 +300,16 @@ symbols first, then run (`Launch (zig build)` prompts for the exe under
|
|||||||
- Debugging needs `codelldb` (`:MasonInstall codelldb` if it doesn't
|
- Debugging needs `codelldb` (`:MasonInstall codelldb` if it doesn't
|
||||||
auto-install). Builds use `-O Debug` so symbols are present.
|
auto-install). Builds use `-O Debug` so symbols are present.
|
||||||
|
|
||||||
|
## Odin notes
|
||||||
|
|
||||||
|
- LSP is `ols` (Mason + `lua/plugins/lspconfig.lua`); formatting is `odinfmt`.
|
||||||
|
- Debugging uses **codelldb** with `-o:none -debug` builds, so real breakpoints,
|
||||||
|
locals/variables, and REPL evaluation work against Odin DWARF. The monorepo
|
||||||
|
launch config sets `GUI_ENV_FILE` for you, matching `make run`.
|
||||||
|
- In desi_explorer, `make -C gui build-debug` must finish before
|
||||||
|
`Launch (make build-debug)` — the config builds first, so breakpoints set in
|
||||||
|
`gui/src/*.odin` before launching are hit reliably.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
- **LSP not attaching:** `:checkhealth lsp` — confirm the server appears and is
|
- **LSP not attaching:** `:checkhealth lsp` — confirm the server appears and is
|
||||||
|
|||||||
+3
-1
@@ -6,7 +6,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
{ out, "WarningMsg" },
|
{ out, "WarningMsg" },
|
||||||
{ "\nPress any key to exit..." },
|
{ "\nPress any key to exit..." },
|
||||||
}, true, {})
|
}, true, {})
|
||||||
vim.fn.getchar()
|
vim.fn.getchar()
|
||||||
@@ -30,6 +30,8 @@ require("lazy").setup({
|
|||||||
colorscheme = "catppuccin-mocha",
|
colorscheme = "catppuccin-mocha",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- Import LazyVim extras for the picker
|
||||||
|
{ import = "lazyvim.plugins.extras.editor.telescope" },
|
||||||
-- Import LazyVim extras for languages
|
-- Import LazyVim extras for languages
|
||||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
|||||||
@@ -229,6 +229,99 @@ return {
|
|||||||
dap.configurations.cpp = dap.configurations.zig
|
dap.configurations.cpp = dap.configurations.zig
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- -------------------------------------------------------------------------
|
||||||
|
-- Odin debugging via codelldb (same adapter as Zig/C/C++)
|
||||||
|
-- -------------------------------------------------------------------------
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
ft = { "odin" },
|
||||||
|
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}" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local root = vim.fn.getcwd()
|
||||||
|
|
||||||
|
-- Detect the repo's GUI env file so the app bootstraps its config the
|
||||||
|
-- same way `make run` does (GUI_ENV_FILE -> dotenv in config.odin).
|
||||||
|
local env_file
|
||||||
|
for _, candidate in ipairs({ "resources/dev/gui.env", ".env" }) do
|
||||||
|
local p = root .. "/" .. candidate
|
||||||
|
if vim.fn.filereadable(p) == 1 then
|
||||||
|
env_file = p
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local env = {}
|
||||||
|
if env_file then
|
||||||
|
env.GUI_ENV_FILE = env_file
|
||||||
|
end
|
||||||
|
|
||||||
|
dap.configurations.odin = {
|
||||||
|
{
|
||||||
|
-- desi_explorer-style monorepo: `make -C gui build-debug` (-o:none
|
||||||
|
-- -debug), then launch bin/desi_explorer with the GUI env file.
|
||||||
|
name = "Launch (make build-debug)",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
if vim.fn.glob(root .. "/gui/Makefile") ~= "" then
|
||||||
|
vim.fn.system({ "make", "-C", root .. "/gui", "build-debug" })
|
||||||
|
return root .. "/bin/desi_explorer"
|
||||||
|
end
|
||||||
|
vim.fn.system({ "odin", "build", ".", "-o:none", "-debug", "-out:.debug_out" })
|
||||||
|
return root .. "/.debug_out"
|
||||||
|
end,
|
||||||
|
cwd = root,
|
||||||
|
stopOnEntry = false,
|
||||||
|
args = {},
|
||||||
|
env = env,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- Any standalone Odin project: plain `odin build .` with debug info.
|
||||||
|
name = "Launch (odin build .)",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
vim.fn.system({ "odin", "build", ".", "-o:none", "-debug", "-out:.debug_out" })
|
||||||
|
return root .. "/.debug_out"
|
||||||
|
end,
|
||||||
|
cwd = root,
|
||||||
|
stopOnEntry = false,
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- Single-file Odin programs (hello.odin, small scripts)
|
||||||
|
name = "Launch (current file)",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
local src = vim.fn.expand("%:p")
|
||||||
|
local out = vim.fn.expand("%:p:r") .. "_debug"
|
||||||
|
vim.fn.system({ "odin", "build", src, "-o:none", "-debug", "-out:" .. out })
|
||||||
|
return out
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
-- ─────────────────────────────────────────────────────────────────────────
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
-- DAP UI keymaps + auto open/close (the spec itself is loaded as a dep above)
|
-- DAP UI keymaps + auto open/close (the spec itself is loaded as a dep above)
|
||||||
-- ─────────────────────────────────────────────────────────────────────────
|
-- ─────────────────────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ return {
|
|||||||
{ "<leader>D", group = "Database" },
|
{ "<leader>D", group = "Database" },
|
||||||
{ "<leader>f", group = "Find" },
|
{ "<leader>f", group = "Find" },
|
||||||
{ "<leader>g", group = "Git" },
|
{ "<leader>g", group = "Git" },
|
||||||
|
{ "<leader>gx", group = "Conflict" },
|
||||||
{ "<leader>o", group = "Overseer" },
|
{ "<leader>o", group = "Overseer" },
|
||||||
{ "<leader>s", group = "Search / Symbols" },
|
{ "<leader>s", group = "Search / Symbols" },
|
||||||
{ "<leader>t", group = "Test" },
|
{ "<leader>t", group = "Test" },
|
||||||
|
|||||||
@@ -12,4 +12,67 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"madmaxieee/unclash.nvim",
|
||||||
|
lazy = false,
|
||||||
|
opts = {
|
||||||
|
action_buttons = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
annotations = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"]x",
|
||||||
|
function()
|
||||||
|
require("unclash").next_conflict()
|
||||||
|
end,
|
||||||
|
desc = "Next Conflict",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"[x",
|
||||||
|
function()
|
||||||
|
require("unclash").prev_conflict()
|
||||||
|
end,
|
||||||
|
desc = "Prev Conflict",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gxc",
|
||||||
|
function()
|
||||||
|
require("unclash").accept_current()
|
||||||
|
end,
|
||||||
|
desc = "Accept Current (Conflict)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gxi",
|
||||||
|
function()
|
||||||
|
require("unclash").accept_incoming()
|
||||||
|
end,
|
||||||
|
desc = "Accept Incoming (Conflict)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gxb",
|
||||||
|
function()
|
||||||
|
require("unclash").accept_both()
|
||||||
|
end,
|
||||||
|
desc = "Accept Both (Conflict)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gxm",
|
||||||
|
function()
|
||||||
|
require("unclash").open_merge_editor()
|
||||||
|
end,
|
||||||
|
desc = "Open Merge Editor (Conflict)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>gxp",
|
||||||
|
function()
|
||||||
|
require("unclash.snacks").pick()
|
||||||
|
end,
|
||||||
|
desc = "Pick Conflicts (Snacks)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user