audit: comprehensive cleanup — delete 8 files, fix buffer bug, cut bloat
This commit is contained in:
28 files changed
+279
-656
No files matched your search
+9
-62
@@ -1,70 +1,17 @@
|
||||
# Contributing to tiny-debugger.nvim
|
||||
# Contributing
|
||||
|
||||
## Source Control
|
||||
We use **jj** (Jujutsu) for source control, not git.
|
||||
|
||||
We use **jj** (Jujutsu), not git. All commits should be made with `jj commit`.
|
||||
## Adding a new adapter
|
||||
|
||||
## Adding a New Adapter
|
||||
1. Create `lua/tiny-debugger/adapters/<language>.lua` (see `go.lua` for reference)
|
||||
2. Add the module name to the loader list in `adapters/init.lua`
|
||||
3. Add the language to vimdoc
|
||||
|
||||
1. Create `lua/tiny-debugger/adapters/<language>.lua`
|
||||
2. Implement a `register(dap)` function that calls `loader.register()`
|
||||
3. Add the module name to the adapters list in `lua/tiny-debugger/adapters/init.lua`
|
||||
4. Add the language to the README and vimdoc tables
|
||||
For simple executable adapters, add them inline in `adapters/init.lua` instead of a separate file.
|
||||
|
||||
Example adapter (minimal):
|
||||
|
||||
```lua
|
||||
local loader = require("tiny-debugger.adapters.init")
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.register(dap)
|
||||
local binary = loader.find_executable({ "my-debug-adapter" })
|
||||
if not binary then return end
|
||||
|
||||
loader.register(dap, "my-adapter", {
|
||||
type = "executable",
|
||||
command = binary,
|
||||
}, {
|
||||
{
|
||||
type = "my-adapter",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
program = "${file}",
|
||||
},
|
||||
}, { "mylang" })
|
||||
end
|
||||
|
||||
return M
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
## Running tests
|
||||
|
||||
```sh
|
||||
nvim --headless -u tests/minimal_init.lua -c 'luafile tests/test_config.lua' -c 'qa!'
|
||||
nvim --headless -u tests/minimal_init.lua -c 'luafile tests/test_mode.lua' -c 'qa!'
|
||||
nvim --headless -u tests/minimal_init.lua -c 'luafile tests/test_keys.lua' -c 'qa!'
|
||||
nvim --headless -u tests/minimal_init.lua -c 'luafile tests/test_help.lua' -c 'qa!'
|
||||
nvim --headless -u tests/minimal_init.lua -c 'luafile tests/test_breakpoints.lua' -c 'qa!'
|
||||
nvim --headless -u tests/minimal_init.lua -c 'luafile tests/test_adapters.lua' -c 'qa!'
|
||||
for t in tests/test_*.lua; do nvim --headless -u tests/minimal_init.lua -c "luafile $t" -c 'qa!'; done
|
||||
```
|
||||
|
||||
## Code Style
|
||||
|
||||
- Clean, readable Lua. No metaprogramming tricks.
|
||||
- Every file should be short enough to read in one sitting.
|
||||
- No abstraction for abstraction's sake.
|
||||
- If a plugin does something we can do in <50 lines, we don't add the dependency.
|
||||
|
||||
## Dependencies
|
||||
|
||||
We depend on exactly five plugins (managed via `vim.pack.add`):
|
||||
|
||||
- nvim-dap
|
||||
- nvim-dap-ui
|
||||
- nvim-nio
|
||||
- nvim-dap-virtual-text
|
||||
- persistent-breakpoints.nvim
|
||||
|
||||
No language-specific plugin dependencies. Adapter configs are inlined as plain
|
||||
Lua tables.
|
||||
Reference in new issue
Block a user