-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Rust Analyzer to 2023-05-15 (#93)
* Update Rust analyzer tag and settings comparison instructions. * Update `rust-analyzer.check.target` setting to `rust-analyzer.check.targets`. * Support a few more rust-analyzer settings. * Prevent crash when Rust Analyzer invokes `triggerParameterHints`. * update to 2023-05-15 * improve schema * portable script --------- Co-authored-by: Rafal Chlodnicki <[email protected]>
- Loading branch information
Showing
5 changed files
with
186 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
images/ export-ignore | ||
scripts/ export-ignore |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
# The following script finds the keys that are in the `rust-analyzer` | ||
# package.json, but not in `LSP-rust-analyzer`'s sublime-settings. | ||
|
||
# exit when any command fails | ||
set -e | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
LSP_REPO_DIR="$SCRIPT_DIR/.." | ||
|
||
read -rp 'Provide directory path to the rust-analyzer repository (for example: /usr/local/github/rust-analyzer/): ' RA_REPO_DIR | ||
if [ ! -d "$RA_REPO_DIR" ]; then | ||
echo "Directory path '$RA_REPO_DIR' DOES NOT exist." | ||
exit | ||
fi | ||
|
||
lsp_ra_settings=$(rg -o '"rust-analyzer.([^"]+)"' "${LSP_REPO_DIR}/LSP-rust-analyzer.sublime-settings" | sort) | ||
ra_settings=$(jq '.contributes.configuration.properties | ||
| to_entries | ||
| map(.key) | ||
| .[] | select(. != "$generated-start" and . != "$generated-end")' \ | ||
"${RA_REPO_DIR}/editors/code/package.json" | sort) | ||
|
||
# Missing settings in LSP-rust-analyzer | ||
rg -vf <(echo "${lsp_ra_settings}") <(echo "${ra_settings}") | ||
|
||
# Settings in LSP-rust-analyzer that are no longer relevant | ||
rg -vf <(echo "${ra_settings}") <(echo "${lsp_ra_settings}") \ | ||
| rg -v 'terminusAutoClose|terminusUsePanel' |
Oops, something went wrong.