Jonas Schievink
d328ee647f
Use log::error!
in a few more places
2020-09-17 17:37:52 +02:00
Lukas Wirth
adc4c6b9d7
Make MergeBehaviour configurable
2020-09-12 12:11:16 +02:00
Andy Russell
24805d1d80
default checkOnSave.enable
to true
in server
2020-09-02 17:44:21 -04:00
Aleksey Kladov
0866b1be89
Align diagnostics config with the rest of rust-analyzer
2020-08-18 16:03:15 +02:00
Igor Aleksanov
34847c8d96
Move analysis config structure to the config.rs
2020-08-18 13:35:36 +03:00
Igor Aleksanov
b56cfcca10
Make disabled diagnostics an argument of corresponding function
2020-08-18 13:32:29 +03:00
Igor Aleksanov
c26c911ec1
Merge branch 'master' into add-disable-diagnostics
2020-08-14 07:34:07 +03:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00
Pavan Kumar Sunkara
eac24d52e6
Rename ra_project_model -> project_model
2020-08-13 12:05:30 +02:00
Igor Aleksanov
90857ff8b0
Add an AnalysisConfig structure and use it to configure diagnostics run
2020-08-07 14:25:55 +03:00
Clemens Wasser
8d9f8ac273
flycheck: Added checkOnSave.noDefaultFeatures
...
This commit adds the option
`rust-analyzer.checkOnSave.noDefaultFeatures`
and fixes #5550 .
2020-07-30 16:04:01 +02:00
Jonas Schievink
f6f49735e8
Add toggle for experimental diagnostics
2020-07-24 17:39:16 +02:00
bors[bot]
818aeb8a24
Merge #5467
...
5467: Allow null or empty values for configuration r=matklad a=kjeremy
Allow the client to respond to `workspace/configuration` with `null` values. This is allowed per the spec if the client doesn't know about the configuration we've requested.
This also protects against `null` or `{}` during initialize. I'm not sure if we want to interpret `{}` as "don't change anything" but I think that's a reasonable approach to take.
This should help with LSP clients working out of the box.
Fixes #5464
Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-07-21 09:41:54 +00:00
Aleksey Kladov
8f3fdf3315
Typo
2020-07-21 10:50:24 +02:00
Aleksey Kladov
a20b8d751b
Propagate cargo.target to checkOnSave
2020-07-21 10:30:54 +02:00
kjeremy
a32dd9c478
Protect against {}
2020-07-20 18:11:32 -04:00
kjeremy
adc4bb5406
Allow client to respond to workspace/configuration with null values
...
This is allowed per the spec if the client doesn't know about the configuration
we've requested.
2020-07-20 17:42:48 -04:00
Aleksey Kladov
e1e79cf064
Take label offets client capability into account
2020-07-16 18:48:02 +02:00
Aleksey Kladov
d0a8f6a3eb
Automatically reload project info on Cargo.toml changes
2020-07-10 15:35:15 +02:00
Aleksey Kladov
17edf50e2c
Avoid accidently stumping over config values
2020-07-10 10:07:08 +02:00
Aleksey Kladov
7ae696ba76
Remove unwanted dependency
2020-07-08 18:26:31 +02:00
Aleksey Kladov
569504938e
Fix typo
2020-07-05 11:19:16 +02:00
Aleksey Kladov
b8ef8539a6
Fix workspace reloading
2020-07-03 17:19:00 +02:00
Aleksey Kladov
3ef7676076
Implement StatusBar
2020-07-02 15:32:14 +02:00
Aleksey Kladov
a03cfa4926
Automatically reload project on config change
2020-07-01 16:42:14 +02:00
Aleksey Kladov
72fb712dff
Add new module for project loading stuff
2020-06-26 00:27:57 +02:00
Aleksey Kladov
0ec5d4f55c
Rename ra_flycheck -> flycheck
2020-06-25 09:13:46 +02:00
Aleksey Kladov
e6c61d5072
Cleanup project.json deserialization
2020-06-24 16:16:52 +02:00
Aleksey Kladov
a07cad16ab
Rename json_project -> project_json
2020-06-24 16:03:24 +02:00
Aleksey Kladov
154cb8243b
Be more explicit about absolute paths at various places
2020-06-24 14:39:34 +02:00
vsrs
c50157f330
Add Go to Type Definition
hover action.
2020-06-18 10:15:43 +03:00
Gabriel Valfridsson
656e95211e
Warnings as hint or info
2020-06-17 00:00:43 +02:00
Thiébaud Weksteen
44f28f65af
Accept relative paths in rust-project.json
...
If a relative path is found as part of Crate.root_module or Root.path,
interpret it as relative to the location of the rust-project.json file.
2020-06-15 13:11:53 +02:00
Clemens Wasser
fe21fc2d25
checkOnSafe.features and checkOnSafe.allFeatures now work identically.
2020-06-10 09:37:26 +02:00
Clemens Wasser
33b9058838
Most of the checkOnSafe options now default to the cargo equivalent.
2020-06-10 09:27:25 +02:00
Clemens Wasser
47ef544fa5
Added the rust-analyzer.checkOnSave.features option.
2020-06-10 08:51:11 +02:00
Clemens Wasser
684b6fa1b8
flycheck now uses the configured features
2020-06-09 21:47:54 +02:00
vsrs
3434f1dd2c
Add Run|Debug hover actions
2020-06-06 18:17:52 +03:00
vsrs
78c9223b7b
Remove hover contents marking as trusted.
...
Hover contents might be extracted from raw
doc comments and need some validation.
2020-06-05 15:25:01 +03:00
vsrs
b147e6eb95
Code formatting
2020-06-05 15:00:30 +03:00
vsrs
7d0dd17b09
Add hover actions as LSP extension
2020-06-05 14:59:26 +03:00
Mikhail Rakhmanov
6a0083a519
Merge branch 'master' into compute-lazy-assits
...
# Conflicts:
# crates/rust-analyzer/src/main_loop/handlers.rs
# crates/rust-analyzer/src/to_proto.rs
2020-06-03 19:26:01 +02:00
Aleksey Kladov
fa019c8f56
Document rust-project.json
2020-06-03 15:17:26 +02:00
Aleksey Kladov
8baa4c5d07
Groundwork for specifying the set of projects via config
2020-06-03 12:22:01 +02:00
Mikhail Rakhmanov
cb482e6351
Merge remote-tracking branch 'upstream/master' into compute-lazy-assits
...
# Conflicts:
# crates/rust-analyzer/src/to_proto.rs
2020-06-02 23:22:45 +02:00
Mikhail Rakhmanov
57cd936c52
Preliminary implementation of lazy CodeAssits
2020-06-02 23:10:53 +02:00
Laurențiu Nicola
7a66d99897
Disable rust-analyzer.{cargo,checkOnSave}.allFeatures by default
2020-06-02 19:14:34 +03:00
kjeremy
7a46a99490
And a few drive-bys
2020-05-22 17:26:31 -04:00
Aleksey Kladov
2075e77ee5
CodeAction groups
2020-05-22 17:32:46 +02:00
Aleksey Kladov
a752853350
Add snippetTextEdit protocol extension
2020-05-19 20:28:27 +02:00
Aleksey Kladov
c847c079fd
Add AssistConfig
2020-05-19 20:28:27 +02:00
vsrs
78817a3194
Add "rust-analyzer.lens.enable"
2020-05-18 10:27:00 +03:00
vsrs
3d445256fe
code formatting
2020-05-17 20:38:50 +03:00
vsrs
dc217bdf90
CodeLens configuration options.
2020-05-17 19:51:44 +03:00
Jeremy Kolb
d4471dccfe
Check client capabilities before sending progress notifications
...
Fixes #4384
2020-05-11 13:16:46 -04:00
guigui64
c22660179c
add the allFeatures flag (true by default)
2020-05-05 22:46:42 +02:00
bors[bot]
8803e748a6
Merge #4166
...
4166: Defining a default target to support cross-compilation targets r=matklad a=FuriouZz
Related to #4163
Co-authored-by: Christophe MASSOLIN <christophe.massolin@gmail.com>
2020-05-05 17:25:52 +00:00
Christophe MASSOLIN
0ab4340cdb
Rename defaultTarget
to target
2020-05-05 18:01:54 +02:00
Andrew Chin
65234e8828
Remove workspaceLoaded
setting
...
The `workspaceLoaded` notification setting was originally designed to
control the display of a popup message that said:
"workspace loaded, {} rust packages"
This popup was removed and replaced by a much sleeker message in the
VSCode status bar that provides a real-time status while loading:
rust-analyzer: {}/{} packages
This was done as part of #3587
The new status-bar indicator is unobtrusive and shouldn't need to be
disabled. So this setting is removed.
2020-05-01 21:04:41 -04:00
kjeremy
e3ee61f5e8
Filter out CodeActions if a server only support commands.
2020-05-01 13:44:32 -04:00
Christophe MASSOLIN
ed5af989f4
[config] rename cargo.defaultTarget
2020-04-28 00:15:54 +02:00
Christophe MASSOLIN
b7edffe244
Started rust-analyzer.cargo.defaultTarget implementation
2020-04-27 00:11:04 +02:00
kjeremy
ae1f77e5e9
Add hierarchical symbols client capability
2020-04-24 10:08:45 -04:00
Aleksey Kladov
440cd05edb
Honor snippet capability
...
closes #2518
2020-04-24 02:41:07 +02:00
Aleksey Kladov
b3050bded1
Introduce internal snippet cap
2020-04-24 02:06:12 +02:00
Aleksey Kladov
ca6d7bfe61
Cleanup proc_macro config
...
In general, there should be no reason to call `.to_string_lossy`.
If you want to display the path, use `.display()`.
If you want to pass the path to an OS API (like std::process::Command)
than use `PathBuf` or `OsString`.
2020-04-23 18:55:26 +02:00
veetaha
364fbd7fc7
Simplify config
2020-04-23 01:30:55 +03:00
Aleksey Kladov
9e16e2b279
Align the name of proc-macro enabling flag
...
We use `enable`, not `enabled` elsewhere
2020-04-22 17:22:59 +02:00
Aleksey Kladov
d436beeb04
Match implementation of diagnostics flag to the docs
2020-04-22 17:22:18 +02:00
Edwin Cheng
ef6ee16006
Fix path for proc-macro in nightly / stable build
2020-04-17 04:45:03 +08:00
Edwin Cheng
177becea98
Add proc-macro cli command for rust-analyzer
2020-04-16 21:13:57 +08:00
Edwin Cheng
a4b0ce07f8
Add config for proc_macro
2020-04-16 19:28:06 +08:00
Josh Mcguigan
8f7fceeb9c
fix cargo check config with custom command
2020-04-06 21:41:31 -07:00
veetaha
a1773f8a67
Remove explicit generic type parameter
2020-04-04 16:12:09 +03:00
veetaha
b5a7cb331f
Simplify config
2020-04-04 16:04:49 +03:00
Aleksey Kladov
8a788c764f
Allow fully overriding check and fmt commands
2020-04-02 14:35:51 +02:00
Aleksey Kladov
7a4ebd2c8d
Remove vscode_lldb setting
2020-04-02 12:56:14 +02:00
Aleksey Kladov
e21bf1b2b9
Siplify
2020-04-02 12:50:34 +02:00
Aleksey Kladov
48c58309cc
Lean onto default implementation of configs
2020-04-02 12:47:58 +02:00
Aleksey Kladov
e4cf40a152
New config in package.json
2020-04-02 12:27:09 +02:00
Aleksey Kladov
0dde0f92de
Reorder fields
2020-04-02 11:33:49 +02:00
Aleksey Kladov
309fc70155
Remove old syntax highlighting
2020-04-02 09:52:27 +02:00
Aleksey Kladov
1225f719fe
Fix pointer syntax
2020-04-01 19:27:45 +02:00
Aleksey Kladov
1ac345a9f6
Centralize defaults
2020-04-01 18:56:47 +02:00
Aleksey Kladov
4936abdd49
Reduce scope of deserialization
2020-04-01 18:51:16 +02:00
Aleksey Kladov
e870cbc23d
Centralize client capabilities
2020-04-01 18:46:26 +02:00
Aleksey Kladov
a97e5eb85d
Centralize all config
2020-04-01 18:41:43 +02:00
Aleksey Kladov
1e012eb991
Move all config to config
2020-04-01 17:22:56 +02:00
Aleksey Kladov
797cd34c7c
Reduce feature flags
2020-04-01 17:00:37 +02:00
Aleksey Kladov
b9bf29019d
Move config to config.rs
2020-04-01 14:32:04 +02:00
Matt Hooper
a197abbc7a
Added new inlay hint kind and rules for method chaining
2020-03-24 23:18:42 +01:00
Emil Lauridsen
f5a2fcf8f5
Change existing OUT_DIR override config to make use of new infrastructure
2020-03-17 14:47:05 +01:00
bors[bot]
4c85e53531
Merge #3561 #3577
...
3561: feat: add debug code lens r=matklad a=hdevalke
Refs #3539
3577: Protect against infinite macro expansion in def collector r=edwin0cheng a=flodiebold
Something I noticed while trying to make macro expansion more resilient against errors.
There was a test for this, but it wasn't actually working because the first recursive expansion failed. (The comma...)
Even with this limit, that test (when fixed) still takes some time to pass because of the exponential growth of the expansions, so I disabled it and added a different one without growth.
CC @edwin0cheng
Co-authored-by: Hannes De Valkeneer <hannes@de-valkeneer.be>
Co-authored-by: hdevalke <2261239+hdevalke@users.noreply.github.com>
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
2020-03-13 14:01:29 +00:00
Hannes De Valkeneer
39c92b3872
fixup! feat: add debug code lens
...
autodetect vscode-lldb
2020-03-12 22:31:47 +01:00
Aleksey Kladov
b3fa7312a7
Simpler deserialization
2020-03-12 18:01:36 +01:00
Aleksey Kladov
fd3ece2b73
Make naming more uniform
2020-03-12 17:38:48 +01:00
bors[bot]
d98a5fab46
Merge #3543
...
3543: Parameter inlay hint separate from variable type inlay? #2876 r=matklad a=slyngbaek
Add setting to allow enabling either type inlay hints or parameter
inlay hints or both. Group the the max inlay hint length option
into the object.
- Add a new type for the inlayHint options.
- Add tests to ensure the inlays don't happen on the server side
Co-authored-by: Steffen Lyngbaek <steffenlyngbaek@gmail.com>
2020-03-12 16:02:55 +00:00
Steffen Lyngbaek
58248e24cd
Switch from Vec<InlayKind> to object with props
...
- Instead of a single object type, use several individual nested types
to allow toggling from the settings GUI
- Remove unused struct definitions
- Install and test that the toggles work
2020-03-11 20:14:39 -07:00
Steffen Lyngbaek
974ed7155a
Deduplicate some Inlay definitions
...
- Remove match conversion for InlayKind since we're using remote
2020-03-10 18:59:49 -07:00
Steffen Lyngbaek
cfb48df149
Address Issues from Github
...
- Updated naming of config
- Define struct in ra_ide and use remote derive in rust-analyzer/config
- Make inlayConfig type more flexible to support more future types
- Remove constructor only used in tests
2020-03-10 14:36:01 -07:00
Steffen Lyngbaek
e98aff109a
Parameter inlay hint separate from variable type inlay? #2876
...
Add setting to allow enabling either type inlay hints or parameter
inlay hints or both. Group the the max inlay hint length option
into the object.
- Add a new type for the inlayHint options.
- Add tests to ensure the inlays don't happen on the server side
2020-03-10 14:33:45 -07:00
Edwin Cheng
c1db5d26a0
Add additional_outdirs in config
2020-03-11 01:06:01 +08:00
Aleksey Kladov
865759925b
Rename folder
2020-02-18 12:37:45 +01:00