Commit 850bdc73 authored by Nuno Martins's avatar Nuno Martins Committed by Christian Hergert

typescript.lang: add support for TypeScript

This adds typescript.lang which extends javascript.lang.
parent c42178f6
<?xml version="1.0" encoding="UTF-8"?>
This file is part of GtkSourceView
Author: Scott Martin <>
Copyright (C) 2004 Scott Martin <>
Copyright (C) 2005 Stef Walter (formerly Nate Nielsen) <>
Copyright (C) 2005-2007 Marco Barisione <>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2018 Jeffery To <>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <>.
<language id="ts" name="TypeScript" version="2.0" _section="Script">
<property name="mimetypes">application/typescript;application/x-typescript;text/x-typescript;text/typescript</property>
<property name="globs">*.ts</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="basic-type" name="Basic Data Type" map-to="def:type"/>
<!-- TS specific stuff (i.e. stuff which is not JS) -->
<context id="ts-proper">
<context id="keywords" style-ref="keyword">
<context id="basic-types" style-ref="basic-type">
<!-- Other types such as `null`, `undefined`, and `void` are already
highlighted by JS rules which we don't want to override -->
<!-- Actual language definition (TS specific stuff + everything from JS) -->
<context id="ts" class="no-spell-check">
<context ref="ts-proper"/>
<context ref="js:js"/>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment