aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge #4448bors[bot]2020-05-155-100/+244
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4448: Generate configuration for launch.json r=vsrs a=vsrs This PR adds two new commands: `"rust-analyzer.debug"` and `"rust-analyzer.newDebugConfig"`. The former is a supplement to the existing `"rust-analyzer.run"` command and works the same way: asks for a runnable and starts new debug session. The latter allows adding a new configuration to **launch.json** (or to update an existing one). If the new option `"rust-analyzer.debug.useLaunchJson"` is set to true then `"rust-analyzer.debug"` and Debug Lens will first look for existing debug configuration in **launch.json**. That is, it has become possible to specify startup arguments, env variables, etc. `"rust-analyzer.debug.useLaunchJson"` is false by default, but it might be worth making true the default value. Personally I prefer true, but I'm not sure if it is good for all value. ---- I think that this PR also solves https://github.com/rust-analyzer/rust-analyzer/issues/3441. Both methods to update launch.json mentioned in the issue do not work: 1. Menu. It is only possible to add a launch.json configuration template via a debug adapter. And anyway it's only a template and it is impossible to specify arguments from an extension. 2. DebugConfigurationProvider. The exact opposite situation: it is possible to specify all debug session settings, but it is impossible to export these settings to launch.json. Separate `"rust-analyzer.newDebugConfig"` command looks better for me. ---- Fixes #4450 Fixes #3441 Co-authored-by: vsrs <[email protected]> Co-authored-by: vsrs <[email protected]>
| * Fix occasional test run during debug configurationvsrs2020-05-151-1/+5
| |
| * Fix runnable naming in the client side fallback.vsrs2020-05-141-1/+1
| |
| * Multiple binaries support for launch.json.vsrs2020-05-141-2/+3
| | | | | | | | Generate unique names on the LSP side.
| * Mixed "bin" and "test" artifacts workaround.vsrs2020-05-141-2/+7
| |
| * Multiple binaries support for launch.json.vsrs2020-05-141-0/+5
| |
| * Fix "rust-analyzer.debug" for QuickPick binaries.vsrs2020-05-141-0/+4
| |
| * Runnable quick pick with buttonsvsrs2020-05-141-21/+61
| |
| * Remove "rust-analyzer.debug.useLaunchJson" optionvsrs2020-05-142-14/+10
| |
| * Use launch.json in Debug Lens sessions.vsrs2020-05-132-2/+20
| | | | | | | | Add the possibility to use existing configurations via Debug Lens
| * DebugConfiguration simplification.vsrs2020-05-111-1/+11
| | | | | | | | ${workspaceRoot} substitution in generated DebugConfiguration.
| * "rust-analyzer.newDebugConfig" commandvsrs2020-05-113-3/+31
| |
| * "rust-analyzer.debug" commandvsrs2020-05-113-106/+139
| |
* | Make some stuff public so that they can be reused by other toolsPavan Kumar Sunkara2020-05-141-1/+1
| |
* | Merge #4083bors[bot]2020-05-131-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | 4083: Smol documentation for ast nodes r=matklad a=Veetaha There is a tremendous amount of TODOs to clarify the topics I am not certain about. Please @matklad, @edwin0cheng review carefully, I even left some mentions of your names in todos to put your attention where you most probably can give comments. In order to simplify the review, I separated the codegen (i.e. changes in `ast/generated/nodes.rs`) from `ast_src` changes (they in fact just duplicate one another) into two commits. Also, I had to hack a little bit to let the docs be generated as doc comments and not as doc attributes because it's easier to read them this way and IIRC we don't support hints for `#[doc = ""]` attributes for now... Closes #3682 Co-authored-by: veetaha <[email protected]>
| * Fix "show syntax tree" commandveetaha2020-05-101-1/+1
| | | | | | | | @matlkad please don't forget to keep it up-to-date!
* | Word fixEdwin Cheng2020-05-101-1/+1
|/
* Merge remote-tracking branch 'upstream/master' into uniformed_debug_lensvsrs2020-05-085-45/+70
|\ | | | | | | | | # Conflicts: # editors/code/src/commands/runnables.ts
| * Merge #4329bors[bot]2020-05-084-40/+67
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4329: Look for `cargo`, `rustc`, and `rustup` in standard installation path r=matklad a=cdisselkoen Discussed in #3118. This is approximately a 90% fix for the issue described there. This PR creates a new crate `ra_env` with a function `get_path_for_executable()`; see docs there. `get_path_for_executable()` improves and generalizes the function `cargo_binary()` which was previously duplicated in the `ra_project_model` and `ra_flycheck` crates. (Both of those crates now depend on the new `ra_env` crate.) The new function checks (e.g.) `$CARGO` and `$PATH`, but also falls back on `~/.cargo/bin` manually before erroring out. This should allow most users to not have to worry about setting the `$CARGO` or `$PATH` variables for VSCode, which can be difficult e.g. on macOS as discussed in #3118. I've attempted to replace all calls to `cargo`, `rustc`, and `rustup` in rust-analyzer with appropriate invocations of `get_path_for_executable()`; I don't think I've missed any in Rust code, but there is at least one invocation in TypeScript code which I haven't fixed. (I'm not sure whether it's affected by the same problem or not.) https://github.com/rust-analyzer/rust-analyzer/blob/a4778ddb7a00f552a8e653bbf56ae9fd69cfe1d3/editors/code/src/cargo.ts#L79 I'm sure this PR could be improved a bunch, so I'm happy to take feedback/suggestions on how to solve this problem better, or just bikeshedding variable/function/crate names etc. cc @Veetaha Fixes #3118. Co-authored-by: Craig Disselkoen <[email protected]> Co-authored-by: veetaha <[email protected]>
| | * Fix cargo not found on macos bug at vscode extension sideveetaha2020-05-063-7/+48
| | |
| | * Preliminary refactoring of cargo.tsveetaha2020-05-062-33/+19
| | |
| * | Add master config for inlayHints to make disabling easyAleksey Kladov2020-05-082-7/+8
| |/
* | Add CodeLLDB Rust visualizationvsrs2020-05-071-1/+2
| |
* | Add separate settings for each debug engine.vsrs2020-05-071-3/+6
| |
* | Add additional debug optionsvsrs2020-05-072-3/+11
| |
* | Uniformed way to get Debug Lens target executable.vsrs2020-05-062-28/+37
|/
* Drop dead code and a dependency!veetaha2020-05-051-129/+0
|
* fixed lint warningvsrs2020-04-301-1/+1
|
* Removed unnecessary extraArgs for cargo invocationvsrs2020-04-302-6/+3
|
* Fixed tsfmt and eslint errors.vsrs2020-04-302-19/+19
|
* pass Cargo errors to the Debug output channelvsrs2020-04-302-6/+18
|
* MS C++ tools on linuxvsrs2020-04-291-1/+2
|
* better configuration enum itemsvsrs2020-04-292-2/+2
|
* Configuration settings and source maps supportvsrs2020-04-293-10/+33
|
* ms-vscode.cpptools debugger support, initial version.vsrs2020-04-282-12/+138
|
* Merge #4145bors[bot]2020-04-251-29/+0
|\ | | | | | | | | | | | | | | | | | | | | 4145: Remove dead code r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * Remove dead codeAleksey Kladov2020-04-251-29/+0
| |
* | Remove unnecessary async from vscode language client creationveetaha2020-04-252-2/+2
|/
*-. Merge #3998 #4006bors[bot]2020-04-241-3/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3998: Make add_function generate functions in other modules via qualified path r=matklad a=TimoFreiberg Additional feature for #3639 - [x] Add tests for paths with more segments - [x] Make generating the function in another file work - [x] Add `pub` or `pub(crate)` to the generated function if it's generated in a different module - [x] Make the assist jump to the edited file - [x] Enable file support in the `check_assist` helper 4006: Syntax highlighting for format strings r=matklad a=ltentrup I have an implementation for syntax highlighting for format string modifiers `{}`. The first commit refactors the changes in #3826 into a separate struct. The second commit implements the highlighting: first we check in a macro call whether the macro is a format macro from `std`. In this case, we remember the format string node. If we encounter this node during syntax highlighting, we check for the format modifiers `{}` using regular expressions. There are a few places which I am not quite sure: - Is the way I extract the macro names correct? - Is the `HighlightTag::Attribute` suitable for highlighting the `{}`? Let me know what you think, any feedback is welcome! Co-authored-by: Timo Freiberg <[email protected]> Co-authored-by: Leander Tentrup <[email protected]> Co-authored-by: Leander Tentrup <[email protected]>
| * | Jump to sourceChanges in other filesTimo Freiberg2020-04-211-3/+5
| |/
* | tasks.json SupportJonathan Dickinson2020-04-231-36/+67
| | | | | | | | | | | | | | | | Move the task provider anonymous class into a real class, as this seems to be how Microsoft do this in their documentation. resolveTask is now implemented, which is used by VSCode to determine how to execute tasks that the user has defined in tasks.json.
* | Refactor the workaround a bitveetaha2020-04-221-19/+16
| |
* | Work around crlf in syntax treeveetaha2020-04-221-2/+38
|/
* Add config for proc_macroEdwin Cheng2020-04-161-0/+1
|
* fix: inlay hints config desyncronization between the frontend and the backendveetaha2020-04-111-2/+3
| | | | | See the explanation in the issue comment: https://github.com/rust-analyzer/rust-analyzer/issues/3924#issuecomment-612444566
* Merge #3942bors[bot]2020-04-111-9/+30
|\ | | | | | | | | | | | | | | | | | | 3942: vscode: fix typing bug in config r=matklad a=Veetaha I noticed that the type of nullable properties in config is actually non-nullable ![Screenshot from 2020-04-11 15-29-45](https://user-images.githubusercontent.com/36276403/79043702-6a686d80-7c09-11ea-9ae8-f1a777c7d0f2.png) Co-authored-by: veetaha <[email protected]>
| * vscode: fix typing bug in configveetaha2020-04-111-9/+30
| |
* | vscode: fix indentveetaha2020-04-111-5/+5
|/
* Enable the SemanticTokensFeature by defaultkjeremy2020-04-083-12/+7
| | | | | | | This is covered under vscode's "editor.semanticHighlighting.enabled" setting plus the user has to have a theme that has opted into highlighting. Bumps required vscode stable to 1.44
* vscode: log server binary pathveetaha2020-04-041-0/+2
|