Commit Graph

1621 Commits

Author SHA1 Message Date
bors
94fa8a6534 Auto merge of #12213 - Veykril:config-fix, r=Veykril
fix: Fix incorrect config patching for runBuildScripts
2022-05-11 10:38:56 +00:00
Lukas Wirth
e68352a9f5 fix: Fix incorrect config patching for runBuildScripts 2022-05-11 12:38:21 +02:00
Elliot Roberts
2298a76222 fix typo in inlayHints.renderColons option description 2022-05-10 19:15:07 -07:00
Lukas Wirth
b271ef8fd1 fix: Fix config patching failing when appending suffixes 2022-05-10 21:14:22 +02:00
Jonas Schievink
92e56e0c70 Fix inverted signature help setting 2022-05-10 16:54:13 +02:00
bors
460e389f54 Auto merge of #12010 - Veykril:r-a-config, r=Veykril
Config revamp

Fixes https://github.com/rust-lang/rust-analyzer/issues/11790
Fixes https://github.com/rust-lang/rust-analyzer/issues/12115

This PR changes a lot of config names, and a few ones are being merged or split apart. The reason for this is that our configuration names currently are rather inconsistent and some where poorly chosen in regards to extensability. This PR plans to fix that.

We still allow the old config names by patching them to the new ones before deserializing to keep backwards compatability with other clients (the VSCode client will auto update the config) but ideally we will get rid of that layer in the future.

Here is a list of the changes:

These are simple renames `old_name | alias1 | alias2 ... -> new_name` (the vscode client will fix these up automagically):
```
assist_allowMergingIntoGlobImports -> imports_merge_glob
assist_exprFillDefault -> assist_expressionFillDefault
assist_importEnforceGranularity -> imports_granularity_enforce
assist_importGranularity | assist_importMergeBehavior | assist_importMergeBehaviour -> imports_granularity_group
assist_importGroup -> imports_group_enable
assist_importPrefix -> imports_prefix

cache_warmup -> primeCaches_enable

cargo_loadOutDirsFromCheck -> cargo_buildScripts_enable
cargo_runBuildScripts | cargo_runBuildScriptsCommand -> cargo_runBuildScripts_overrideCommand
cargo_useRustcWrapperForBuildScripts -> cargo_runBuildScripts_useRustcWrapper

completion_snippets -> completion_snippets_custom

diagnostics_enableExperimental -> diagnostics_experimental_enable

experimental_procAttrMacros -> procMacro_attributes_enable

highlighting_strings -> semanticHighlighting_strings_enable

highlightRelated_breakPoints -> semanticHighlighting_breakPoints_enable
highlightRelated_exitPoints -> semanticHighlighting_exitPoints_enable
highlightRelated_yieldPoints -> semanticHighlighting_yieldPoints_enable
highlightRelated_references -> semanticHighlighting_references_enable

hover_documentation -> hover_documentation_enable
hover_linksInHover | hoverActions_linksInHover -> hover_links_enable
hoverActions_debug -> hoverActions_debug_enable
hoverActions_enable -> hoverActions_enable_enable
hoverActions_gotoTypeDef -> hoverActions_gotoTypeDef_enable
hoverActions_implementations -> hoverActions_implementations_enable
hoverActions_references -> hoverActions_references_enable
hoverActions_run -> hoverActions_run_enable

inlayHints_chainingHints -> inlayHints_chainingHints_enable
inlayHints_closureReturnTypeHints -> inlayHints_closureReturnTypeHints_enable
inlayHints_hideNamedConstructorHints -> inlayHints_typeHints_hideNamedConstructorHints
inlayHints_parameterHints -> inlayHints_parameterHints_enable
inlayHints_reborrowHints -> inlayHints_reborrowHints_enable
inlayHints_typeHints -> inlayHints_typeHints_enable

lruCapacity -> lru_capacity

runnables_cargoExtraArgs -> runnables_extraArgs
runnables_overrideCargo -> runnables_command

rustcSource -> rustc_source

rustfmt_enableRangeFormatting -> rustfmt_rangeFormatting_enable
```

These are configs that have been merged or split apart, which have to be manually updated by the user:

```
callInfo_full -> signatureInfo_detail, signatureInfo_documentation_enable

cargo_allFeatures, cargo_features -> cargo_features
checkOnSave_allFeatures, checkOnSave_features -> checkOnSave_features
completion_addCallArgumentSnippets completion_addCallParenthesis -> completion_callable_snippets
```
2022-05-10 12:07:24 +00:00
Lukas Wirth
822d9b55b7 fix: Add cast expressions to param name inlay hint heuristics 2022-05-10 13:43:43 +02:00
Laurențiu Nicola
97cdf3eb0e Try not to invalidate our state when the proc macro preference didn't change 2022-05-06 09:49:03 +03:00
Laurențiu Nicola
9856144b0b Lower values of char and byte literals 2022-05-05 08:12:08 +03:00
Lukas Wirth
73df43f69a Implement old to new config patching 2022-05-04 15:29:25 +02:00
bors
9e10d4b717 Auto merge of #12093 - nico-abram:uwu, r=Veykril
Reload project on .cargo/config[.toml] changes

Fixes #11024

