Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from SublimeText/PowerShell@master #2

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c9b3123
Direct migration to .sublime-syntax
michaelblyons Feb 1, 2020
b701521
Start rearranging and changing scopes
michaelblyons Feb 1, 2020
134b809
Adapted tests from PowerShell/EditorSyntax
michaelblyons Feb 1, 2020
46adfad
Push a little further to scope rectification
michaelblyons Feb 1, 2020
a0a24e9
Overhaul numbers and option flags
michaelblyons Feb 1, 2020
07acf91
Replace silly non-cap groups with `\w`. Further tweak numbers
michaelblyons Feb 1, 2020
9571835
New Regex-Eng compatible. Most of the tests pass.
michaelblyons Feb 1, 2020
b9533ca
Rebuild `#Requires`
michaelblyons Feb 1, 2020
1aca5da
Fixup integers with MB
michaelblyons Feb 1, 2020
d83caa6
Tinker with support files
michaelblyons Feb 1, 2020
43a437b
Escape characters are valid without string quoting
michaelblyons Feb 1, 2020
1cddc0b
Break keyword.control into semantic scopes. Use kebab_break. Readability
michaelblyons Feb 4, 2020
5236ffd
Push a context for membership
michaelblyons Feb 4, 2020
300ebcf
Multiline regex formatting
michaelblyons Apr 10, 2021
e9738ef
Prerelease invitation
michaelblyons Apr 10, 2021
f5b8461
Fix first_line_match NL chomp
michaelblyons Apr 11, 2021
60b2779
License dates
michaelblyons Apr 16, 2021
4462d17
Convert ISE Nostalgia to sublime-color-scheme
michaelblyons Apr 16, 2021
562711f
Syntax test workflow
michaelblyons Apr 16, 2021
8b530af
Syntax test references
michaelblyons Apr 17, 2021
7f9cb43
Add indentation rules and test
keith-hall May 13, 2021
b7a4a93
Add env.sublime-snippet
serjan-nasredin May 5, 2022
bc47f5b
Clear string scope for subexpressions within strings
jwortmann May 2, 2022
abca63f
Tweak syntax tests
jwortmann May 10, 2022
3179654
Add source.powershell.embedded for subexpressions
jwortmann May 10, 2022
5a003ce
Removed "word_wrap": false
ScribblerCoder Jan 31, 2023
a558f1d
Merge pull request #173 from ScribblerCoder/patch-1
deathaxe Jul 13, 2024
2edff07
Merge pull request #169 from serjan-nasredin/patch-1
deathaxe Jul 13, 2024
f8b9397
Remove syntax specific settings
deathaxe Jul 13, 2024
09ee604
Exclude development assets from package files
deathaxe Jul 13, 2024
eb639ba
Merge pull request #165 from michaelblyons/sublime-syntax
michaelblyons Dec 21, 2024
c570b7e
Fix else indentation
Dec 22, 2024
353a083
Fix one test
Dec 22, 2024
030a9c6
Merge pull request #180 from SublimeText/indent_else
michaelblyons Dec 22, 2024
9b21f08
Add 'clean' block keyword to PowerShell.sublime-syntax
matteocoder Jan 6, 2025
93565f4
Merge pull request #182 from matteocoder/clean-keyword
michaelblyons Jan 6, 2025
f619b44
Add missing comment-based help keywords
matteocoder Jan 7, 2025
7486b09
Merge pull request #184 from matteocoder/comment-based-help-keywords
michaelblyons Jan 7, 2025
b3cfabe
Fix variable.parameter.attribute.powershell regex in PowerShell.subli…
matteocoder Jan 7, 2025
da9cdd7
Merge pull request #185 from matteocoder/parameter-supportspaging
michaelblyons Jan 7, 2025
bea280e
Don't match keywords if they are preceded by a dot and add the 'seque…
matteocoder Jan 10, 2025
f21161d
Fix number scopes (#187)
deathaxe Jan 10, 2025
a0caccf
(Re-)add PowerShell 6+ number suffixes
deathaxe Jan 10, 2025
a243f8b
Fix syntax test action (#190)
deathaxe Jan 10, 2025
7b9767e
Add scopes symbol navigation (#189)
matteocoder Jan 11, 2025
a0ceb7f
Add support for syntax-based folding (#191)
matteocoder Jan 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Git and CI/CD related folders
/.github/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
CONTRIBUTING.md export-ignore

# Project and Dev Assets
/bin/ export-ignore
*.sublime-project export-ignore
44 changes: 44 additions & 0 deletions .github/workflows/syntax.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Syntax Tests

on:

push:
branches:
- '**'
tags-ignore:
- '**'
paths:
- '.github/workflows/syntax.yml'
- '**.sublime-syntax'
- '**/syntax_test*'
- '**.tmPreferences'
pull_request:
paths:
- '.github/workflows/syntax.yml'
- '**.sublime-syntax'
- '**/syntax_test*'
- '**.tmPreferences'
types:
- "opened"
- "reopened"
- "synchronize"
workflow_dispatch:

jobs:
main:
name: Syntax Tests (${{ matrix.build }})
strategy:
matrix:
include:
- build: 4107
packages: v4107
- build: latest
packages: master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: SublimeText/syntax-test-action@v2
with:
build: ${{ matrix.build }}
default_packages: ${{ matrix.packages }}
package_name: 'PowerShell'
19 changes: 11 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Contributing

Thanks for taking an insterest in contributing to the PowerShell package for
Thanks for taking an interest in contributing to the PowerShell package for
Sublime Text 3!


Expand All @@ -17,24 +17,27 @@ To build development versions, first you need a configuration file in

This file must contain the following information:

{
"pathToSublimeText": "...\sublime_text.exe",
"pathToSublimeTextData": "...\
}
``` json
{
"pathToSublimeText": "...\\sublime_text.exe",
"pathToSublimeTextData": "...\\"
}
```


#### Using Sublime Text

1. Press <kbd>Ctrl+Shift+B</kbd> to open the build systems menu.
1. Press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>B</kbd> to open the build systems menu.
2. Select 'PowerShell: Build Dev Version'


#### Using the Command Line

From the project's root:

.\bin\BuildFolder.ps1 -verbose

``` pwsh
.\bin\BuildFolder.ps1 -verbose
```

#### Running Tests

Expand Down
59 changes: 59 additions & 0 deletions Fold.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.powershell</string>
<key>settings</key>
<dict>
<key>foldScopes</key>
<array>
<dict>
<key>begin</key>
<string>meta.fold.begin</string>
<key>end</key>
<string>meta.fold.end</string>
</dict>
<dict>
<key>begin</key>
<string>punctuation.definition.comment.block.begin</string>
<key>end</key>
<string>punctuation.definition.comment.block.end</string>
<key>excludeTrailingNewlines</key>
<false/>
</dict>
<dict>
<key>begin</key>
<string>string.quoted.double.heredoc punctuation.definition.string.begin</string>
<key>end</key>
<string>string.quoted.double.heredoc punctuation.definition.string.end</string>
<key>excludeTrailingNewlines</key>
<false/>
</dict>
<dict>
<key>begin</key>
<string>string.quoted.single.heredoc punctuation.definition.string.begin</string>
<key>end</key>
<string>string.quoted.single.heredoc punctuation.definition.string.end</string>
<key>excludeTrailingNewlines</key>
<false/>
</dict>
<dict>
<key>begin</key>
<string>punctuation.section.group.begin</string>
<key>end</key>
<string>punctuation.section.group.end</string>
<key>excludeTrailingNewlines</key>
<false/>
</dict>
<dict>
<key>begin</key>
<string>punctuation.section.braces.begin</string>
<key>end</key>
<string>punctuation.section.braces.end</string>
<key>excludeTrailingNewlines</key>
<false/>
</dict>
</array>
</dict>
</dict>
</plist>
151 changes: 151 additions & 0 deletions ISE Nostalgia.sublime-color-scheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"name": "ISE Nostalgia",
"author": "Guillermo L\u00f3pez-Anglada",
"variables":
{
"blue": "#87beff",
"blue2": "#add6ff",
"blue3": "#5ab1cd",
"blue4": "#585cf6",
"blue5": "#0000ff",
"blue6": "#6d79de",
"blue7":"#21439C",
"green": "#006400",
"green2": "#06960e",
"grey": "#a9a9a9",
"grey2": "#7f7f7f",
"grey3": "#292929",
"grey4": "#70727E",
"purple": "#8a2be2",
"purple2": "#801e92",
"purple3": "#aa69b6",
"red": "#6b0000",
"red2": "#ff4500",
"red3": "#b85b44",
"white": "#ffffff",
"white2": "#fef8da",
"white3": "#e3f1ff",
"yellow": "#ffff00",
},
"globals":
{
"foreground": "var(purple)",
"background": "var(white)",
"caret": "var(grey2)",
// "invisibles": "var(grey2)",
"line_highlight": "var(white2)",
"selection": "var(blue2)",
"selection_border": "var(blue)",
"inactive_selection": "var(white3)",
"gutter_foreground": "var(blue3)",
},
"rules":
[
{
"name": "Comment",
"scope": "comment",
"foreground": "var(green)",
"font_style": "normal",
},
{
"name": "Keyword",
"scope": "keyword, storage",
"foreground": "var(grey3)",
},
{
"name": "Number",
"scope": "constant.numeric",
"foreground": "var(purple2)",
},
{
"name": "Built-in constant",
"scope": "constant.language",
"foreground": "var(blue4)",
},
{
"name": "Variable",
"scope": "variable.language, variable.other",
"foreground": "var(red2)",
},
{
"name": "String",
"scope": "string",
"foreground": "var(red)",
},
{
"name": "String interpolation",
"scope": "constant.character.escape, string source",
"foreground": "var(purple3)",
},
// {
// "name": "Function name",
// "scope": "entity.name.function, support.function.any-method",
// "foreground": "var(blue5)",
// },
// {
// "name": "Type name",
// "scope": "entity.name.type",
// "font_style": "underline",
// },
// {
// "name": "Inherited class name",
// "scope": "entity.other.inherited-class",
// "font_style": "italic",
// },
// {
// "name": "Function parameter",
// "scope": "variable.parameter",
// "font_style": "italic",
// },
// {
// "name": "Function argument and result types",
// "scope": "storage.type.method",
// "font_style": "",
// "foreground": "var(grey4)",
// },
// {
// "name": "Section",
// "scope": "meta.section entity.name.section, declaration.section entity.name.section",
// "font_style": "italic",
// },
{
"name": "Library function",
"scope": "support.function",
"foreground": "var(blue5)",
},
// {
// "name": "Library object",
// "scope": "support.class, support.type",
// "font_style": "bold",
// "foreground": "var(blue6)",
// },
// {
// "name": "Library constant",
// "scope": "support.constant",
// "font_style": "bold",
// "foreground": "var(green2)",
// },
// {
// "name": "Library variable",
// "scope": "support.variable",
// "font_style": "bold",
// "foreground": "var(blue7)",
// },
{
"name": "PowerShell: Assignment Operator",
"scope": "keyword.operator.assignment.powershell",
"foreground": "var(grey)",
},
{
"name": "Invalid",
"scope": "invalid",
"foreground": "var(yellow)",
"background": "var(red3)",
},
{
"name": "Invalid trailing whitespace",
"scope": "invalid.deprecated.trailing-whitespace",
"background": "var(red3)",
}
]
}
Loading