Since the expression editor lacks access to the source code, it cannot retrieve completions from the text document. To address this, a LS API, expressionEditor/completions, appends changes to a temporary project to obtain the necessary completions.
Remarks
Duplicating the project introduces significant complexity in terms of both performance and memory, as it duplicates memory usage and involves many I/O operations. Therefore, we should explore an approach where the expression editor retrieves completions from the original project. This would be feasible if the state in which the user uses the expression editor does not trigger the other APIs.
Description
Since the expression editor lacks access to the source code, it cannot retrieve completions from the text document. To address this, a LS API,
expressionEditor/completions
, appends changes to a temporary project to obtain the necessary completions.Remarks
Duplicating the project introduces significant complexity in terms of both performance and memory, as it duplicates memory usage and involves many I/O operations. Therefore, we should explore an approach where the expression editor retrieves completions from the original project. This would be feasible if the state in which the user uses the expression editor does not trigger the other APIs.