feat: Add justfile

Signed-off-by: Myzel394 <github.7a2op@simplelogin.co>
This commit is contained in:
Myzel394 2025-03-15 22:42:12 +01:00 committed by Myzel394
parent f29bb12d84
commit 00976cec95
No known key found for this signature in database
GPG Key ID: B603E877F73D4ABB
3 changed files with 32 additions and 6 deletions

12
flake.lock generated
View File

@ -26,11 +26,11 @@
]
},
"locked": {
"lastModified": 1733668782,
"narHash": "sha256-tPsqU00FhgdFr0JiQUiBMgPVbl1jbPCY5gbFiJycL3I=",
"lastModified": 1741396135,
"narHash": "sha256-wqmdLr7h4Bk8gyKutgaApJKOM8JVvywI5P48NuqJ9Jg=",
"owner": "tweag",
"repo": "gomod2nix",
"rev": "514283ec89c39ad0079ff2f3b1437404e4cba608",
"rev": "0983848bf2a7ccbfe24d874065adb8fd0f23729b",
"type": "github"
},
"original": {
@ -41,11 +41,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1739214665,
"narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=",
"lastModified": 1741513245,
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
"type": "github"
},
"original": {

View File

@ -136,6 +136,7 @@
mailutils
wireguard-tools
antlr
just
]) ++ (if pkgs.stdenv.isLinux then with pkgs; [
postfix
] else []);

25
justfile Normal file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env just --justfile
set dotenv-load := true
default:
@just --list
# Lint whole project
lint:
cd server && gofmt -s -w .
# cd vs-code-extension && yarn run lint
# Build config-lsp and test it in nvim (config-lsp will be loaded automatically)
[working-directory: "./server"]
test-nvim file:
go build -o ./result/bin/config-lsp && rm -rf ~/.local/state/nvim/lsp.log && DOTFILES_IGNORE_CONFIG_LSP=1 nvim {{file}} -c ':source nvim-lsp-debug.lua'
# Show Mason Logs
show-nvim-logs:
bat ~/.local/state/nvim/lsp.log
[working-directory: "./server"]
test:
nix develop --command bash -c 'go test ./... -count=1'