#1449
I probably missed something, but it just adds in a few keywords from JS. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1450
-- Commit Summary --
* TypeScript syntax highlighting
-- File Changes --
A data/filedefs/filetypes.TypeScript.conf (54) M data/filetype_extensions.conf (3)
-- Patch Links --
https://github.com/geany/geany/pull/1450.patch https://github.com/geany/geany/pull/1450.diff
@jhpratt pushed 1 commit.
299894b Add `readonly` keyword
@jhpratt pushed 1 commit.
721a9c0 Add `as` keyword
This could probably go on the wiki with the other filetype configurations [here](https://wiki.geany.org/filetype?do=showtag&tag=filetype)
Why not just make it built-in? The vast majority of users will not be searching for syntax highlighting - I didn't even know it was possible to make a custom filetype until I ran into this.
No typescriptists willing to test?
I tried out the changes here and they work fine for me.
Please, how can i install this TypeScript syntax highlighting in Geany?
ntrel commented on this pull request.
Providing this works for enough TypeScript code, I think we should merge this. @jhpratt It would be good to resolve my review points though.
@@ -0,0 +1,54 @@
+# based on JavaScript file +# For complete documentation of this file, please see Geany's main documentation +[styling=C] + +[keywords] +# all items must be in one line +primary=break case catch class const continue debugger default delete do else enum export extends extend false finally for function get if import in Infinity instanceof let NaN new null return set static super switch this throw true try typeof undefined var let while with yield prototype async await declare aliased interfaced Alias Interface interface +secondary=Array Boolean boolean Date Function Math Number number Object String string RegExp EvalError Error RangeError ReferenceError SyntaxError TypeError URIError constructor prototype decodeURI decodeURIComponent encodeURI encodeURIComponent eval isFinite isNaN parseFloat parseInt protected public private keyof void any never readonly as
Each of these keyword lists are not sorted properly. I'm not sure if Scintilla requires sorted lists for correct operation.
+comment_use_indent=true
+ +# context action command (please see Geany's main documentation for details) +context_action_cmd= + +[indentation] +#width=4 +# 0 is spaces, 1 is tabs, 2 is tab & spaces +#type=1 + +[build-menu] +# %f will be replaced by the complete filename +# %e will be replaced by the filename without extension +# (use only one of it at one time) +#FT_02_LB=_Lint +#FT_02_CM=jshint "%f"
Are there no commands to compile/check a typescript file has valid syntax?
ntrel commented on this pull request.
@@ -0,0 +1,54 @@
+# based on JavaScript file
This file needs to be listed in `data/Makefile.am`.
@jhpratt Plus resolve the conflict please if possible. Thanks for submitting this BTW.
@marcooliva Download the `filetypes.TypeScript.conf` file and put it in either your user or system config directory - you can find these at the top of `Help->Debug Messages`. Then just restart Geany. To recognise *.ts, you also have to edit `Tools->Config Files->filetype_extensions.conf`, see the *Files changed* tab here.
@ntrel I've long since moved on from Geany. I find VS Code far superior. It's been a couple years since I submitted this PR, so a good number of changes may be out of date as well. If you'd like this conflict resolved, you should be able to edit the PR. If not, feel free to use my changes at your discretion.
Closed #1450.
implemented in #2187
github-comments@lists.geany.org