File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
crates/ark/src/lsp/completions/sources Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,20 @@ fn is_identifier_like(x: Node) -> bool {
201
201
return true ;
202
202
}
203
203
204
+ // Consider when the user asks for completions with no existing
205
+ // text-to-complete, such as at the R prompt in the Console, in an empty R
206
+ // file, or on an empty line of a non-empty R file.
207
+ //
208
+ // Gesture-wise, a Positron user could do this with Ctrl + Space, which
209
+ // invokes the command editor.action.triggerSuggest.
210
+ //
211
+ // The nominal completion node in these cases is just the root or 'Program'
212
+ // node of the AST. In this case, we should just provide "all" completions,
213
+ // for some reasonable definition of "all".
214
+ if x. node_type ( ) == NodeType :: Program {
215
+ return true ;
216
+ }
217
+
204
218
return false ;
205
219
}
206
220
You can’t perform that action at this time.
0 commit comments