add devtools just module and some lsp-devtools commands (#133)
Some checks failed
lint / pre-commit (push) Waiting to run
release / linux (map[runner:ubuntu-22.04 target:aarch64]) (push) Failing after 6s
release / linux (map[runner:ubuntu-22.04 target:armv7]) (push) Failing after 3s
release / linux (map[runner:ubuntu-22.04 target:ppc64le]) (push) Failing after 3s
release / linux (map[runner:ubuntu-22.04 target:s390x]) (push) Failing after 3s
release / linux (map[runner:ubuntu-22.04 target:x86]) (push) Failing after 3s
release / linux (map[runner:ubuntu-22.04 target:x86_64]) (push) Failing after 3s
release / musllinux (map[runner:ubuntu-22.04 target:aarch64]) (push) Failing after 3s
release / musllinux (map[runner:ubuntu-22.04 target:armv7]) (push) Failing after 3s
release / musllinux (map[runner:ubuntu-22.04 target:x86]) (push) Failing after 3s
release / musllinux (map[runner:ubuntu-22.04 target:x86_64]) (push) Failing after 2s
release / test (push) Has been skipped
release / windows (map[runner:windows-latest target:x64]) (push) Has been cancelled
release / windows (map[runner:windows-latest target:x86]) (push) Has been cancelled
release / macos (map[runner:macos-13 target:x86_64]) (push) Has been cancelled
release / macos (map[runner:macos-14 target:aarch64]) (push) Has been cancelled
release / sdist (push) Has been cancelled
release / release (push) Has been cancelled

This commit is contained in:
Josh Thomas 2025-05-02 23:31:50 -05:00 committed by GitHub
parent d2f373de3a
commit 59462dff94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 40 additions and 2 deletions

3
.gitignore vendored
View file

@ -192,3 +192,6 @@ Cargo.lock
# mkdocs
site/
# lsp-devtools db
djls.db

34
.just/devtools.just Normal file
View file

@ -0,0 +1,34 @@
set unstable := true
justfile := justfile_directory() + "/.just/devtools.just"
[private]
default:
@just --list --justfile {{ justfile }}
[private]
[no-cd]
datasette *ARGS:
uvx --with datasette-pretty-json datasette {{ ARGS }}
[private]
[no-cd]
devtools *ARGS:
uvx lsp-devtools {{ ARGS }}
[private]
fmt:
@just --fmt --justfile {{ justfile }}
[no-cd]
explore FILENAME="djls.db":
@just dev datasette -o {{ FILENAME }}
[no-cd]
inspect:
@just dev devtools inspect
[no-cd]
record FILENAME="djls.db":
rm -f {{ FILENAME }}
@just dev devtools record --to-sqlite {{ FILENAME }}

View file

@ -1,5 +1,5 @@
vim.lsp.config["djls"] = {
cmd = { "djls", "serve" },
cmd = { "uvx", "lsp-devtools", "agent", "--", "djls", "serve" },
filetypes = { "htmldjango" },
root_markers = { "manage.py", "pyproject.toml" },
}

View file

@ -1,12 +1,13 @@
set dotenv-load := true
set unstable := true
mod dev ".just/devtools.just"
mod docs ".just/docs.just"
# List all available commands
[private]
default:
@just --list
@just --list --list-submodules
[private]
cog: