diff --git a/flake.lock b/flake.lock index 35080e0..f1d265f 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/flake.nix b/flake.nix index 3e85932..4ce0613 100644 --- a/flake.nix +++ b/flake.nix @@ -136,6 +136,7 @@ mailutils wireguard-tools antlr + just ]) ++ (if pkgs.stdenv.isLinux then with pkgs; [ postfix ] else []); diff --git a/justfile b/justfile new file mode 100644 index 0000000..a731785 --- /dev/null +++ b/justfile @@ -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' +