Closed lots0logs closed 3 years ago
The PSI structure looks ok:
GO_TEMPLATE_FILE(0,122)
GoTemplateStatementListImpl(STATEMENT_LIST)(0,122)
GoTemplateIfStatementImpl(IF_STATEMENT)(0,122)
PsiElement({{)('{{')(0,2)
PsiWhiteSpace(' ')(2,3)
PsiElement(if)('if')(3,5)
PsiWhiteSpace(' ')(5,6)
GoTemplateSimplePipelineImpl(SIMPLE_PIPELINE)(6,119)
GoTemplateLiteralExprImpl(LITERAL_EXPR)(6,9)
GoTemplateLiteralImpl(LITERAL)(6,9)
PsiElement(IDENTIFIER)('and')(6,9)
PsiWhiteSpace(' ')(9,10)
GoTemplateParenthesesExprImpl(PARENTHESES_EXPR)(10,94)
PsiElement(()('(')(10,11)
GoTemplateSimplePipelineImpl(SIMPLE_PIPELINE)(11,93)
GoTemplateLiteralExprImpl(LITERAL_EXPR)(11,13)
GoTemplateLiteralImpl(LITERAL)(11,13)
PsiElement(IDENTIFIER)('or')(11,13)
PsiWhiteSpace(' ')(13,14)
GoTemplateParenthesesExprImpl(PARENTHESES_EXPR)(14,49)
PsiElement(()('(')(14,15)
GoTemplateSimplePipelineImpl(SIMPLE_PIPELINE)(15,48)
GoTemplateLiteralExprImpl(LITERAL_EXPR)(15,23)
GoTemplateLiteralImpl(LITERAL)(15,23)
PsiElement(IDENTIFIER)('contains')(15,23)
PsiWhiteSpace(' ')(23,24)
GoTemplateFieldChainExprImpl(FIELD_CHAIN_EXPR)(24,40)
GoTemplateVariableExprImpl(VARIABLE_EXPR)(24,31)
PsiElement(VARIABLE)('$server')(24,31)
PsiElement(.)('.')(31,32)
PsiElement(IDENTIFIER)('Hostname')(32,40)
PsiWhiteSpace(' ')(40,41)
GoTemplateLiteralExprImpl(LITERAL_EXPR)(41,48)
GoTemplateLiteralImpl(LITERAL)(41,48)
GoTemplateStringLiteralImpl(STRING_LITERAL)(41,48)
PsiElement(STRING)('"cloud"')(41,48)
PsiElement())(')')(48,49)
PsiWhiteSpace(' ')(49,50)
GoTemplateParenthesesExprImpl(PARENTHESES_EXPR)(50,93)
PsiElement(()('(')(50,51)
GoTemplateSimplePipelineImpl(SIMPLE_PIPELINE)(51,92)
GoTemplateLiteralExprImpl(LITERAL_EXPR)(51,59)
GoTemplateLiteralImpl(LITERAL)(51,59)
PsiElement(IDENTIFIER)('contains')(51,59)
PsiWhiteSpace(' ')(59,60)
GoTemplateFieldChainExprImpl(FIELD_CHAIN_EXPR)(60,76)
GoTemplateVariableExprImpl(VARIABLE_EXPR)(60,67)
PsiElement(VARIABLE)('$server')(60,67)
PsiElement(.)('.')(67,68)
PsiElement(IDENTIFIER)('Hostname')(68,76)
PsiWhiteSpace(' ')(76,77)
GoTemplateLiteralExprImpl(LITERAL_EXPR)(77,92)
GoTemplateLiteralImpl(LITERAL)(77,92)
GoTemplateStringLiteralImpl(STRING_LITERAL)(77,92)
PsiElement(STRING)('"elegantthemes"')(77,92)
PsiElement())(')')(92,93)
PsiElement())(')')(93,94)
PsiWhiteSpace(' ')(94,95)
GoTemplateParenthesesExprImpl(PARENTHESES_EXPR)(95,119)
PsiElement(()('(')(95,96)
GoTemplateSimplePipelineImpl(SIMPLE_PIPELINE)(96,118)
GoTemplateLiteralExprImpl(LITERAL_EXPR)(96,105)
GoTemplateLiteralImpl(LITERAL)(96,105)
PsiElement(IDENTIFIER)('hasSuffix')(96,105)
PsiWhiteSpace(' ')(105,106)
GoTemplateVariableExprImpl(VARIABLE_EXPR)(106,111)
PsiElement(VARIABLE)('$path')(106,111)
PsiWhiteSpace(' ')(111,112)
GoTemplateLiteralExprImpl(LITERAL_EXPR)(112,118)
GoTemplateLiteralImpl(LITERAL)(112,118)
GoTemplateStringLiteralImpl(STRING_LITERAL)(112,118)
PsiElement(RAW_STRING)('`"^/"`')(112,118)
PsiElement())(')')(118,119)
PsiWhiteSpace(' ')(119,120)
PsiElement(}})('}}')(120,122)
GoTemplateStatementListImpl(STATEMENT_LIST)(122,122)
<empty list>
PsiErrorElement:TEXT or '{{' expected(122,122)
<empty list>
HtmlFile:Dummy.gohtml(0,122)
PsiElement(HTML_DOCUMENT)(0,0)
PsiElement(XML_PROLOG)(0,0)
<empty list>
PsiElement(GoTemplateFragmentElementType)('{{ if and (or (contains $server.Hostname "cloud") (contains $server.Hostname "elegantthemes")) (hasSuffix $path `"^/"`) }}')(0,122)
But it's still not got highlighted yet...
Please SUPPORT US if you like this plugin.
You can download the latest snapshot build from here, just click the latest build and click the 'Artifacts' tab.(You need logged in via github) After the snapshot build downloaded, just drag the zip file into your IDE and done.
Please check
Your programming language(s)
Go Templates
Expected Behavior
Parentheses inside actions should be colorized.
Current Behavior
Parentheses inside actions are not colorized.
Possible Solution
I think this might not be fixable without changes in JetBrains code. I opened this issue as well.
Code snippet for reproduce (for bugs)
Your Environment