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

Conversation

evandrocoan
Copy link
Member

The upstream repository SublimeText/PowerShell@master has some new changes that aren't in this fork. So, here they are, ready to be merged!

This Pull Request was created programmatically by the githubpullrequests.

serjan-nasredin and others added 8 commits May 6, 2022 02:54
Use meta.interpolation and punctuation.section.interpolation scopes for
$(...) subexpressions within strings and clear the string scope, to
enable ST's brackets matching.
The user should have the freedom whether he wants it to be `true` or `false` by specifying the setting in the global Preferences in Sublime Text
Resolves #106

Settings such as indentation style or word wrap are personal settings,
which a user should be able to adjust globally via Preferences.

Enforcing syntax specific defaults requires end users to override them
in user defined syntax specific settings, which may be cumbersome.

So avoid them unless technically required.
deathaxe and others added 17 commits July 13, 2024 12:33
Rewrite syntax definition in YAML
This commit also adds tests for the new syntax.
Add 'clean' block keyword to PowerShell.sublime-syntax
Additionally, add tests for all the comment-based help keywords.
Add missing comment-based help keywords in PowerShell.sublime-syntax
…me-syntax

Add the SupportsPaging parameter name, and makes the relative test pass.
Change variable.parameter.attribute.powershell regex in syntax file
…nce' keyword (#186)

* Change keyword matching regex

Keywords (with the exception of 'where' and 'foreach') should not be considered as such if they are preceded by a '.'.
The tests relative to keywords used as members or methods now pass.
'process' is now considered a block keyword.

* Add 'sequence' keyword

Also make the relative syntax test pass.

* Change test assertion in Function syntax test

Now the test reflects the change of the 'process' keyword from uncategorised to block.

* Change Parameter matching regex to match 'PositionalBinding'

The relevant test in the function syntax test now passes.

* Consume string with a trailing dot before checking for keywords

This makes negative lookbehind assertions on keywords unnecessary.

* Add scope to matched unquoted strings

Co-authored-by: deathaxe <[email protected]>

* Match word boundary to avoid highlighting invalid arguments

Co-authored-by: deathaxe <[email protected]>

---------

Co-authored-by: deathaxe <[email protected]>
This commit...

1. removes `_` separators in digits as both Windows Powershell and PWSH 7.4
   raise errors if present.
2. adjusts number related scopes to ST core syntaxes
3. ensures `.` after numbers is scoped member accessor.
Also fix incomplete units causing whole number to not be highlighted.
1. run action if action definition is updated
2. don't run if tag is created (assuming tags are created on master only anyway)
3. disable ST3 tests as v4+ requires ST4 due to `version 2` directive
* Add meta.function-call.powershell scope to function calls

This enables Sublime Text to correctly find references to functions being called,
at least for functions written according to the recommended style.

* Define 'class-method' context in syntax file

Static and instance methods are now identified as functions.
F12 and shift+F12 can now correctly find definitions and references of class methods.

* Fix wrong scope name in 'class-method' context
Regions, comment blocks, and heredocs can now be folded.
Additionally, region names are now searchable using ctrl-r.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants