aboutsummaryrefslogtreecommitdiff
path: root/editors/code
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Tweak the textmate fallback scopes to be consistent with builtin TextMate ↵George Fraser2020-05-101-8/+8
| |/ |/| | | | | grammar and other languages
* | Word fixEdwin Cheng2020-05-101-1/+1
|/
* Merge remote-tracking branch 'upstream/master' into uniformed_debug_lensvsrs2020-05-086-46/+85
|\ | | | | | | | | # 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-083-7/+13
| | |
| * | Use the correct color for structsAleksey Kladov2020-05-071-0/+3
| | | | | | | | | | | | This works around https://github.com/microsoft/vscode/issues/97162
| * | Better mapping to TextMate scopes for keywordsAleksey Kladov2020-05-061-0/+6
| | | | | | | | | | | | https://github.com/microsoft/vscode/issues/94367#issuecomment-608629883
| * | package.json: Minor configuration spelling fixSean Bright2020-05-061-1/+1
| |/
* | "rust-analyzer.debug.openDebugPane"vsrs2020-05-081-1/+1
| | | | | | Co-authored-by: bjorn3 <[email protected]>
* | Add CodeLLDB Rust visualizationvsrs2020-05-072-2/+3
| |
* | Add separate settings for each debug engine.vsrs2020-05-072-5/+8
| |
* | Add additional debug optionsvsrs2020-05-073-3/+21
| |
* | Uniformed way to get Debug Lens target executable.vsrs2020-05-062-28/+37
|/
* Drop dead code and a dependency!veetaha2020-05-053-135/+0
|
* add the allFeatures flag (true by default)guigui642020-05-051-0/+5
|
* Merge #4166bors[bot]2020-05-051-0/+8
|\ | | | | | | | | | | | | | | 4166: Defining a default target to support cross-compilation targets r=matklad a=FuriouZz Related to #4163 Co-authored-by: Christophe MASSOLIN <[email protected]>
| * Rename `defaultTarget` to targetChristophe MASSOLIN2020-05-051-2/+2
| |
| * [config] rename cargo.defaultTargetChristophe MASSOLIN2020-04-271-1/+1
| |
| * Started rust-analyzer.cargo.defaultTarget implementationChristophe MASSOLIN2020-04-261-0/+8
| |
* | Fix typo in markdownDescriptionszunami2020-05-041-1/+1
| |
* | Specify cotributed semanticTokenTypes in package.jsonAleksey Kladov2020-05-041-0/+4
| |
* | Remove `workspaceLoaded` settingAndrew Chin2020-05-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge #4222bors[bot]2020-04-304-13/+194
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4222: Introduce C/C++ for Visual Studio Code extension as an alternative debug engine for Debug Code lens. r=matklad a=vsrs At the moment Debug Code Lens can use only one debug engine: lldb via [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) extension. This PR adds support of the debug engine from the [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension, as well as the configuration option. If both extensions are installed, `CodeLLDB` will be used by default. Another new option `rust-analyzer.debug.sourceFileMap` allows, for example, to step into Rust std library during debugging. Works only with `MS C++ tools`. On Windows: ```json "rust-analyzer.debug.sourceFileMap": { "/rustc/4fb7144ed159f94491249e86d5bbd033b5d60550": "${env:USERPROFILE}/.rustup/toolchains/stable-x86_64-pc-windows-msvc/lib/rustlib/src/rust" } ``` On Linux: ```json "rust-analyzer.debug.sourceFileMap": { "/rustc/4fb7144ed159f94491249e86d5bbd033b5d60550": "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust" } ``` Co-authored-by: vsrs <[email protected]>
| * | 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-303-7/+19
| | |
| * | MS C++ tools on linuxvsrs2020-04-291-1/+2
| | |
| * | better configuration enum itemsvsrs2020-04-293-13/+16
| | |
| * | Configuration settings and source maps supportvsrs2020-04-294-10/+52
| | |
| * | ms-vscode.cpptools debugger support, initial version.vsrs2020-04-282-12/+138
| | |
* | | Build extension tooJonas Schievink2020-04-281-0/+1
|/ /
* | 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
| | |
* | | Disable onEnter command by defaultAleksey Kladov2020-04-231-5/+0
| | | | | | | | | | | | | | | We are transitioning from experimental to production-ready stance, so it makes sense to disable potentially disruptive features by default.
* | | 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.
* | | Merge #4090bors[bot]2020-04-221-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4090: Fix config naming r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Align the name of proc-macro enabling flagAleksey Kladov2020-04-221-1/+1
| |/ / | | | | | | | | | We use `enable`, not `enabled` elsewhere
* | | npm updatekjeremy2020-04-222-50/+109
| | |
* | | Merge #4081bors[bot]2020-04-221-2/+35
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4081: Work around crlf in syntax tree r=matklad a=Veetaha Workarounds fixes #4067 Co-authored-by: veetaha <[email protected]>
| * | | Refactor the workaround a bitveetaha2020-04-221-19/+16
| | | |
| * | | Work around crlf in syntax treeveetaha2020-04-221-2/+38
| |/ /
* / / Fix .rast tmGrammar to account for numbers in identifiersveetaha2020-04-221-1/+1
|/ /
* / Add semantic tag for unresolved referencesAleksey Kladov2020-04-181-0/+4
|/ | | | | | | | | | | This is a quick way to implement unresolved reference diagnostics. For example, adding to VS Code config "editor.tokenColorCustomizationsExperimental": { "unresolvedReference": "#FF0000" }, will highlight all unresolved refs in red.
* Add proc-macro cli command for rust-analyzerEdwin Cheng2020-04-161-5/+0
|