Skip to content

Instantly share code, notes, and snippets.

@pwab
Last active March 28, 2024 18:09
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save pwab/940163db7a1a04f3483d66f04ec17bbf to your computer and use it in GitHub Desktop.
Save pwab/940163db7a1a04f3483d66f04ec17bbf to your computer and use it in GitHub Desktop.

[WIP] Notepad++ userstyle for Godot's GDScript

  • This is a work-in-progress
  • Most things don't work yet
  • It is just a little syntax highlighting thing
  • For install: Language -> Define your Language -> Import

TODO

  • Mess around with the settings
  • Get something to work :D
  • Understand the whole styling system
  • Understand how different notepad++ components work together (plugins/apis, stylers.model, langs.model, functionList)
  • Try to implement parts of the GD-utils functions for autocomplete
  • If production ready: Maybe a PR for Godot-Docs or even Notepad++ itself?
<NotepadPlus>
<UserLang name="GDScript" ext="" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="yes" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="yes" Keywords7="yes" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">&gt; &lt; = : - + / * ! ( ) , .</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open">&quot;</Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close">&quot;</Keywords>
<Keywords name="Folders in code2, open">&apos;</Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close">&apos;</Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">extends</Keywords>
<Keywords name="Keywords2">func _</Keywords>
<Keywords name="Keywords3">if elif else var and not</Keywords>
<Keywords name="Keywords4">print return pass abs</Keywords>
<Keywords name="Keywords5">false true</Keywords>
<Keywords name="Keywords6">get set add is</Keywords>
<Keywords name="Keywords7">Input</Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="FF0080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="8080FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="3967BB" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="0000A0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="4A9EAA" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="008040" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="008040" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
@DeerTears
Copy link

Hi, is it alright if I take the work you've done here and start a new repo for a Notepad++ style for GDScript? I haven't seen anyone publicly post a style that's as complete as yours is, and I've already made some personal changes in a fork of this gist. I'd love to make it easier for Notepad++ users to have access to a useful GDScript style if you'd let me. I ask since this gist doesn't have a licence on it. ^ ^;

@pwab
Copy link
Author

pwab commented Sep 14, 2020

Hi @DeerTears, damn I forgot the licence. 😄 It's CC0 so do what you want with it.
I last touched those files three years ago but still I sometimes open GD-files in notepad++ and would wish a complete support for that language. So if you would like to take care of it: cool! 👍
If you create a repository please paste the link to it so I can help test and improve the settings.

@gamepad-coder
Copy link

<3

@pwab
Copy link
Author

pwab commented Oct 14, 2020

By the way here is the link to the repository:
https://github.com/DeerTears/GDScript-in-NotepadPlusPlus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment