File tree 4 files changed +7
-5
lines changed
4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ pub struct ExpandedMacro {
14
14
15
15
// Feature: Expand Macro Recursively
16
16
//
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 .
18
18
//
19
19
// | Editor | Action Name |
20
20
// |---------|-------------|
21
21
// | VS Code | **rust-analyzer: Expand macro recursively** |
22
22
//
23
- // 
23
+ // 
24
24
pub ( crate ) fn expand_macro ( db : & RootDatabase , position : FilePosition ) -> Option < ExpandedMacro > {
25
25
let sema = Semantics :: new ( db) ;
26
26
let file = sema. parse ( position. file_id ) ;
Original file line number Diff line number Diff line change @@ -208,6 +208,7 @@ impl ProjectFolders {
208
208
let entry = {
209
209
let mut dirs = vfs:: loader:: Directories :: default ( ) ;
210
210
dirs. extensions . push ( "rs" . into ( ) ) ;
211
+ dirs. extensions . push ( "toml" . into ( ) ) ;
211
212
dirs. include . extend ( root. include ) ;
212
213
dirs. exclude . extend ( root. exclude ) ;
213
214
for excl in global_excludes {
Original file line number Diff line number Diff line change @@ -57,8 +57,9 @@ export interface TextDocumentEdit {
57
57
}
58
58
```
59
59
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 ` .
62
63
63
64
### Example
64
65
Original file line number Diff line number Diff line change 156
156
},
157
157
{
158
158
"command" : " rust-analyzer.expandMacro" ,
159
- "title" : " Expand macro recursively" ,
159
+ "title" : " Expand macro recursively at caret " ,
160
160
"category" : " rust-analyzer"
161
161
},
162
162
{
You can’t perform that action at this time.
0 commit comments