chouzz / vscode-innosetup

Language syntax, snippets and build system for Inno Setup
https://marketplace.visualstudio.com/items?itemName=Chouzz.vscode-innosetup
MIT License
20 stars 3 forks source link

[Highlight] Some parameter is not highlighted #121

Open Crystal-RainSlide opened 10 months ago

Crystal-RainSlide commented 10 months ago

This line is missing some words: https://github.com/chouzz/vscode-innosetup/blob/f45cd68f8b244a2e836022d08822daaa498e5367/syntaxes/inno-setup.tmLanguage#L68

Words:

Under [LangOptions]:

LanguageName
LanguageID
LanguageCodePage
DialogFontName
DialogFontSize
WelcomeFontName
WelcomeFontSize
TitleFontNam
TitleFontSize
CopyrightFontName
CopyrightFontSize
RightToLeft

Also, you may delete this <dict>, since all the [Setup] section directives seems to be highlighted fine without it: https://github.com/chouzz/vscode-innosetup/blob/f45cd68f8b244a2e836022d08822daaa498e5367/syntaxes/inno-setup.tmLanguage#L87-L92

nikolai-in commented 5 months ago

Under [LangOptions]:

LanguageName
LanguageID
LanguageCodePage
DialogFontName
DialogFontSize
WelcomeFontName
WelcomeFontSize
TitleFontNam
TitleFontSize
CopyrightFontName
CopyrightFontSize
RightToLeft

It seems to me that everything you specified here is already present in line https://github.com/chouzz/vscode-innosetup/blob/f45cd68f8b244a2e836022d08822daaa498e5367/syntaxes/inno-setup.tmLanguage#L54

But it doesn't support multiple languages like this:

en.LanguageName=English

I suppose you can add support for this with

        <dict>
            <key>match</key>
            <string>^\s*(?i)[a-z]{2}\.(CopyrightFontName|CopyrightFontSize|DialogFontName|DialogFontSize|LanguageCodePage|LanguageID|LanguageName|RightToLeft|TitleFontName|TitleFontSize|WelcomeFontName|WelcomeFontSize)(?=\s*=)</string>
            <key>name</key>
            <string>keyword.inno</string>
        </dict>
Before After
Before After

I am new to this & don't know best practices but will try to send a pull request anyway :-)