Last active
September 30, 2025 04:30
-
-
Save ouuan/7413373e0a815d95484ad49706f83117 to your computer and use it in GitHub Desktop.
Verus neovim configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| base="$(dirname "$(realpath "$1")")" | |
| PATH_add "$base" | |
| export VERUS_BINARY_PATH="${VERUS_BINARY_PATH:-/usr/bin/verus}" | |
| export VERUS_SINGULAR_PATH="${VERUS_SINGULAR_PATH:-/usr/bin/Singular}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on_init = function(client) | |
| local path = os.getenv('PATH') | |
| if path and path:find('verus') then | |
| client.config.settings['rust-analyzer'] = { | |
| check = { | |
| extraArgs = { '--expand-errors' }, | |
| }, | |
| procMacro = { | |
| enable = false, | |
| }, | |
| diagnostics = { | |
| disabled = { | |
| 'unresolved-proc-macro', | |
| }, | |
| }, | |
| } | |
| client.notify('workspace/didChangeConfiguration', { settings = client.config.settings }) | |
| end | |
| return true | |
| end, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ln -s /usr/bin/verus-analyzer rust-analyzer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [toolchain] | |
| channel = "1.88.0" | |
| profile = "minimal" | |
| components = ["rustfmt", "clippy"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| if [[ "$#" == 0 || "$*" == "--edition 20"[0-9][0-9] ]]; then | |
| tmp=$(mktemp --tmpdir verusfmt.XXXX.rs) | |
| cat > "$tmp" | |
| verusfmt --verus-only "$tmp" | |
| "$(rustup which rustfmt)" < "$tmp" | |
| rm "$tmp" | |
| else | |
| "$(rustup which rustfmt)" "$@" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment