We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05452ab commit 4cef4eaCopy full SHA for 4cef4ea
1 file changed
crates/lsh/definitions/powershell.lsh
@@ -35,10 +35,18 @@ pub fn powershell() {
35
else if /"/ { yield string; break; }
36
await input;
37
}
38
- } else if /function|param/ {
39
- yield keyword.other;
40
- } else if /elseif|else|if|for|switch|default|throw|try|catch|finally/ {
41
- yield keyword.control;
+ } else if /(?i:function|param|class|enum|cmdletbinding|static)/ {
+ if /\w+/ {
+ yield other;
+ } else {
42
+ yield keyword.other;
43
+ }
44
+ } else if /(?i:elseif|else|if|for(each)?|switch|default|throw|try|catch|finally|return)/ {
45
46
47
48
+ yield keyword.control;
49
50
} else if /-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/ {
51
if /[\w\-]+/ {
52
yield method;
0 commit comments