diff --git a/.github/workflows/update-flake-lock-and-ci.yml b/.github/workflows/update-flake-lock-and-ci.yml index b2c58df1..a1bf788d 100644 --- a/.github/workflows/update-flake-lock-and-ci.yml +++ b/.github/workflows/update-flake-lock-and-ci.yml @@ -19,10 +19,7 @@ jobs: pr-title: 'Bump flake.lock and related dependencies' optional-run: | nix run .#bump_completions - git add ./dependencies - # https://stackoverflow.com/q/34807971 - git update-index -q --really-refresh - git diff-index --quiet HEAD || git commit -m 'Update dprint completions' ./dependencies/dprint + nix run .#bump_lsp secrets: APP_ID: ${{ secrets.APP_ID }} APP_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} diff --git a/.vscode/settings.json b/.vscode/settings.json index bf88441f..04b6c2f7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,5 +22,6 @@ }, "gopls": { "build.buildFlags": ["-tags=linux,windows,darwin"] - } + }, + "typos.path": "/nix/store/02sj7rvbhzvlj1nsjzwya9fhbq34178f-typos-lsp-0.1.17/bin/typos-lsp" // selfup {"extract":"/nix/store/[^\"]+/bin/typos-lsp","replacer":["bash", "-c", "command -v typos-lsp"]} } diff --git a/dprint.json b/dprint.json index bd3c6bae..8d1eecdb 100644 --- a/dprint.json +++ b/dprint.json @@ -6,10 +6,6 @@ }, "toml": { }, - "prettier": { - "printWidth": 120, - "singleQuote": true - }, "excludes": [ ".git", ".direnv", @@ -19,7 +15,6 @@ "plugins": [ "https://plugins.dprint.dev/json-0.19.2.wasm", "https://plugins.dprint.dev/markdown-0.16.4.wasm", - "https://plugins.dprint.dev/toml-0.6.1.wasm", - "https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40" + "https://plugins.dprint.dev/toml-0.6.1.wasm" ] } diff --git a/flake.nix b/flake.nix index 74ef8fb5..b0969659 100644 --- a/flake.nix +++ b/flake.nix @@ -54,7 +54,9 @@ cargo-make edge-pkgs.dprint + edge-pkgs.yamlfmt edge-pkgs.typos + edge-pkgs.typos-lsp edge-pkgs.go_1_22 edge-pkgs.goreleaser edge-pkgs.trivy @@ -113,9 +115,25 @@ ${edge-pkgs.podman}/bin/podman completion zsh > ./dependencies/podman/completions.zsh ${edge-pkgs.podman}/bin/podman completion fish > ./dependencies/podman/completions.fish + git add ./dependencies/podman + # https://stackoverflow.com/q/34807971 + git update-index -q --really-refresh + git diff-index --quiet HEAD || git commit -m 'Update podman completions' ./dependencies/podman + ${edge-pkgs.dprint}/bin/dprint completions bash > ./dependencies/dprint/completions.bash ${edge-pkgs.dprint}/bin/dprint completions zsh > ./dependencies/dprint/completions.zsh ${edge-pkgs.dprint}/bin/dprint completions fish > ./dependencies/dprint/completions.fish + + git add ./dependencies/dprint + git update-index -q --really-refresh + git diff-index --quiet HEAD || git commit -m 'Update dprint completions' ./dependencies/dprint + ''; + + packages.bump_lsp = pkgs.writeShellScriptBin "bump_lsp" '' + set -euo pipefail + + git ls-files .vscode | xargs nix run github:kachick/selfup/v1.1.2 -- run + git diff-index --quiet HEAD || git commit -m 'Sync LSP path with nixpkgs' .vscode ''; packages.check_no_dirty_xz_in_nix_store = pkgs.writeShellApplication {