Replies: 3 comments 7 replies
-
Currently, we have a major blocker when it comes to the code actions where we generate variable names with the keywords. It is mandatory for the language server to get the keywords and also, as @rasika mentioned, we are keeping a list of preserved keywords (not all) in language server for snippet generation as well. We need to prioritise this |
Beta Was this translation helpful? Give feedback.
-
Another requirement from the LS side could be to reuse the identifier matching logic used in the parser. Refer to the comment #28798 (comment) by @rasika. We can do the following from the parser's side to address this. I'm not very sure exposing this way is a good idea.
|
Beta Was this translation helpful? Give feedback.
-
For anyone going through this discussion, this requirement was addressed with |
Beta Was this translation helpful? Give feedback.
-
Is there anyway to expose LexerTerminals defined in https://github.com/ballerina-platform/ballerina-lang/blob/master/compiler/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/LexerTerminals.java ?
This is required for many langserver features such completions, code-actions to get reserved keywords of the Ballerina language.
Key requirement is there's no way to skip suggesting reserved keywords as variables-names. not only for the variable names, when suggesting auto-imports we need to escape module-names that has reserved keywords. Even I believe keywords should be transparent for the completion suggestions as well. So that we don't need duplicate and maintain 'em in langserver level.
looping @sameerajayasoma @Kishanthan @hasithaa @lochana-chathura @rdulmina
Beta Was this translation helpful? Give feedback.
All reactions