Windows PowerShell 5.1向けの強調キーワード、正規表現キーワード、色設定用のファイル追加 - #2332
Merged
Conversation
- PowerShell のキーワードは強調キーワードとして設定 - 自動変数, 変数などは正規表現で検知する - カラー設定は Visual Studio Code風にする
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



PR対象
カテゴリ
PR の背景
#2317
仕様・動作説明
インストーラーにWindows PowerShell 5.1向けの強調キーワード、正規表現キーワード、色設定用のファイルを追加する
タイプ別設定のデフォルト値への追加は作成後別途作成します。
PR の影響範囲
影響なし。
テスト内容
[共通設定] - [強調キーワード] で新しいセットを作成し、
PowerShell51.kwdをインポート[タイプ別設定] を新規作成し、[強調キーワード1]に先ほど作成したセットを設定、色設定で
PowerShell51.colをインポート[タイプ別設定] の[正規表現キーワード]で、
PowerShell51.rkwをインポート。[正規表現キーワードを使用する]にチェック作成したタイプ別設定で、PowerShellのスクリプトファイルを開くと、それらしくハイライトされる
関連 issue, PR
参考資料
インポート後のイメージ



強調された画面例(このスクリーンショットではルールファイルのほかに、手動でコメントスタイルを設定しています)

強調キーワードなどの根拠(Microsoft Learn)
強調キーワード
PowerShell スクリプト言語のキーワード | about_Language_Keywords
正規表現
自動変数 | about_Automatic_Variables
変数 | about_Variables
演算子 | about_Operators