|
1116 | 1116 | </dict>
|
1117 | 1117 | <dict>
|
1118 | 1118 | <key>include</key>
|
1119 |
| - <string>#variable</string> |
| 1119 | + <string>#variableWithoutPropertyHighlighting</string> |
1120 | 1120 | </dict>
|
1121 | 1121 | <dict>
|
1122 | 1122 | <key>include</key>
|
|
1140 | 1140 | </dict>
|
1141 | 1141 | <dict>
|
1142 | 1142 | <key>include</key>
|
1143 |
| - <string>#variable</string> |
| 1143 | + <string>#variableWithoutPropertyHighlighting</string> |
1144 | 1144 | </dict>
|
1145 | 1145 | <dict>
|
1146 | 1146 | <key>include</key>
|
|
1515 | 1515 | </dict>
|
1516 | 1516 | </array>
|
1517 | 1517 | </dict>
|
| 1518 | + <key>variableWithoutPropertyHighlighting</key> |
| 1519 | + <dict> |
| 1520 | + <key>patterns</key> |
| 1521 | + <array> |
| 1522 | + <dict> |
| 1523 | + <key>comment</key> |
| 1524 | + <string>Invalid variable name</string> |
| 1525 | + <key>match</key> |
| 1526 | + <string>(\$)(\w+-\w+)\b</string> |
| 1527 | + <key>name</key> |
| 1528 | + <string>invalid.illegal.powershell</string> |
| 1529 | + </dict> |
| 1530 | + <dict> |
| 1531 | + <key>captures</key> |
| 1532 | + <dict> |
| 1533 | + <key>1</key> |
| 1534 | + <dict> |
| 1535 | + <key>name</key> |
| 1536 | + <string>constant.language.powershell</string> |
| 1537 | + </dict> |
| 1538 | + <key>2</key> |
| 1539 | + <dict> |
| 1540 | + <key>name</key> |
| 1541 | + <string>constant.language.powershell</string> |
| 1542 | + </dict> |
| 1543 | + </dict> |
| 1544 | + <key>comment</key> |
| 1545 | + <string>Automatic variables - read-only.</string> |
| 1546 | + <key>match</key> |
| 1547 | + <string>(\$)(?i:(_|args|consolefilename|error|event|eventsubscriber|executioncontext|false|foreach|home|host|input|lastexitcode|matches|myinvocation|nestedpromptlevel|null|pid|psboundparameters|pscmdlet|psculture|psdebugcontext|pshome|psitem|psscriptroot|psuiculture|psversiontable|pwd|sender|shellid|sourceargs|sourceeventargs|switch|this|true))\b</string> |
| 1548 | + </dict> |
| 1549 | + <dict> |
| 1550 | + <key>captures</key> |
| 1551 | + <dict> |
| 1552 | + <key>1</key> |
| 1553 | + <dict> |
| 1554 | + <key>name</key> |
| 1555 | + <string>keyword.other.powershell</string> |
| 1556 | + </dict> |
| 1557 | + <key>2</key> |
| 1558 | + <dict> |
| 1559 | + <key>name</key> |
| 1560 | + <string>storage.modifier.scope.powershell</string> |
| 1561 | + </dict> |
| 1562 | + <key>3</key> |
| 1563 | + <dict> |
| 1564 | + <key>name</key> |
| 1565 | + <string>variable.other.readwrite.powershell</string> |
| 1566 | + </dict> |
| 1567 | + <key>4</key> |
| 1568 | + <dict> |
| 1569 | + <key>name</key> |
| 1570 | + <string>variable.other.readwrite.powershell</string> |
| 1571 | + </dict> |
| 1572 | + </dict> |
| 1573 | + <key>comment</key> |
| 1574 | + <string>$var, $local:var</string> |
| 1575 | + <key>match</key> |
| 1576 | + <string>(\$)((?i:global|local|script|private|using|env|function|alias|cert|variable|hkcu|hklm|wsman):)?(\w+)(:\w+)?</string> |
| 1577 | + </dict> |
| 1578 | + <dict> |
| 1579 | + <key>captures</key> |
| 1580 | + <dict> |
| 1581 | + <key>1</key> |
| 1582 | + <dict> |
| 1583 | + <key>name</key> |
| 1584 | + <string>keyword.other.powershell</string> |
| 1585 | + </dict> |
| 1586 | + <key>2</key> |
| 1587 | + <dict> |
| 1588 | + <key>name</key> |
| 1589 | + <string>keyword.other.powershell</string> |
| 1590 | + </dict> |
| 1591 | + <key>3</key> |
| 1592 | + <dict> |
| 1593 | + <key>name</key> |
| 1594 | + <string>storage.modifier.scope.powershell</string> |
| 1595 | + </dict> |
| 1596 | + <key>4</key> |
| 1597 | + <dict> |
| 1598 | + <key>name</key> |
| 1599 | + <string>variable.other.readwrite.powershell</string> |
| 1600 | + </dict> |
| 1601 | + <key>5</key> |
| 1602 | + <dict> |
| 1603 | + <key>name</key> |
| 1604 | + <string>keyword.other.powershell</string> |
| 1605 | + </dict> |
| 1606 | + </dict> |
| 1607 | + <key>comment</key> |
| 1608 | + <string>${var}, ${script:var}</string> |
| 1609 | + <key>match</key> |
| 1610 | + <string>(\$)(\{)((?i:global|local|script|private|using|env|function|alias|cert|variable|hkcu|hklm|wsman):)?(.+)(\})</string> |
| 1611 | + </dict> |
| 1612 | + <dict> |
| 1613 | + <key>captures</key> |
| 1614 | + <dict> |
| 1615 | + <key>1</key> |
| 1616 | + <dict> |
| 1617 | + <key>name</key> |
| 1618 | + <string>keyword.other.powershell</string> |
| 1619 | + </dict> |
| 1620 | + <key>2</key> |
| 1621 | + <dict> |
| 1622 | + <key>name</key> |
| 1623 | + <string>variable.other.readwrite.powershell</string> |
| 1624 | + </dict> |
| 1625 | + </dict> |
| 1626 | + <key>comment</key> |
| 1627 | + <string>Splatting</string> |
| 1628 | + <key>match</key> |
| 1629 | + <string>(@)(\w+)</string> |
| 1630 | + </dict> |
| 1631 | + </array> |
| 1632 | + </dict> |
1518 | 1633 | </dict>
|
1519 | 1634 | <key>scopeName</key>
|
1520 | 1635 | <string>source.powershell</string>
|
|
0 commit comments