Skip to content

Commit 0861100

Browse files
Merge branch 'master' into mdbook-yolo
2 parents f160f31 + 92d9ca7 commit 0861100

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

crates/ide/src/expand_macro.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ pub struct ExpandedMacro {
1414

1515
// Feature: Expand Macro Recursively
1616
//
17-
// Shows the full macro expansion of the macro at current cursor.
17+
// Shows the full macro expansion of the macro at the current caret position.
1818
//
1919
// | Editor | Action Name |
2020
// |---------|-------------|
2121
// | VS Code | **rust-analyzer: Expand macro recursively** |
2222
//
23-
// ![Expand Macro Recursively](/img/features/expand_macro_recursively.gif)
23+
// ![Expand Macro Recursively](https://user-images.githubusercontent.com/48062697/113020648-b3973180-917a-11eb-84a9-ecb921293dc5.gif)
2424
pub(crate) fn expand_macro(db: &RootDatabase, position: FilePosition) -> Option<ExpandedMacro> {
2525
let sema = Semantics::new(db);
2626
let file = sema.parse(position.file_id);

crates/load-cargo/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ impl ProjectFolders {
208208
let entry = {
209209
let mut dirs = vfs::loader::Directories::default();
210210
dirs.extensions.push("rs".into());
211+
dirs.extensions.push("toml".into());
211212
dirs.include.extend(root.include);
212213
dirs.exclude.extend(root.exclude);
213214
for excl in global_excludes {

docs/dev/lsp-extensions.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ export interface TextDocumentEdit {
5757
}
5858
```
5959

60-
When applying such code action or text edit, the editor should insert snippet, with tab stops and placeholder.
61-
At the moment, rust-analyzer guarantees that only a single edit will have `InsertTextFormat.Snippet`.
60+
When applying such code action or text edit, the editor should insert snippet, with tab stops and placeholders.
61+
At the moment, rust-analyzer guarantees that only a single `TextDocumentEdit` will have edits which can be `InsertTextFormat.Snippet`.
62+
Any additional `TextDocumentEdit`s will only have edits which are `InsertTextFormat.PlainText`.
6263

6364
### Example
6465

editors/code/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
},
157157
{
158158
"command": "rust-analyzer.expandMacro",
159-
"title": "Expand macro recursively",
159+
"title": "Expand macro recursively at caret",
160160
"category": "rust-analyzer"
161161
},
162162
{

0 commit comments

Comments
 (0)