move LSP .meta files to live alongside their Go code
Each lsp_*.meta now lives in tools/lsp/cmd/<name>/ alongside main.go, rather than in data/tools/. The lsp-tools just target was updated to install both the binary and its .meta sidecar. AGENTS.md updated to document the pattern for compiled tools.
This commit is contained in:
parent
60fafd5381
commit
eaf0a83a57
|
|
@ -125,10 +125,12 @@ Config lives in `~/.config/ollie/env`. Key variables:
|
|||
1. Create a package under `tools/<family>/cmd/<name>/main.go`
|
||||
- Read JSON args from stdin, write result to stdout, exit 0/1
|
||||
- Share library code in `tools/<family>/` (e.g. `tools/lsp/`)
|
||||
2. Create `data/tools/<name>.meta` (same format as above)
|
||||
3. Add a build target in the justfile that compiles to `{{cfg}}/tools/<name>`
|
||||
2. Create `<name>.meta` alongside `main.go` in the same `cmd/<name>/` directory (same format as above)
|
||||
3. Add a build target in the justfile that compiles to `{{cfg}}/tools/<name>` **and** installs the `.meta` file alongside it
|
||||
4. Run `just` to build and install
|
||||
|
||||
The `.meta` file lives with the code that produces the tool, not in `data/tools/`. See the `lsp-tools` just target for the canonical pattern.
|
||||
|
||||
Both paths produce the same result: an executable + `.meta` in `$OLLIE_TOOLS_PATH`.
|
||||
The registry doesn't distinguish between scripts and binaries.
|
||||
## Adding a new prompt
|
||||
|
|
|
|||
8
justfile
8
justfile
|
|
@ -39,14 +39,22 @@ acme:
|
|||
|
||||
lsp-tools:
|
||||
@echo === Building LSP tools ===
|
||||
mkdir -p {{cfg}}/tools
|
||||
rm -f {{cfg}}/tools/lsp_definition {{cfg}}/tools/lsp_references {{cfg}}/tools/lsp_hover {{cfg}}/tools/lsp_rename {{cfg}}/tools/lsp_symbols {{cfg}}/tools/lsp_completion {{cfg}}/tools/lsp_diagnostics
|
||||
go build -o {{cfg}}/tools/lsp_definition ./tools/lsp/cmd/lsp_definition/
|
||||
install -m644 ./tools/lsp/cmd/lsp_definition/lsp_definition.meta {{cfg}}/tools/lsp_definition.meta
|
||||
go build -o {{cfg}}/tools/lsp_references ./tools/lsp/cmd/lsp_references/
|
||||
install -m644 ./tools/lsp/cmd/lsp_references/lsp_references.meta {{cfg}}/tools/lsp_references.meta
|
||||
go build -o {{cfg}}/tools/lsp_hover ./tools/lsp/cmd/lsp_hover/
|
||||
install -m644 ./tools/lsp/cmd/lsp_hover/lsp_hover.meta {{cfg}}/tools/lsp_hover.meta
|
||||
go build -o {{cfg}}/tools/lsp_rename ./tools/lsp/cmd/lsp_rename/
|
||||
install -m644 ./tools/lsp/cmd/lsp_rename/lsp_rename.meta {{cfg}}/tools/lsp_rename.meta
|
||||
go build -o {{cfg}}/tools/lsp_symbols ./tools/lsp/cmd/lsp_symbols/
|
||||
install -m644 ./tools/lsp/cmd/lsp_symbols/lsp_symbols.meta {{cfg}}/tools/lsp_symbols.meta
|
||||
go build -o {{cfg}}/tools/lsp_completion ./tools/lsp/cmd/lsp_completion/
|
||||
install -m644 ./tools/lsp/cmd/lsp_completion/lsp_completion.meta {{cfg}}/tools/lsp_completion.meta
|
||||
go build -o {{cfg}}/tools/lsp_diagnostics ./tools/lsp/cmd/lsp_diagnostics/
|
||||
install -m644 ./tools/lsp/cmd/lsp_diagnostics/lsp_diagnostics.meta {{cfg}}/tools/lsp_diagnostics.meta
|
||||
|
||||
ollie-remote:
|
||||
@echo === Building ollie-remote ===
|
||||
|
|
|
|||
Loading…
Reference in New Issue