Not adding tests as discussed in the issue
2022-05-02 12:21:42 +00:00
Lukas Wirth
291f94e22e Fix up config docs 2022-05-01 19:57:09 +02:00
Lukas Wirth
cb6032bdf4 Fix untagged enum deserialization 2022-05-01 19:57:09 +02:00
Lukas Wirth
1f11b70c3b Final fixups 2022-05-01 19:57:09 +02:00
Lukas Wirth
9fe1b24736 Update config usage in slow tests 2022-05-01 19:57:09 +02:00
Lukas Wirth
3d17261972 Adjust signature info and enum variant lenses 2022-05-01 19:57:08 +02:00
Lukas Wirth
9f27eb57a5 Implement boolean aliases 2022-05-01 19:57:08 +02:00
Lukas Wirth
bd18936d51 Sort config definition 2022-05-01 19:57:08 +02:00
Lukas Wirth
61643aca49 Initial config revamp 2022-05-01 19:57:08 +02:00
Peh
aade31943f delete another swap file 2022-05-01 10:48:58 +00:00
Peh
14c30b7979 update crates names in slow-tests/tidy.rs 2022-05-01 10:48:58 +00:00
Peh
1f011fa4a3 style: rename crates to kebab case 2022-05-01 10:48:58 +00:00
Justin Tracey
cfa7204544
small typo in log message 2022-04-29 05:59:32 +00:00
Lukas Wirth
075b18942f minor: Record snippet config errors 2022-04-28 15:18:19 +02:00
Lukas Wirth
8b056fad45 Simplify 2022-04-27 19:53:56 +02:00
unknown
b373e62f1a Reload project on .cargo/config[.toml] changes
Fixes #11024
2022-04-27 12:10:43 -03:00
bors
6869491974 Auto merge of #12075 - jonas-schievink:less-aggressive-quickfixes, r=jonas-schievink
fix: Don't emit a quickfix for placeholder suggestions from rustc/clippy

Fixes https://github.com/rust-lang/rust-analyzer/issues/12069
2022-04-25 13:22:41 +00:00
Jonas Schievink
36342b4b29 Don't emit a quickfix for placeholder suggestions 2022-04-25 15:21:30 +02:00
bors
60c4f072eb Auto merge of #12007 - edwin0cheng:restart-proc-macro-reload, r=jonas-schievink
Restart proc-macro client when server reload

Fix #10719
2022-04-25 12:56:57 +00:00
Aleksey Kladov
83aa42ae69 minor: clarify error message
Clarify that the server is a whole is OK, and that it's only a single
requests that's dead
2022-04-24 13:39:33 +01:00
Edwin Cheng
8f616a6cb5 Fix Reload Workspace command 2022-04-24 11:59:08 +08:00
Jonas Schievink
b5a56c7d53 Spawn a new thread with a larger stack for the server 2022-04-22 17:35:03 +02:00
Jonas Schievink
c6ffffccbd Allows triggering commands after an assist edit 2022-04-19 18:45:48 +02:00
Edwin Cheng
72fcc66835 More visibility for switch workspaces and its states 2022-04-18 14:26:00 +08:00
Laurențiu Nicola
117f902d55 Bump deps 2022-04-17 19:36:08 +03:00
Aleksey Kladov
3f4235d59b internal: more visibility into why things happen 2022-04-16 13:17:27 +01:00
Lukas Wirth
6f037da8cb fix: Fix proc-macro change check being inverted 2022-04-16 12:36:31 +02:00
Lukas Wirth
f540d1c2aa fix: Fix source root panic in global state when checking out older git revs 2022-04-15 20:02:15 +02:00
Lukas Wirth
d7785a8fab minor: Cleanup config.rs a bit 2022-04-14 12:16:38 +02:00
Lukas Wirth
b23b276310 internal: Show more project building errors to the user 2022-04-14 11:31:01 +02:00
bors
15844bf48c Auto merge of #11956 - fee1-dead:master, r=flodiebold
feat: allow customizing the command for running build scripts

I have tested this locally and it fixed #9201 with some small changes on the compiler side with suggestions from https://github.com/rust-analyzer/rust-analyzer/issues/9201#issuecomment-1019554086.

I have also added an environment variable `IS_RA_BUILDSCRIPT_CHECK` for crates to detect that it is a check for buildscripts, and allows defaulting to bogus values for expected environment variables.
2022-04-13 22:53:31 +00:00
Deadbeef
8b60bf6764 Update CI for Rust bors 2022-04-13 16:55:10 +02:00
Deadbeef
73a033e77c
feat: allow customizing the command for running build scripts 2022-04-13 23:45:51 +10:00
bors[bot]
49847a25ae
Merge #11883
11883: fix(ide): move moudle directory when rename r=rainy-me a=rainy-me

fix: #10992

Added `FileSystemEdit::MoveDir` variant for move dirs. Original implemented as recursively move child mod files but had many issues like

1. left empty dir after rename file
2. only affect rust file
3. not performant

so changed to current version

Co-authored-by: rainy-me <github@yue.coffee>
2022-04-12 15:17:00 +00:00
rainy-me
3dd581b97d fix: move dir on rename mod 2022-04-12 23:01:53 +09:00
Lukas Wirth
24af94b474 fix: Unset test feature in rustc source crates 2022-04-12 00:19:40 +02:00
Lukas Wirth
b90df7997d Add simplistic config validation 2022-04-11 13:10:43 +02:00
Lukas Wirth
6d7055e322 Show config deseralization failures on start up 2022-04-11 13:05:34 +02:00
bors[bot]
7a564af989
Merge #11935
11935: feat: Switch to LSP inlay hints r=lnicola a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-04-11 09:29:15 +00:00
Lukas Wirth
2d445de170 minor: bump lsp-server version 2022-04-09 00:13:47 +02:00