File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff 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- // 
23+ // 
2424pub ( crate ) fn expand_macro ( db : & RootDatabase , position : FilePosition ) -> Option < ExpandedMacro > {
2525 let sema = Semantics :: new ( db) ;
2626 let file = sema. parse ( position. file_id ) ;
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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 {
You can’t perform that action at this time.
0 commit comments