added personal language definition changes; syntax themes; removed transparent pane settings

This commit is contained in:
itdominator 2023-10-26 01:49:18 -05:00
parent cd8ed222ae
commit d9a9c8c949
21 changed files with 5038 additions and 215 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 181 KiB

View File

@ -9,7 +9,6 @@ from gi.repository import Gtk
# Application imports # Application imports
from .mixins.signals_mixins import SignalsMixins from .mixins.signals_mixins import SignalsMixins
from .controller_data import ControllerData from .controller_data import ControllerData
from .widgets.transparency_scale import TransparencyScale
@ -40,8 +39,6 @@ class Controller(SignalsMixins, ControllerData):
def _subscribe_to_events(self): def _subscribe_to_events(self):
event_system.subscribe("shutting_down", lambda: print("Shutting down...")) event_system.subscribe("shutting_down", lambda: print("Shutting down..."))
event_system.subscribe("handle_file_from_ipc", self.handle_file_from_ipc) event_system.subscribe("handle_file_from_ipc", self.handle_file_from_ipc)
event_system.subscribe("remove_transparency", self._remove_transparency)
event_system.subscribe("update_transparency", self._update_transparency)
def setup_builder_and_container(self): def setup_builder_and_container(self):
self.builder = Gtk.Builder() self.builder = Gtk.Builder()
@ -52,24 +49,12 @@ class Controller(SignalsMixins, ControllerData):
glade_box = self.builder.get_object("glade_box") glade_box = self.builder.get_object("glade_box")
self.base_container = glade_box self.base_container = glade_box
self.ctx = self.base_container.get_style_context()
self.ctx.add_class(f"mw_transparency_{settings.theming.transparency}")
settings_manager.register_signals_to_builder([self, self.base_container]) settings_manager.register_signals_to_builder([self, self.base_container])
TransparencyScale()
self.window.add(glade_box)
def _interactive_debug(self, widget = None, eve = None): def _interactive_debug(self, widget = None, eve = None):
event_system.emit("load_interactive_debug") event_system.emit("load_interactive_debug")
def _remove_transparency(self):
self.ctx.remove_class(f"mw_transparency_{settings.theming.transparency}")
def _update_transparency(self):
self.ctx.add_class(f"mw_transparency_{settings.theming.transparency}")
def _close_app(self): def _close_app(self):
event_system.emit("tear_down") event_system.emit("tear_down")

View File

@ -1,51 +0,0 @@
# Python imports
# Lib imports
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
# Application imports
class TransparencyScale(Gtk.Scale):
def __init__(self):
super(TransparencyScale, self).__init__()
builder = settings_manager.get_builder()
builder.get_object("menu_box").add(self)
self._setup_styling()
self._setup_signals()
self._subscribe_to_events()
self._load_widgets()
self.show_all()
def _setup_styling(self):
self.set_digits(0)
self.set_value_pos(Gtk.PositionType.RIGHT)
self.add_mark(0.0, Gtk.PositionType.LEFT, "Transparency")
self.add_mark(50.0, Gtk.PositionType.TOP, "50%")
self.set_hexpand(True)
def _setup_signals(self):
self.connect("value-changed", self._update_transparency)
def _subscribe_to_events(self):
...
def _load_widgets(self):
adjust = self.get_adjustment()
adjust.set_lower(0)
adjust.set_upper(99)
adjust.set_value(settings.theming.transparency)
adjust.set_step_increment(1.0)
def _update_transparency(self, range):
event_system.emit("remove_transparency")
tp = int(range.get_value())
settings.theming.transparency = tp
event_system.emit("update_transparency")

View File

@ -47,7 +47,6 @@ class Window(Gtk.ApplicationWindow):
ctx = self.get_style_context() ctx = self.get_style_context()
ctx.add_class("main-window") ctx.add_class("main-window")
ctx.add_class(f"mw_transparency_{settings.theming.transparency}")
def _setup_signals(self): def _setup_signals(self):
GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self._tear_down) GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self._tear_down)
@ -86,7 +85,6 @@ class Window(Gtk.ApplicationWindow):
if visual and screen.is_composited() and settings.config.make_transparent == 0: if visual and screen.is_composited() and settings.config.make_transparent == 0:
self.set_visual(visual) self.set_visual(visual)
self.set_app_paintable(True) self.set_app_paintable(True)
self.connect("draw", self._area_draw)
# bind css file # bind css file
cssProvider = Gtk.CssProvider() cssProvider = Gtk.CssProvider()
@ -95,11 +93,6 @@ class Window(Gtk.ApplicationWindow):
styleContext = Gtk.StyleContext() styleContext = Gtk.StyleContext()
styleContext.add_provider_for_screen(screen, cssProvider, Gtk.STYLE_PROVIDER_PRIORITY_USER) styleContext.add_provider_for_screen(screen, cssProvider, Gtk.STYLE_PROVIDER_PRIORITY_USER)
def _area_draw(self, widget: Gtk.ApplicationWindow, cr: cairo.Context) -> None:
cr.set_source_rgba( *settings_manager.get_paint_bg_color() )
cr.set_operator(cairo.OPERATOR_SOURCE)
cr.paint()
cr.set_operator(cairo.OPERATOR_OVER)
def _load_interactive_debug(self): def _load_interactive_debug(self):
self.set_interactive_debugging(True) self.set_interactive_debugging(True)

Binary file not shown.

View File

@ -187,7 +187,36 @@ samples['html'] = """
# samples['idl'] = """ # samples['idl'] = """
# samples['imagej'] = """ # samples['imagej'] = """
# samples['ini'] = """ # samples['ini'] = """
# samples['java'] = """ samples['java'] = """
package com.itdominator.api;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.core.env.Environment;
import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
@Configuration
public class DataSourceConfig {
@Autowired
Environment env;
@Bean
@Primary
public javax.sql.DataSource dataSource() {
final DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(env.getProperty("driverClassName"));
dataSource.setUrl(env.getProperty("url"));
// dataSource.setUsername(env.getProperty("user"));
// dataSource.setPassword(env.getProperty("password"));
return dataSource;
}
}
"""
samples['js'] = """ samples['js'] = """
const loadBackground = () => { const loadBackground = () => {
const bgElm = document.getElementById("bg"); const bgElm = document.getElementById("bg");

View File

@ -0,0 +1,388 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
-->
<language id="c" name="C" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-c;text/x-csrc;image/x-xpixmap</property>
<property name="globs">*.c</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.c</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="string" name="String" map-to="def:string"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="common-defines" name="Common Defines" map-to="def:special-constant"/>
<style id="included-file" name="Included File" map-to="def:string"/>
<style id="included-relative-file" name="Included Relative File" map-to="c:included-file"/>
<style id="char" name="Character" map-to="def:character"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="type-keyword" name="Type Keyword" map-to="c:keyword"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="storage-class" name="Storage Class" map-to="def:type"/>
<style id="printf" name="printf Conversion" map-to="def:special-char"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
<style id="floating-point" name="Floating point number" map-to="def:floating-point"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="binary" name="Binary number" map-to="def:base-n-integer"/>
<style id="octal" name="Octal number" map-to="def:base-n-integer"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="nullptr" name="Null Pointer Value" map-to="def:special-constant"/>
<style id="standard-stream" name="Standard stream" map-to="def:constant"/>
<style id="signal-name" name="Signal name" map-to="def:constant"/>
<style id="error" name="Error" map-to="def:error"/>
<style id="method-calls" name="Method Calls" map-to="def:method-calls"/>
</styles>
<definitions>
<context id="method-calls" style-ref="method-calls">
<match extended="true">
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
</match>
</context>
<!--regexs-->
<define-regex id="preproc-start">^\s*#\s*</define-regex>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbtfav\?] | # escaped character
[0-7]{1,3} | # one, two, or three octal digits
x[0-9A-Fa-f]+ | # 'x' followed by hex digits
u[0-9A-Fa-f]{4} | # 'u' followed by 4 hex digits
U[0-9A-Fa-f]{8} # 'U' followed by 8 hex digits
)
</define-regex>
<!--contexts NOT used on the main context-->
<!-- TODO: what about scanf ? -->
<!-- man 3 printf -->
<context id="printf" style-ref="printf" extend-parent="false">
<match extended="true">
\%\%|\%
(?:[1-9][0-9]*\$)? # argument
[#0\-\ \+\'I]* # flags
(?:[1-9][0-9]*|\*)? # width
(?:\.\-?(?:[0-9]+|\*))? # precision
(?:hh|ll|[hlLqjzt])? # length modifier
[diouxXeEfFgGaAcsCSpnm] # conversion specifier
</match>
</context>
<!--contexts used on the main context-->
<!-- Preprocessor -->
<context id="if0-comment" style-ref="comment">
<start>\%{preproc-start}if\b\s*0\b</start>
<end>\%{preproc-start}(endif|else|elif)\b</end>
<include>
<context id="if-in-if0">
<start>\%{preproc-start}if(n?def)?\b</start>
<end>\%{preproc-start}endif\b</end>
<include>
<context ref="if-in-if0"/>
<context ref="def:in-comment"/>
</include>
</context>
<context ref="def:in-comment"/>
</include>
</context>
<context id="include" style-ref="preprocessor">
<match extended="true">
\%{preproc-start}
(include|import)\s*
(&lt;.*?&gt;)
</match>
<include>
<context id="included-file" sub-pattern="2" style-ref="included-file" class="path"/>
</include>
</context>
<context id="include-relative" style-ref="preprocessor">
<match extended="true">
\%{preproc-start}
(include|import)\s*
(".*?")
</match>
<include>
<context id="included-relative-file" sub-pattern="2" style-ref="included-relative-file" class="path"/>
</include>
</context>
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
<start extended="true">
\%{preproc-start}
(define|undef|error|pragma|ident|if(n?def)?|else|elif(n?def)?|endif|line|warning|embed)
\b
</start>
<include>
<context ref="def:line-continue" ignore-style="true"/>
<context ref="string" ignore-style="true"/>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>(L|u8|u|U)?"</start>
<end>"</end>
<include>
<context ref="printf"/>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
<context id="char" style-ref="char" class="string">
<match>(L|u8|u|U)?'(\%{escaped-character}|.)'</match>
</context>
<!-- http://www.lysator.liu.se/c/ANSI-C-grammar-l.html -->
<context id="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]+)? |
([0-9]+[Ee][+-]?[0-9]+) |
(0[xX][a-fA-F0-9]*\.?[a-fA-F0-9]*[pP][+-]?[0-9]+))
[fFlL]?
(?![\w\.])
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="invalid-hexadecimal" style-ref="error">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]*[g-zG-Z][a-zA-Z0-9]*[uUlL]*
(?![\w\.])
</match>
</context>
<context id="octal" style-ref="octal">
<match extended="true">
(?&lt;![\w\.])
0[0-7]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="invalid-octal" style-ref="error">
<match extended="true">
(?&lt;![\w\.])
0[0-7]*[89][0-9]*[uUlL]*
(?![\w\.])
</match>
</context>
<context id="binary" style-ref="binary">
<match extended="true">
(?&lt;![\w\.])
0[bB][01]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="invalid-binary" style-ref="error">
<match extended="true">
(?&lt;![\w\.])
0[bB][01]*[2-9][a-zA-Z0-9]*[uUlL]*
(?![\w\.])
</match>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
(0|[1-9][0-9]*)[uUlL]*
(?![\w\.])
</match>
</context>
<context id="keywords" style-ref="keyword">
<keyword>asm</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>constexpr</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>for</keyword>
<keyword>fortran</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>return</keyword>
<keyword>switch</keyword>
<keyword>while</keyword>
</context>
<context id="type-keywords" style-ref="type-keyword">
<keyword>enum</keyword>
<keyword>struct</keyword>
<keyword>typedef</keyword>
<keyword>union</keyword>
</context>
<context id="operators" style-ref="operator">
<keyword>(_A|a)lignof</keyword>
<keyword>_Generic</keyword>
<keyword>offsetof</keyword>
<keyword>(_S|s)tatic_assert</keyword>
<keyword>sizeof</keyword>
<keyword>typeof</keyword>
</context>
<context id="types" style-ref="type">
<keyword>(_B|b)ool</keyword>
<keyword>_Complex</keyword>
<keyword>_Imaginary</keyword>
<keyword>char</keyword>
<keyword>double</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>short</keyword>
<keyword>signed</keyword>
<keyword>unsigned</keyword>
<keyword>void</keyword>
<keyword>[a-z_][0-9a-z_]+(_t|_T)</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>(_A|a)lignas</keyword>
<keyword>_Atomic</keyword>
<keyword>(_N|n)oreturn</keyword>
<keyword>(_T|t)hread_local</keyword>
<keyword>auto</keyword>
<keyword>const</keyword>
<keyword>extern</keyword>
<keyword>inline</keyword>
<keyword>register</keyword>
<keyword>restrict</keyword>
<keyword>static</keyword>
<keyword>volatile</keyword>
</context>
<!-- C99 booleans -->
<context id="boolean" style-ref="boolean">
<keyword>true</keyword>
<keyword>false</keyword>
</context>
<context id="nullptr" style-ref="nullptr">
<keyword>nullptr</keyword>
</context>
<context id="common-defines" style-ref="common-defines">
<keyword>NULL</keyword>
<keyword>MAX</keyword>
<keyword>MIN</keyword>
<keyword>TRUE</keyword>
<keyword>FALSE</keyword>
<keyword>__LINE__</keyword>
<keyword>__DATE__</keyword>
<keyword>__FILE__</keyword>
<keyword>__func__</keyword>
<keyword>__TIME__</keyword>
<keyword>__STDC__</keyword>
</context>
<context id="standard-streams" style-ref="standard-stream">
<keyword>stdin</keyword>
<keyword>stdout</keyword>
<keyword>stderr</keyword>
</context>
<context id="signals" style-ref="signal-name">
<keyword>SIGABRT</keyword>
<keyword>SIGALRM</keyword>
<keyword>SIGCHLD</keyword>
<keyword>SIGCONT</keyword>
<keyword>SIGFPE</keyword>
<keyword>SIGHUP</keyword>
<keyword>SIGILL</keyword>
<keyword>SIGINT</keyword>
<keyword>SIGKILL</keyword>
<keyword>SIGPIPE</keyword>
<keyword>SIGQUIT</keyword>
<keyword>SIGSEGV</keyword>
<keyword>SIGSTOP</keyword>
<keyword>SIGTERM</keyword>
<keyword>SIGTRAP</keyword>
<keyword>SIGTSTP</keyword>
<keyword>SIGTTIN</keyword>
<keyword>SIGTTOU</keyword>
<keyword>SIGUSR1</keyword>
<keyword>SIGUSR2</keyword>
</context>
<!--Main context-->
<context id="c" class="no-spell-check">
<include>
<context ref="method-calls"/>
<context ref="gtk-doc:inline-docs-section"/>
<context ref="def:c-like-comment" style-ref="comment"/>
<context ref="def:c-like-comment-multiline" style-ref="comment"/>
<context ref="def:c-like-close-comment-outside-comment" style-ref="comment"/>
<context ref="if0-comment"/>
<context ref="include"/>
<context ref="include-relative"/>
<context ref="preprocessor"/>
<context ref="string"/>
<context ref="char"/>
<context ref="float"/>
<context ref="hexadecimal"/>
<context ref="invalid-hexadecimal"/>
<context ref="octal"/>
<context ref="invalid-octal"/>
<context ref="binary"/>
<context ref="invalid-binary"/>
<context ref="decimal"/>
<context ref="keywords"/>
<context ref="type-keywords"/>
<context ref="operators"/>
<context ref="types"/>
<context ref="storage-class"/>
<context ref="boolean"/>
<context ref="nullptr"/>
<context ref="common-defines"/>
<context ref="standard-streams"/>
<context ref="signals"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina, Ole Christian Eidheim
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2018 Ole Christian Eidheim <eidheim@gmail.com>
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
-->
<language id="cpp" name="C++" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-c++;text/x-cpp;text/x-c++src</property>
<property name="globs">*.cpp;*.cxx;*.cc;*.C;*.c++;*.tpp</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.cc</property>
</metadata>
<styles>
<style id="raw-string" name="Raw String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="c:keyword"/>
<style id="type" name="Data Type" map-to="c:type"/>
<style id="common-defines" name="Common Defines" map-to="c:common-defines"/>
<style id="method-calls" name="Method Calls" map-to="def:method-calls"/>
</styles>
<definitions>
<context id="method-calls" style-ref="method-calls">
<match extended="true">
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
</match>
</context>
<!-- C++-specific stuff (i.e. stuff which is not C) -->
<context id="cpp-proper">
<include>
<context ref="method-calls"/>
<context id="raw-string" style-ref="raw-string" class="string" class-disabled="no-spell-check">
<start>R"([^\(\)\\ ]*)\(</start>
<end>\)\%{1@start}"</end>
</context>
<context id="keywords" style-ref="keyword">
<keyword>and</keyword>
<keyword>and_eq</keyword>
<keyword>bitand</keyword>
<keyword>bitor</keyword>
<keyword>catch</keyword>
<keyword>compl</keyword>
<keyword>concept</keyword>
<keyword>consteval</keyword>
<keyword>constinit</keyword>
<keyword>const_cast</keyword>
<keyword>co_await</keyword>
<keyword>co_return</keyword>
<keyword>co_yield</keyword>
<keyword>decltype</keyword>
<keyword>delete</keyword>
<keyword>dynamic_cast</keyword>
<keyword>export</keyword>
<keyword>final</keyword>
<keyword>friend</keyword>
<keyword>import</keyword>
<keyword>module</keyword>
<keyword>new</keyword>
<keyword>noexcept</keyword>
<keyword>not</keyword>
<keyword>not_eq</keyword>
<keyword>operator</keyword>
<keyword>or</keyword>
<keyword>or_eq</keyword>
<keyword>override</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>reinterpret_cast</keyword>
<keyword>requires</keyword>
<keyword>static_cast</keyword>
<keyword>this</keyword>
<keyword>thread_local</keyword>
<keyword>throw</keyword>
<keyword>try</keyword>
<keyword>typeid</keyword>
<keyword>using</keyword>
<keyword>xor</keyword>
<keyword>xor_eq</keyword>
<keyword>class</keyword>
<keyword>namespace</keyword>
<keyword>typename</keyword>
<keyword>template</keyword>
<keyword>virtual</keyword>
</context>
<context id="types" style-ref="type">
<keyword>explicit</keyword>
<keyword>mutable</keyword>
</context>
<context id="common-defines" style-ref="common-defines">
<keyword>__STDC__</keyword>
<keyword>__cplusplus</keyword>
</context>
</include>
</context>
<!-- actual language definition: C++-specific stuff plus everything from C -->
<context id="cpp" class="no-spell-check">
<include>
<context ref="cpp-proper"/>
<context ref="c:c"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: John Luke <jluke@cfl.rr.com>
Copyright (C) 2003 John Luke <jluke@cfl.rr.com>
Copyright (C) 2004 Jeroen Zwartepoorte <jeroen@xs4all.nl>
Copyright (C) 2004 Alessio Frusciante <algol@firenze.linux.it>
Copyright (C) 2005 Brion Vibber <brion@pobox.com>
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
-->
<language id="c-sharp" name="C#" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-csharpsrc;text/x-csharp</property>
<property name="globs">*.cs</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.cs</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="error" name="Error" map-to="def:error"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="string" name="String" map-to="def:string"/>
<style id="char" name="Character" map-to="def:character"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
<style id="format" name="String Format" map-to="def:special-char"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
<style id="real" name="Real number" map-to="def:floating-point"/>
<style id="method-calls" name="Method Calls" map-to="def:method-calls"/>
</styles>
<definitions>
<context id="method-calls" style-ref="method-calls">
<match extended="true">
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
</match>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="multiline-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<define-regex id="preproc-start">^\s*#\s*</define-regex>
<context id="if-false-comment" style-ref="comment">
<start>\%{preproc-start}if\s*false\b</start>
<end>\%{preproc-start}(endif|else|elif)\b</end>
<include>
<context id="if-in-if-false">
<start>\%{preproc-start}if(n?def)?\b</start>
<end>\%{preproc-start}endif\b</end>
<include>
<context ref="if-in-if-false"/>
<context ref="def:in-comment"/>
</include>
</context>
<context ref="def:in-comment"/>
</include>
</context>
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
<start extended="true">
\%{preproc-start}
(define|undef|if(n?def)?|else|elif|endif|line|error|warning|region|endregion)
\b
</start>
<include>
<context ref="line-comment"/>
<context ref="multiline-comment"/>
</include>
</context>
<context id="multiline-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>@"</start>
<end>"</end>
</context>
<context id="keywords" style-ref="keyword">
<keyword>async</keyword>
<keyword>await</keyword>
<keyword>class</keyword>
<keyword>delegate</keyword>
<keyword>enum</keyword>
<keyword>event</keyword>
<keyword>interface</keyword>
<keyword>namespace</keyword>
<keyword>struct</keyword>
<keyword>using</keyword>
<keyword>abstract</keyword>
<keyword>const</keyword>
<keyword>explicit</keyword>
<keyword>extern</keyword>
<keyword>fixed</keyword>
<keyword>implicit</keyword>
<keyword>internal</keyword>
<keyword>lock</keyword>
<keyword>out</keyword>
<keyword>override</keyword>
<keyword>params</keyword>
<keyword>partial</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>record</keyword>
<keyword>ref</keyword>
<keyword>sealed</keyword>
<keyword>static</keyword>
<keyword>readonly</keyword>
<keyword>unsafe</keyword>
<keyword>virtual</keyword>
<keyword>volatile</keyword>
<keyword>add</keyword>
<keyword>as</keyword>
<keyword>assembly</keyword>
<keyword>base</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>checked</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>foreach</keyword>
<keyword>get</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>init</keyword>
<keyword>is</keyword>
<keyword>nameof</keyword>
<keyword>new</keyword>
<keyword>remove</keyword>
<keyword>return</keyword>
<keyword>set</keyword>
<keyword>sizeof</keyword>
<keyword>stackalloc</keyword>
<keyword>super</keyword>
<keyword>switch</keyword>
<keyword>this</keyword>
<keyword>throw</keyword>
<keyword>try</keyword>
<keyword>typeof</keyword>
<keyword>unchecked</keyword>
<keyword>value</keyword>
<keyword>var</keyword>
<keyword>void</keyword>
<keyword>while</keyword>
<keyword>yield</keyword>
</context>
<context id="primitives" style-ref="type">
<keyword>bool</keyword>
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>decimal</keyword>
<keyword>double</keyword>
<keyword>dynamic</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>object</keyword>
<keyword>operator</keyword>
<keyword>sbyte</keyword>
<keyword>short</keyword>
<keyword>string</keyword>
<keyword>uint</keyword>
<keyword>ulong</keyword>
<keyword>ushort</keyword>
</context>
<context id="null-value" style-ref="null-value">
<keyword>null</keyword>
</context>
<context id="boolean" style-ref="boolean">
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[0-9]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="real" style-ref="real">
<match extended="true">
(?&lt;![\w\.])
((\.[0-9]+|[0-9]+\.[0-9]*)([Ee][+-]?[0-9]*)?[FfDdMm]?|
([0-9]+[Ee][+-]?[0-9]*)[FfDdMm]? |
([0-9]+)[FfDdMm])
(?![\w\.])
</match>
</context>
<!-- FIXME Taken from C, is it right? -->
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbtfav\?] | # escaped character
[0-7]{1,3} | # one, two, or three octal digits
x[0-9A-Fa-f]+ # 'x' followed by hex digits
)
</define-regex>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="csharp-format" style-ref="format">
<match>{[0-9][0-9:\#\%,./cdefgnrxtsuDTFGMY]*}</match>
</context>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
<context id="char" style-ref="char">
<!-- FIXME I don't know C# syntax -->
<match>'(\%{escaped-character}|.)'</match>
</context>
<context id="c-sharp" class="no-spell-check">
<include>
<context ref="method-calls"/>
<context ref="multiline-string"/>
<context ref="string"/>
<context ref="char"/>
<context ref="line-comment"/>
<context ref="multiline-comment"/>
<context ref="close-comment-outside-comment"/>
<context ref="if-false-comment"/>
<context ref="preprocessor"/>
<context ref="keywords"/>
<context ref="primitives"/>
<context ref="null-value"/>
<context ref="boolean"/>
<context ref="decimal"/>
<context ref="hexadecimal"/>
<context ref="real"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,315 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
-->
<language id="def" name="Defaults" hidden="true" version="2.0">
<styles>
<!-- styles defined here are all the styles that
a language can use as default for its styles.
The styles are defined in logical groups.
A style scheme has to at least define the style
for the first item of each group and if desired
define the style for the other items to achieve a
more finegrained control on the apperance.
Finally a style scheme may also define language
specific styles. -->
<!-- Comment group -->
<!-- Any comment -->
<style id="comment" name="Comment"/>
<!-- A shebang: #!/bin/sh -->
<style id="shebang" name="Shebang" map-to="def:comment"/>
<!-- A special comment containing documentation like in javadoc or
gtk-doc -->
<style id="doc-comment" name="Documentation comment" map-to="def:comment"/>
<!-- A element inside a documentation comment: @author -->
<!-- This style doesn't map to anything since it must be used as an additional
style for text which is already styled as a "doc-comment" -->
<style id="doc-comment-element" name="Documentation comment element" />
<!-- Constant group -->
<!-- Any constant -->
<style id="constant" name="Constant"/>
<!-- A character constant: 'c' -->
<style id="character" name="Character" map-to="def:constant"/>
<!-- A string constant: "this is a string" -->
<style id="string" name="String" map-to="def:constant"/>
<!-- Special character in a string constant: "%s", "\t" -->
<!-- This style doesn't map to anything since it must be used as an additional style for text which is already styled as a "string" -->
<style id="special-char" name="Special character (inside a string)" />
<!-- A generic number constant -->
<style id="number" name="Number" map-to="def:constant"/>
<!-- A floating point constant: 2.3e10 -->
<style id="floating-point" name="Floating point number" map-to="def:number"/>
<!-- A decimal number: 1234 -->
<style id="decimal" name="Decimal number" map-to="def:number"/>
<!-- A base-N number: 0xFFFF -->
<style id="base-n-integer" name="Base-N number" map-to="def:number"/>
<!-- A complex number -->
<style id="complex" name="Complex number" map-to="def:number"/>
<!-- A special constant like NULL in C or null in Java -->
<style id="special-constant" name="Special constant" map-to="def:constant"/>
<!-- A boolean constant: TRUE, false -->
<style id="boolean" name="Boolean value" map-to="def:special-constant"/>
<!-- Identifier group -->
<!-- Any variable name -->
<style id="identifier" name="Identifier" />
<!-- A function name (also: methods for classes) -->
<style id="function" name="Function" map-to="def:identifier"/>
<!-- A builtin name: like __import__, abs in Python
(see http://docs.python.org/lib/built-in-funcs.html) -->
<style id="builtin" name="Built-in identifier" map-to="def:identifier"/>
<!-- Statement group -->
<!-- Any statement -->
<style id="statement" name="Statement"/>
<!-- Operators: "+", "*", etc. -->
<style id="operator" name="Operator" map-to="def:statement" />
<!-- keywords: "if", "for", "while", etc. -->
<style id="keyword" name="Keyword" map-to="def:statement" />
<style id="method-calls" name="Method Calls"/>
<!-- Type group -->
<!--A primitive data type: int, long, char, etc. -->
<style id="type" name="Data type"/>
<!-- Markup group -->
<!-- Emphasis, usually rendered with italics -->
<style id="emphasis" name="Emphasis"/>
<!-- Strong emphasis, usually rendered as bold -->
<style id="strong-emphasis" name="Strong emphasis"/>
<!-- Inline code, usually rendered with a monospace font -->
<style id="inline-code" name="Inline code"/>
<!-- Insertion, usually rendered with an underline -->
<style id="insertion" name="Insertion"/>
<!-- Deletion, usually rendered with a strikethrough -->
<style id="deletion" name="Deletion"/>
<!-- Link text, usually rendered with an underline -->
<style id="link-text" name="Link text"/>
<!-- Link symbol, a part of the markup syntax for links -->
<style id="link-symbol" name="Link symbol"/>
<!-- Link destination, not usually visible -->
<style id="link-destination" name="Link destination"/>
<!-- Heading, usually rendered in a larger font (using h1, h2, etc. tags) -->
<style id="heading" name="Heading"/>
<!-- Thematic break, usually rendered as a horizontal rule (line) -->
<style id="thematic-break" name="Thematic break"/>
<!-- Preformatted section, usually rendered with a monospace font -->
<style id="preformatted-section" name="Preformatted section"/>
<!-- List marker, usually rendered as a bullet or number -->
<style id="list-marker" name="List marker"/>
<!-- Others -->
<!-- This one is for '#include <foo.h>' and "#pragma blah", or 'use foobar', etc.. -->
<style id="preprocessor" name="Preprocessor directive"/>
<!-- Any erroneous construct -->
<style id="error" name="Error"/>
<!-- to mark possibily errors or unrecommended syntax -->
<style id="warning" name="Warning"/>
<!--Reserved keywords: like "const" and "goto" in Java -->
<style id="reserved" name="Reserved keyword" map-to="def:error" />
<!-- Anything that needs extra attention; mostly the keywords TODO, FIXME and XXX -->
<style id="note" name="Note (FIXME, TODO, XXX, etc.)"/>
<!-- Internet address: URLs, email addresses, etc. -->
<style id="net-address" name="Net address (URL, email address, etc.)"/>
<!-- Deprecated: will be removed in a future version -->
<style id="underlined" name="Underlined (DEPRECATED)" map-to="def:net-address"/>
<!-- Text that acts as some kind of heading, such as h1, h2, ... in html. -->
<style id="heading0" name="Heading 0"/>
<style id="heading1" name="Heading 1"/>
<style id="heading2" name="Heading 2"/>
<style id="heading3" name="Heading 3"/>
<style id="heading4" name="Heading 4"/>
<style id="heading5" name="Heading 5"/>
<style id="heading6" name="Heading 6"/>
</styles>
<definitions>
<!-- An empty string always matches. -->
<define-regex id="always-match"></define-regex>
<!-- $^ never matches. -->
<define-regex id="never-match">$^</define-regex>
<!-- Unicode lexical classes for identifiers
Descriptions from:
https://www.unicode.org/reports/tr31/#Table_Lexical_Classes_for_Identifiers
Code point data from:
https://www.unicode.org/Public/13.0.0/ucd/DerivedCoreProperties.txt
https://www.unicode.org/Public/13.0.0/ucd/PropList.txt
U+2E2F VERTICAL TILDE is the only applicable code point in
Pattern_Syntax (and Pattern_White_Space) to subtract to form
ID_Start and ID_Continue
-->
<define-regex id="unicode-id-start" extended="true">
(?!\x{2E2F}) [\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}]
</define-regex>
<define-regex id="unicode-id-continue" extended="true">
(?!\x{2E2F}) [\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}]
</define-regex>
<define-regex id="unicode-xid-start" extended="true">
(?![\x{037A}\x{0E33}\x{0EB3}\x{309B}-\x{309C}\x{FC5E}-\x{FC63}\x{FDFA}-\x{FDFB}\x{FE70}\x{FE72}\x{FE74}\x{FE76}\x{FE78}\x{FE7A}\x{FE7C}\x{FE7E}\x{FF9E}-\x{FF9F}])
\%{unicode-id-start}
</define-regex>
<define-regex id="unicode-xid-continue" extended="true">
(?![\x{037A}\x{309B}-\x{309C}\x{FC5E}-\x{FC63}\x{FDFA}-\x{FDFB}\x{FE70}\x{FE72}\x{FE74}\x{FE76}\x{FE78}\x{FE7A}\x{FE7C}\x{FE7E}])
\%{unicode-id-continue}
</define-regex>
<define-regex id="decimal" extended="true">
(?&lt;![\w\.]) ([1-9][0-9]* | 0) (?![\w\.])
</define-regex>
<define-regex id="octal" extended="true">
(?&lt;![\w\.]) 0 [0-7]+ (?![\w\.])
</define-regex>
<define-regex id="hexadecimal" extended="true">
(?&lt;![\w\.]) 0 [xX] [0-9a-fA-F]+ (?![\w\.])
</define-regex>
<define-regex id="float" extended="true" case-sensitive="false">
\b
([0-9]+ e [-+]? [0-9]+ |
([0-9]* \. [0-9]+ | [0-9]+ \.)
(e [-+]? [0-9]+)?) [fl]?
\b
</define-regex>
<context id="decimal" style-ref="decimal">
<match>\%{decimal}</match>
</context>
<context id="octal" style-ref="base-n-integer">
<match>\%{octal}</match>
</context>
<context id="hexadecimal" style-ref="base-n-integer">
<match>\%{hexadecimal}</match>
</context>
<context id="float" style-ref="floating-point">
<match>\%{float}</match>
</context>
<!-- FIXME is it working at line end? -->
<define-regex id="net-address" extended="true" case-sensitive="false">
\%[ # separator
(https?|ftp|nntp|news|javascript|about): # protocol
[^\ \\]* [^\ \\.:;,?&gt;&lt;)] # address
(?![a-z0-9_.-]) # separator
</define-regex>
<define-regex id="email-address" extended="true" case-sensitive="false">
\%[ # separator
(mailto:)? # optional "mailto:"
[a-z0-9_.+-]+ # user name
@ # at
[a-z0-9_.+-]+ # domain
\%] # separator
</define-regex>
<context id="in-comment" class-disabled="no-spell-check">
<include>
<context id="net-address" extend-parent="false" style-ref="net-address" class="no-spell-check">
<match>\%{net-address}</match>
</context>
<context id="email-address" extend-parent="false" style-ref="net-address" class="no-spell-check">
<match>\%{email-address}</match>
</context>
<context id="comment-note" extend-parent="false" style-ref="note" class="no-spell-check comment-note">
<match>\b(FIXME|TODO|XXX)\b</match>
</context>
</include>
</context>
<!-- A line comment starting with # -->
<context id="shell-like-comment" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check" class="comment">
<start>#</start>
<include>
<context ref="in-comment"/>
</include>
</context>
<!-- C style comments -->
<context id="c-like-comment" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check" class="comment" >
<start>//</start>
<include>
<context ref="in-line-comment"/>
</include>
</context>
<context id="c-like-comment-multiline" style-ref="comment" class-disabled="no-spell-check" class="comment" >
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="in-comment"/>
</include>
</context>
<context id="c-like-close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="line-continue" style-ref="preprocessor">
<start>\\$</start>
<end>^</end>
</context>
<!-- this is intended to be used from line comments
that can continue on a different line after "\" -->
<context id="in-line-comment" class-disabled="no-spell-check" class="comment">
<include>
<context ref="line-continue" ignore-style="true"/>
<context ref="in-comment"/>
</include>
</context>
<context id="shebang" style-ref="shebang" first-line-only="true" class="no-spell-check">
<start>^#!</start>
<end>$</end>
</context>
<context id="escape" style-ref="special-char">
<match>\\.</match>
</context>
<!-- usual quoted string, ends at line end, \ is an escape char -->
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="escape"/>
<context ref="line-continue"/>
</include>
</context>
<!-- same thing but with single quote marks -->
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="escape"/>
<context ref="line-continue"/>
</include>
</context>
<!-- Dummy context, needed to load the style mappings when parsing v1 files -->
<context id="def"/>
</definitions>
</language>

View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2003 Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2006 Jeff Walden <jwalden@mit.edu>
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
-->
<language id="java" name="Java" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-java</property>
<property name="globs">*.java</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
<property name="suggested-suffix">.java</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="doc-comment" name="Documentation comment" map-to="def:doc-comment"/>
<style id="doc-comment-element" name="Documentation comment element" map-to="def:doc-comment-element"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
<style id="multiline-string" name="Multiline string" map-to="def:string"/>
<style id="string" name="String" map-to="def:string"/>
<style id="char" name="Character" map-to="def:character"/>
<style id="external" name="External" map-to="def:preprocessor"/>
<style id="annotation" name="Annotation" map-to="def:preprocessor"/>
<style id="declaration" name="Declaration" map-to="def:type"/>
<style id="storage-class" name="Storage Class" map-to="def:type"/>
<style id="scope-declaration" name="Scope Declaration" map-to="def:type"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="floating-point" name="Floating-point number" map-to="def:floating-point"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="base-n-integer" name="Base-N number" map-to="def:base-n-integer"/>
<style id="reserved" name="Future Reserved Keywords" map-to="def:reserved"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="method-calls" name="Method Calls" map-to="def:method-calls"/>
</styles>
<definitions>
<context id="method-calls" style-ref="method-calls">
<match extended="true">
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
</match>
</context>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbtf] | # escaped character
[0-7]{1,3} | # latin encoded char
u[0-9a-fA-F]{4} # unicode char
)
</define-regex>
<context id="doc-comment" style-ref="doc-comment" class-disabled="no-spell-check" class="comment">
<start>/\*\*(?![\*/])</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
<context id="doc-comment-element" style-ref="doc-comment-element">
<match>\B@\w+</match>
</context>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
</include>
</context>
<context id="multiline-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>"""\s*$</start>
<end>"""</end>
<include>
<context style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
</include>
</context>
<context id="char" style-ref="char">
<match>'((\%{escaped-character})|.)'</match>
<include>
<context sub-pattern="2" style-ref="escaped-character"/>
</include>
</context>
<context id="annotation" style-ref="annotation">
<match>\B@\w*</match>
</context>
<context id="externals" style-ref="external">
<keyword>exports</keyword>
<keyword>import</keyword>
<keyword>module</keyword>
<keyword>open</keyword>
<keyword>opens</keyword>
<keyword>package</keyword>
<keyword>provides</keyword>
<keyword>requires</keyword>
<keyword>to</keyword>
<keyword>transitive</keyword>
<keyword>uses</keyword>
<keyword>with</keyword>
</context>
<context id="declarations" style-ref="declaration">
<keyword>class</keyword>
<keyword>enum</keyword>
<keyword>extends</keyword>
<keyword>implements</keyword>
<keyword>instanceof</keyword>
<keyword>interface</keyword>
<keyword>native</keyword>
<keyword>non-sealed</keyword>
<keyword>permits</keyword>
<keyword>record</keyword>
<keyword>sealed</keyword>
<keyword>throws</keyword>
</context>
<context id="primitive-types" style-ref="type">
<keyword>boolean</keyword>
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>double</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>short</keyword>
<keyword>var</keyword>
<keyword>void</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>abstract</keyword>
<keyword>final</keyword>
<keyword>static</keyword>
<keyword>strictfp</keyword>
<keyword>synchronized</keyword>
<keyword>transient</keyword>
<keyword>volatile</keyword>
</context>
<context id="scope-declarations" style-ref="scope-declaration">
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
</context>
<context id="flow" style-ref="keyword">
<keyword>assert</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>return</keyword>
<keyword>throw</keyword>
<keyword>switch</keyword>
<keyword>try</keyword>
<keyword>while</keyword>
<keyword>yield</keyword>
</context>
<context id="memory" style-ref="keyword">
<keyword>new</keyword>
<keyword>super</keyword>
<keyword>this</keyword>
</context>
<context id="future-reserved-words" style-ref="reserved">
<keyword>const</keyword>
<keyword>goto</keyword>
<keyword>_</keyword>
</context>
<context id="null-value" style-ref="null-value">
<keyword>null</keyword>
</context>
<context id="boolean" style-ref="boolean">
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="floating-point" style-ref="floating-point">
<match extended="true" case-sensitive="false">
\b(
\d+[fd] |
((\d*\.\d+|\d+\.)(e[-+]?\d+)? |
\d+e[-+]?\d+)[fd]?
)
</match>
</context>
<context id="base-n-integer" style-ref="base-n-integer">
<match case-sensitive="false">\b(0x[\da-f]+|0[0-7]+)l?</match>
</context>
<context id="decimal" style-ref="decimal">
<match case-sensitive="false">\b([1-9]\d*|0)l?</match>
</context>
<context id="java" class="no-spell-check">
<include>
<context ref="method-calls"/>
<context ref="doc-comment"/>
<context ref="def:c-like-comment" style-ref="comment"/>
<context ref="def:c-like-comment-multiline" style-ref="comment"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="multiline-string"/>
<context ref="string"/>
<context ref="char"/>
<context ref="annotation"/>
<context ref="externals"/>
<context ref="declarations"/>
<context ref="primitive-types"/>
<context ref="storage-class"/>
<context ref="scope-declarations"/>
<context ref="flow"/>
<context ref="memory"/>
<context ref="future-reserved-words"/>
<context ref="null-value"/>
<context ref="boolean"/>
<context ref="floating-point"/>
<context ref="base-n-integer"/>
<context ref="decimal"/>
</include>
</context>
</definitions>
</language>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,398 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Adam Dingle
Copyright (C) 2017 Adam Dingle <adam@medovina.org>
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
-->
<language id="kotlin" name="Kotlin" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-kotlin</property>
<property name="globs">*.kt;*.kts</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="builtin" name="Builtin Value" map-to="def:builtin"/>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="declaration" name="Declaration" map-to="def:type"/>
<style id="default" name="Default"/>
<style id="error" name="Error" map-to="def:error"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
<style id="external" name="External" map-to="def:preprocessor"/>
<style id="identifier" name="Identifier" map-to="def:identifier"/>
<style id="interpolated" name="Interpolated Expression" map-to="def:identifier"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="modifier" name="Modifier" map-to="def:type"/>
<style id="number" name="Number" map-to="def:decimal"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="special" name="Special Constant" map-to="def:special-constant"/>
<style id="string" name="String" map-to="def:string"/>
<style id="type" name="Data Type" map-to="def:identifier"/>
<style id="method-calls" name="Method Calls" map-to="def:method-calls"/>
</styles>
<definitions>
<context id="method-calls" style-ref="method-calls">
<match extended="true">
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
</match>
</context>
<define-regex id="simple-name">[a-zA-Z_$][a-zA-Z_$0-9]*</define-regex>
<define-regex id="compound-name">\%{simple-name}(\.\%{simple-name})*</define-regex>
<define-regex id="annotation-target" extended="true">
field|file|property|get|set|receiver|param|setparam|delegate
</define-regex>
<context id="annotation" style-ref="special">
<match extended="true">
@(\%{annotation-target}:)?
( \%{compound-name} | \[ (\%{compound-name} \s*)+ \] )
</match>
</context>
<context id="block-comment" style-ref="comment">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
<context ref="block-comment"/>
</include>
</context>
<context id="builtin" style-ref="builtin">
<keyword>it</keyword>
<keyword>super</keyword>
<keyword>this@?</keyword>
</context>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbt$] | # escaped character
u[0-9a-fA-F]{4} # unicode char
)
</define-regex>
<context id="character" style-ref="special">
<match>'(\%{escaped-character}|.)'</match>
</context>
<context id="character-error" style-ref="error">
<match>'(\%{escaped-character}|.)[^\s]+'</match>
</context>
<context id="declaration" style-ref="declaration">
<keyword>class</keyword>
<keyword>constructor</keyword>
<keyword>fun</keyword>
<keyword>get</keyword>
<keyword>init</keyword>
<keyword>interface</keyword>
<keyword>object</keyword>
<keyword>set</keyword>
<keyword>typealias</keyword>
<keyword>val</keyword>
<keyword>var</keyword>
</context>
<context id="variance-annotation">
<match>(&lt;|,) *(in|out)</match>
<include>
<context sub-pattern="1" style-ref="operator" />
<context sub-pattern="2" style-ref="modifier" />
</include>
</context>
<context id="expression" style-ref="keyword">
<keyword>as</keyword>
<keyword>break@?</keyword>
<keyword>catch</keyword>
<keyword>continue@?</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>is</keyword>
<keyword>return@?</keyword>
<keyword>throw</keyword>
<keyword>to</keyword>
<keyword>try</keyword>
<keyword>when</keyword>
<keyword>while</keyword>
</context>
<context id="external" style-ref="external">
<keyword>import</keyword>
<keyword>package</keyword>
</context>
<context id="literal-identifier">
<start>`</start>
<end>`</end>
</context>
<context id="modifier" style-ref="modifier">
<keyword>abstract</keyword>
<keyword>annotation</keyword>
<keyword>by</keyword>
<keyword>companion</keyword>
<keyword>const</keyword>
<keyword>crossinline</keyword>
<keyword>data</keyword>
<keyword>enum</keyword>
<keyword>external</keyword>
<keyword>final</keyword>
<keyword>infix</keyword>
<keyword>inline</keyword>
<keyword>inner</keyword>
<keyword>internal</keyword>
<keyword>lateinit</keyword>
<keyword>noinline</keyword>
<keyword>open</keyword>
<keyword>operator</keyword>
<keyword>override</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>reified</keyword>
<keyword>sealed</keyword>
<keyword>suspend</keyword>
<keyword>tailrec</keyword>
<keyword>vararg</keyword>
<keyword>where</keyword>
</context>
<context id="numeric" style-ref="number">
<match extended="true">
\b ( 0x [0-9A-Fa-f][0-9A-Fa-f_]* # hex literal
| 0b [01][01_]* # binary literal
| ([0-9]+[Ee][-]?[0-9]+|
([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFdD]?|
[0-9]+[FfDd] # floating-point literal
| [0-9][0-9_]*L? # integer literal
)
</match>
</context>
<context id="operator" style-ref="operator">
<match>[-+*/%=.!|?@:;,_&amp;&lt;&gt;()\[\]]</match>
</context>
<context id="special" style-ref="special">
<keyword>false</keyword>
<keyword>true</keyword>
<keyword>null</keyword>
</context>
<context id="interpolated-identifier" style-ref="interpolated">
<match>\$[a-zA-Z]+</match>
</context>
<context id="interpolated-expression" style-ref="interpolated">
<start>\${</start>
<end>}</end>
<include>
<context ref="kotlin"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true"
class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="interpolated-identifier"/>
<context ref="interpolated-expression"/>
</include>
</context>
<context id="multiline-string" style-ref="string" end-at-line-end="false" class="string" class-disabled="no-spell-check">
<start>"""</start>
<end>"""</end>
<include>
<context ref="interpolated-identifier"/>
<context ref="interpolated-expression"/>
</include>
</context>
<context id="type" style-ref="type">
<keyword>dynamic</keyword>
<!-- kotlin -->
<keyword>Annotation</keyword>
<keyword>Any</keyword>
<keyword>Array</keyword>
<keyword>AssertionError</keyword>
<keyword>Boolean</keyword>
<keyword>BooleanArray</keyword>
<keyword>Byte</keyword>
<keyword>ByteArray</keyword>
<keyword>Char</keyword>
<keyword>CharArray</keyword>
<keyword>CharSequence</keyword>
<keyword>ClassCastException</keyword>
<keyword>Comparable</keyword>
<keyword>Comparator</keyword>
<keyword>ConcurrentModificationException</keyword>
<keyword>DeprecationLevel</keyword>
<keyword>Double</keyword>
<keyword>DoubleArray</keyword>
<keyword>Enum</keyword>
<keyword>Error</keyword>
<keyword>Exception</keyword>
<keyword>Float</keyword>
<keyword>FloatArray</keyword>
<keyword>Function</keyword>
<keyword>IllegalArgumentException</keyword>
<keyword>IllegalStateException</keyword>
<keyword>IndexOutOfBoundsException</keyword>
<keyword>Int</keyword>
<keyword>IntArray</keyword>
<keyword>KotlinVersion</keyword>
<keyword>Lazy</keyword>
<keyword>LazyThreadSafetyMode</keyword>
<keyword>Long</keyword>
<keyword>LongArray</keyword>
<keyword>NoSuchElementException</keyword>
<keyword>NoWhenBranchMatchedException</keyword>
<keyword>Nothing</keyword>
<keyword>NullPointerException</keyword>
<keyword>Number</keyword>
<keyword>NumberFormatException</keyword>
<keyword>Pair</keyword>
<keyword>RuntimeException</keyword>
<keyword>Short</keyword>
<keyword>ShortArray</keyword>
<keyword>String</keyword>
<keyword>Throwable</keyword>
<keyword>Triple</keyword>
<keyword>Unit</keyword>
<keyword>UnsupportedOperationException</keyword>
<keyword>NotImplementedError</keyword>
<!-- kotlin.collections -->
<keyword>AbstractCollection</keyword>
<keyword>AbstractIterator</keyword>
<keyword>AbstractList</keyword>
<keyword>AbstractMap</keyword>
<keyword>AbstractMutableCollection</keyword>
<keyword>AbstractMutableList</keyword>
<keyword>AbstractMutableMap</keyword>
<keyword>AbstractMutableSet</keyword>
<keyword>AbstractSet</keyword>
<keyword>ArrayList</keyword>
<keyword>BooleanIterator</keyword>
<keyword>ByteIterator</keyword>
<keyword>CharIterator</keyword>
<keyword>Collection</keyword>
<keyword>DoubleIterator</keyword>
<keyword>FloatIterator</keyword>
<keyword>Grouping</keyword>
<keyword>HashMap</keyword>
<keyword>HashSet</keyword>
<keyword>IndexedValue</keyword>
<keyword>IntIterator</keyword>
<keyword>Iterable</keyword>
<keyword>Iterator</keyword>
<keyword>LinkedHashMap</keyword>
<keyword>LinkedHashSet</keyword>
<keyword>List</keyword>
<keyword>ListIterator</keyword>
<keyword>LongIterator</keyword>
<keyword>Map</keyword>
<keyword>MutableCollection</keyword>
<keyword>MutableIterable</keyword>
<keyword>MutableIterator</keyword>
<keyword>MutableList</keyword>
<keyword>MutableListIterator</keyword>
<keyword>MutableMap</keyword>
<keyword>MutableSet</keyword>
<keyword>RandomAccess</keyword>
<keyword>Set</keyword>
<keyword>ShortIterator</keyword>
<!-- kotlin.ranges -->
<keyword>CharProgression</keyword>
<keyword>CharRange</keyword>
<keyword>ClosedFloatingPointRange</keyword>
<keyword>ClosedRange</keyword>
<keyword>IntProgression</keyword>
<keyword>IntRange</keyword>
<keyword>LongProgression</keyword>
<keyword>LongRange</keyword>
<!-- kotlin.sequences -->
<keyword>Sequence</keyword>
<!-- kotlin.text -->
<keyword>Appendable</keyword>
<keyword>CharCategory</keyword>
<keyword>CharDirectionality</keyword>
<keyword>Charsets</keyword>
<keyword>MatchGroup</keyword>
<keyword>MatchGroupCollection</keyword>
<keyword>MatchNamedGroupCollection</keyword>
<keyword>MatchResult</keyword>
<keyword>Regex</keyword>
<keyword>RegexOption</keyword>
<keyword>StringBuilder</keyword>
<keyword>Typography</keyword>
</context>
<context id="kotlin" class="no-spell-check">
<include>
<context ref="method-calls"/>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="annotation"/>
<context ref="block-comment"/>
<context ref="builtin"/>
<context ref="character"/>
<context ref="character-error"/>
<context ref="declaration"/>
<context ref="variance-annotation"/>
<context ref="expression"/>
<context ref="external"/>
<context ref="literal-identifier"/>
<context ref="modifier"/>
<context ref="multiline-string"/>
<context ref="numeric"/>
<context ref="operator"/>
<context ref="special"/>
<context ref="string"/>
<context ref="type"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,484 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2003 Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2004 Benoît Dejean <TaZForEver@free.fr>
Copyright (C) 2006 Steve Frécinaux <nud@apinc.org>
Copyright (C) 2012 Stefano Palazzo <stefano-palazzo@ubuntu.com>
Copyright (C) 2014 Patryk Zawadzki <patrys@pld-linux.org>
Copyright (C) 2014 Sébastien Wilmet <swilmet@gnome.org>
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
-->
<language id="python" name="Python 2" version="2.0" _section="Script">
<metadata>
<property name="mimetypes">text/x-python;application/x-python</property>
<property name="globs">*.py;*.py2</property>
<property name="line-comment-start">#</property>
<property name="suggested-suffix">.py2</property>
</metadata>
<styles>
<style id="module-handler" name="Module Handler" map-to="def:preprocessor"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="multiline-string" name="Multiline string" map-to="def:string"/>
<style id="string" name="String" map-to="def:string"/>
<style id="escaped-char" name="Escaped Character" map-to="def:special-char"/>
<style id="format" name="Format" map-to="def:character"/>
<style id="string-conversion" name="String Conversion"/>
<style id="special-variable" name="Special Variable" map-to="def:identifier"/>
<style id="boolean" name="Boolean" map-to="def:boolean"/>
<style id="floating-point" name="Floating point number" map-to="def:floating-point"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="base-n-integer" name="Base-N number" map-to="def:base-n-integer"/>
<style id="complex" name="Complex number" map-to="def:complex"/>
<style id="builtin-constant" name="Builtin Constant" map-to="def:special-constant"/>
<style id="builtin-object" name="Builtin Object" map-to="def:type"/>
<style id="builtin-function" name="Builtin Function" map-to="def:builtin"/>
<style id="function-name" name="Function Name" map-to="def:function"/>
<style id="class-name" name="Class Name" map-to="def:function"/>
<style id="decorator" name="Decorator" map-to="def:preprocessor"/>
<style id="method-calls" name="Method Calls" map-to="def:method-calls"/>
</styles>
<definitions>
<context id="method-calls" style-ref="method-calls">
<match extended="true">
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
</match>
</context>
<define-regex id="identifier">[_a-zA-Z][_a-zA-Z0-9]*</define-regex>
<define-regex id="number">[1-9][0-9]*</define-regex>
<define-regex id="identifier-path" extended="true">
(\%{identifier}\.)*\%{identifier}
</define-regex>
<define-regex id="relative-path" extended="true">
(\.*\%{identifier-path}|\.+)
</define-regex>
<!-- http://docs.python.org/lib/typesseq-strings.html -->
<context id="format" style-ref="format" extend-parent="false">
<match extended="true">
% # leading % sign
\(\%{identifier}\)? # mapping key
[#0\-\ \+]* # conversion flags
(\-?\%{number}|\*)? # minimum field width
(\.(\-?\%{number}|\*))? # precision
(hlL)? # length modifier
[diouxXeEfFgGcrs%] # conversion type
</match>
</context>
<!-- http://docs.python.org/ref/strings.html -->
<context id="escaped-char" style-ref="escaped-char" extend-parent="true">
<match extended="true">
\\( # leading backslash
[\\'"abfnrtv] | # single escaped char
N\{[0-9A-Z\ -]+\} | # named unicode character
u[0-9A-Fa-f]{4} | # xxxx - character with 16-bit hex value xxxx
U[0-9A-Fa-f]{8} | # xxxxxxxx - character with 32-bit hex value xxxxxxxx
x[0-9A-Fa-f]{1,2} | # \xhh - character with hex value hh
[0-7]{1,3} # \ooo - character with octal value ooo
)
</match>
</context>
<define-regex id="string-prefix">(u|U)?</define-regex>
<define-regex id="raw-string-prefix">(r|ur|R|UR|Ur|uR)</define-regex>
<context id="multiline-double-quoted-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>\%{string-prefix}"""</start>
<end>"""</end>
<include>
<context ref="format"/>
<context ref="escaped-char"/>
</include>
</context>
<context id="multiline-single-quoted-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>\%{string-prefix}'''</start>
<end>'''</end>
<include>
<context ref="format"/>
<context ref="escaped-char"/>
</include>
</context>
<context id="double-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>\%{string-prefix}"</start>
<end>"</end>
<include>
<context ref="format"/>
<context ref="escaped-char"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>\%{string-prefix}'</start>
<end>'</end>
<include>
<context ref="format"/>
<context ref="escaped-char"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="multiline-double-quoted-raw-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>\%{raw-string-prefix}"""</start>
<end>"""</end>
<include>
<context ref="format"/>
<context ref="escaped-char" ignore-style="true"/>
</include>
</context>
<context id="multiline-single-quoted-raw-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>\%{raw-string-prefix}'''</start>
<end>'''</end>
<include>
<context ref="format"/>
<context ref="escaped-char" ignore-style="true"/>
</include>
</context>
<context id="double-quoted-raw-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>\%{raw-string-prefix}"</start>
<end>"</end>
<include>
<context ref="format"/>
<context ref="escaped-char" ignore-style="true"/>
<context ref="def:line-continue" ignore-style="true"/>
</include>
</context>
<context id="single-quoted-raw-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>\%{raw-string-prefix}'</start>
<end>'</end>
<include>
<context ref="format"/>
<context ref="escaped-char" ignore-style="true"/>
<context ref="def:line-continue" ignore-style="true"/>
</include>
</context>
<context id="string-conversion" style-ref="string-conversion" end-at-line-end="true">
<start>`</start>
<end>`</end>
<include>
<context ref="python"/>
</include>
</context>
<context id="special-variables" style-ref="special-variable">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>self</keyword>
<keyword>__name__</keyword>
<keyword>__debug__</keyword>
</context>
<context id="boolean" style-ref="boolean">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>False</keyword>
<keyword>True</keyword>
</context>
<define-regex id="float" extended="true">
( (\d+)?\.\d+ | \d+\. ) |
( (\d+|(\d+)?\.\d+|\d+\.)[eE][+-]?\d+ )
</define-regex>
<context id="complex" style-ref="complex">
<match>(?&lt;![\w\.])(\%{float}|\d+)[jJ]\b</match>
</context>
<context id="float" style-ref="floating-point">
<match>(?&lt;![\w\.])\%{float}(?![\w\.])</match>
</context>
<context id="decimal" style-ref="decimal">
<match>(?&lt;![\w\.])([1-9][0-9]*|0)[lL]?(?![\w\.])</match>
</context>
<context id="octal" style-ref="base-n-integer">
<match>(?&lt;![\w\.])0[0-7]+[lL]?(?![\w\.])</match>
</context>
<context id="hex" style-ref="base-n-integer">
<match>(?&lt;![\w\.])0[xX][0-9A-Fa-f]+[lL]?(?![\w\.])</match>
</context>
<context id="module-handler-from">
<match extended="true">
(from)
\s+
(\%{relative-path})
</match>
<include>
<context sub-pattern="1" style-ref="module-handler"/>
<context sub-pattern="2" style-ref="class-name"/>
</include>
</context>
<context id="module-handler" style-ref="module-handler">
<keyword>import</keyword>
<keyword>from</keyword>
<keyword>as</keyword>
</context>
<!-- 'def' is also present in the 'keyword' context, but has a lower
priority, so 'def' is highlighted even if the function name doesn't match. -->
<context id="function-definition">
<match extended="true">
(def)
\s+
(\%{identifier})
</match>
<include>
<context sub-pattern="1" style-ref="keyword"/>
<context sub-pattern="2" style-ref="function-name"/>
</include>
</context>
<!-- 'class' is also present in the 'keyword' context, but has a lower
priority, so 'class' is highlighted even if the class name doesn't match. -->
<context id="class-definition">
<match extended="true">
(class)
\s+
(\%{identifier})
</match>
<include>
<context sub-pattern="1" style-ref="keyword"/>
<context sub-pattern="2" style-ref="class-name"/>
</include>
</context>
<context id="decorator" style-ref="decorator">
<match>@\%{identifier-path}</match>
</context>
<context id="keywords" style-ref="keyword">
<keyword>and</keyword>
<keyword>assert</keyword>
<keyword>break</keyword>
<keyword>class</keyword>
<keyword>continue</keyword>
<keyword>def</keyword>
<keyword>del</keyword>
<keyword>elif</keyword>
<keyword>else</keyword>
<keyword>except</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>global</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>is</keyword>
<keyword>lambda</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
<keyword>pass</keyword>
<keyword>raise</keyword>
<keyword>return</keyword>
<keyword>try</keyword>
<keyword>while</keyword>
<keyword>with</keyword>
<keyword>yield</keyword>
</context>
<context id="2x-only-keywords" style-ref="keyword">
<keyword>exec</keyword>
<keyword>print</keyword>
</context>
<context id="builtin-constants" style-ref="builtin-constant">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>Ellipsis</keyword>
<keyword>None</keyword>
<keyword>NotImplemented</keyword>
</context>
<context id="builtin-objects" style-ref="builtin-object">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>ArithmeticError</keyword>
<keyword>AssertionError</keyword>
<keyword>AttributeError</keyword>
<keyword>EnvironmentError</keyword>
<keyword>EOFError</keyword>
<keyword>Exception</keyword>
<keyword>FloatingPointError</keyword>
<keyword>ImportError</keyword>
<keyword>IndentationError</keyword>
<keyword>IndexError</keyword>
<keyword>IOError</keyword>
<keyword>KeyboardInterrupt</keyword>
<keyword>KeyError</keyword>
<keyword>LookupError</keyword>
<keyword>MemoryError</keyword>
<keyword>NameError</keyword>
<keyword>NotImplementedError</keyword>
<keyword>OSError</keyword>
<keyword>OverflowError</keyword>
<keyword>ReferenceError</keyword>
<keyword>RuntimeError</keyword>
<keyword>StandardError</keyword>
<keyword>StopIteration</keyword>
<keyword>SyntaxError</keyword>
<keyword>SystemError</keyword>
<keyword>SystemExit</keyword>
<keyword>TabError</keyword>
<keyword>TypeError</keyword>
<keyword>UnboundLocalError</keyword>
<keyword>UnicodeDecodeError</keyword>
<keyword>UnicodeEncodeError</keyword>
<keyword>UnicodeError</keyword>
<keyword>UnicodeTranslateError</keyword>
<keyword>ValueError</keyword>
<keyword>WindowsError</keyword>
<keyword>ZeroDivisionError</keyword>
<keyword>Warning</keyword>
<keyword>UserWarning</keyword>
<keyword>DeprecationWarning</keyword>
<keyword>PendingDeprecationWarning</keyword>
<keyword>SyntaxWarning</keyword>
<keyword>OverflowWarning</keyword>
<keyword>RuntimeWarning</keyword>
<keyword>FutureWarning</keyword>
</context>
<context id="builtin-functions" style-ref="builtin-function">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>__import__</keyword>
<keyword>abs</keyword>
<keyword>all</keyword>
<keyword>any</keyword>
<keyword>bin</keyword>
<keyword>bool</keyword>
<keyword>callable</keyword>
<keyword>chr</keyword>
<keyword>classmethod</keyword>
<keyword>compile</keyword>
<keyword>complex</keyword>
<keyword>delattr</keyword>
<keyword>dict</keyword>
<keyword>dir</keyword>
<keyword>divmod</keyword>
<keyword>enumerate</keyword>
<keyword>eval</keyword>
<keyword>filter</keyword>
<keyword>float</keyword>
<keyword>format</keyword>
<keyword>frozenset</keyword>
<keyword>getattr</keyword>
<keyword>globals</keyword>
<keyword>hasattr</keyword>
<keyword>hash</keyword>
<keyword>hex</keyword>
<keyword>id</keyword>
<keyword>input</keyword>
<keyword>int</keyword>
<keyword>isinstance</keyword>
<keyword>issubclass</keyword>
<keyword>iter</keyword>
<keyword>len</keyword>
<keyword>list</keyword>
<keyword>locals</keyword>
<keyword>map</keyword>
<keyword>max</keyword>
<keyword>min</keyword>
<keyword>object</keyword>
<keyword>oct</keyword>
<keyword>open</keyword>
<keyword>ord</keyword>
<keyword>pow</keyword>
<keyword>property</keyword>
<keyword>range</keyword>
<keyword>repr</keyword>
<keyword>reversed</keyword>
<keyword>round</keyword>
<keyword>setattr</keyword>
<keyword>set</keyword>
<keyword>slice</keyword>
<keyword>sorted</keyword>
<keyword>staticmethod</keyword>
<keyword>str</keyword>
<keyword>sum</keyword>
<keyword>super</keyword>
<keyword>tuple</keyword>
<keyword>type</keyword>
<keyword>vars</keyword>
<keyword>zip</keyword>
</context>
<context id="2x-only-builtin-functions" style-ref="builtin-function">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>apply</keyword>
<keyword>basestring</keyword>
<keyword>buffer</keyword>
<keyword>cmp</keyword>
<keyword>coerce</keyword>
<keyword>execfile</keyword>
<keyword>file</keyword>
<keyword>intern</keyword>
<keyword>long</keyword>
<keyword>raw_input</keyword>
<keyword>reduce</keyword>
<keyword>reload</keyword>
<keyword>unichr</keyword>
<keyword>unicode</keyword>
<keyword>xrange</keyword>
</context>
<context id="python" class="no-spell-check">
<include>
<context ref="method-calls"/>
<context ref="def:shebang"/>
<context ref="def:shell-like-comment"/>
<context ref="multiline-double-quoted-string"/>
<context ref="multiline-single-quoted-string"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="multiline-double-quoted-raw-string"/>
<context ref="multiline-single-quoted-raw-string"/>
<context ref="double-quoted-raw-string"/>
<context ref="single-quoted-raw-string"/>
<context ref="string-conversion"/>
<context ref="special-variables"/>
<context ref="boolean"/>
<context ref="complex"/>
<context ref="float"/>
<context ref="decimal"/>
<context ref="octal"/>
<context ref="hex"/>
<context ref="module-handler-from"/>
<context ref="module-handler"/>
<context ref="function-definition"/>
<context ref="class-definition"/>
<context ref="decorator"/>
<context ref="keywords"/>
<context ref="2x-only-keywords"/>
<context ref="builtin-constants"/>
<context ref="builtin-objects"/>
<context ref="builtin-functions"/>
<context ref="2x-only-builtin-functions"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,385 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Stefano Palazzo <stefano-palazzo@ubuntu.com>
Copyright (C) 2012 Stefano Palazzo <stefano-palazzo@ubuntu.com>
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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 <http://www.gnu.org/licenses/>.
-->
<language id="python3" name="Python" version="2.0" _section="Script">
<metadata>
<property name="mimetypes">text/x-python;application/x-python;text/x-python3</property>
<property name="globs">*.py;*.py3;*.pyi</property>
<property name="line-comment-start">#</property>
<property name="suggested-suffix">.py</property>
</metadata>
<styles>
<style id="module-handler" name="Module Handler" map-to="python:module-handler"/>
<style id="keyword" name="Keyword" map-to="python:keyword"/>
<style id="multiline-string" name="Multiline string" map-to="python:multiline-string"/>
<style id="string" name="String" map-to="python:string"/>
<style id="escaped-char" name="Escaped Character" map-to="python:escaped-char"/>
<style id="format" name="Format" map-to="python:format"/>
<style id="string-conversion" name="String Conversion" map-to="python:string-conversion"/>
<style id="special-variable" name="Special Variable" map-to="python:special-variable"/>
<style id="boolean" name="Boolean" map-to="python:boolean"/>
<style id="floating-point" name="Floating point number" map-to="python:floating-point"/>
<style id="decimal" name="Decimal number" map-to="python:decimal"/>
<style id="base-n-integer" name="Base-N number" map-to="python:base-n-integer"/>
<style id="complex" name="Complex number" map-to="python:complex"/>
<style id="builtin-constant" name="Builtin Constant" map-to="python:builtin-constant"/>
<style id="builtin-object" name="Builtin Object" map-to="python:builtin-object"/>
<style id="builtin-function" name="Builtin Function" map-to="python:builtin-function"/>
<style id="function-name" name="Function Name" map-to="python:function-name"/>
<style id="class-name" name="Class Name" map-to="python:class-name"/>
<style id="decorator" name="Decorator" map-to="python:decorator"/>
<style id="f-string-curly-braces" name="f-string curly braces" map-to="def:special-char"/>
<style id="method-calls" name="Method Calls" map-to="def:method-calls"/>
</styles>
<definitions>
<context id="method-calls" style-ref="method-calls">
<match extended="true">
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
</match>
</context>
<!-- https://docs.python.org/3/reference/lexical_analysis.html#identifiers
Underscore (U+005F LOW LINE) is a member of \p{Pc}, and so included in def:unicode-xid-continue
-->
<define-regex id="identifier" extended="true">
(?&gt; (?: _ | \%{def:unicode-xid-start} ) \%{def:unicode-xid-continue}* )
</define-regex>
<define-regex id="number">[1-9][0-9]*</define-regex>
<define-regex id="identifier-path" extended="true">
(\%{identifier}\.)*\%{identifier}
</define-regex>
<define-regex id="relative-path" extended="true">
(\.*\%{identifier-path}|\.+)
</define-regex>
<define-regex id="is-method-call" extended="true">
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
</define-regex>
<!-- http://docs.python.org/lib/typesseq-strings.html -->
<context id="format" style-ref="format" extend-parent="false">
<match extended="true">
% # leading % sign
\(\%{identifier}\)? # mapping key
[#0\-\ \+]* # conversion flags
(\-?\%{number}|\*)? # minimum field width
(\.(\-?\%{number}|\*))? # precision
(hlL)? # length modifier
[diouxXeEfFgGcrs%] # conversion type
</match>
</context>
<context id="curly-braces" extend-parent="true">
<start>\{</start>
<end>\}</end>
<include>
<context ref="python3"/>
<context ref="curly-braces"/>
</include>
</context>
<context id="f-string-curly-braces" extend-parent="false" class-disabled="string">
<start>(\{)</start>
<end>(\})</end>
<include>
<context ref="python3"/>
<context ref="curly-braces"/>
<context sub-pattern="1" where="start" style-ref="f-string-curly-braces"/>
<context sub-pattern="1" where="end" style-ref="f-string-curly-braces"/>
</include>
</context>
<context id="escaped-curly-brace" style-ref="escaped-char" extend-parent="true">
<match>\{\{</match>
</context>
<define-regex id="string-prefix">(b|B)?</define-regex>
<define-regex id="raw-string-prefix">(r|R|rb|RB|rB|Rb|br|BR|bR|Br)</define-regex>
<define-regex id="f-string-prefix">(f|F)</define-regex>
<context id="multiline-double-quoted-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>\%{string-prefix}"""</start>
<end>"""</end>
<include>
<context ref="format"/>
<context ref="python:escaped-char"/>
</include>
</context>
<context id="multiline-single-quoted-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>\%{string-prefix}'''</start>
<end>'''</end>
<include>
<context ref="format"/>
<context ref="python:escaped-char"/>
</include>
</context>
<context id="double-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>\%{string-prefix}"</start>
<end>"</end>
<include>
<context ref="format"/>
<context ref="python:escaped-char"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>\%{string-prefix}'</start>
<end>'</end>
<include>
<context ref="format"/>
<context ref="python:escaped-char"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="multiline-double-quoted-f-string" class="string" class-disabled="no-spell-check">
<start>(\%{f-string-prefix}""")</start>
<end>(""")</end>
<include>
<context ref="escaped-curly-brace"/>
<context ref="f-string-curly-braces"/>
<context ref="python:escaped-char"/>
<context ref="def:line-continue"/>
<context style-ref="multiline-string" extend-parent="false" class="string">
<match>.</match>
</context>
<context sub-pattern="1" where="start" style-ref="string"/>
<context sub-pattern="1" where="end" style-ref="string"/>
</include>
</context>
<context id="multiline-single-quoted-f-string" class="string" class-disabled="no-spell-check">
<start>(\%{f-string-prefix}''')</start>
<end>(''')</end>
<include>
<context ref="escaped-curly-brace"/>
<context ref="f-string-curly-braces"/>
<context ref="python:escaped-char"/>
<context ref="def:line-continue"/>
<context style-ref="multiline-string" extend-parent="false" class="string">
<match>.</match>
</context>
<context sub-pattern="1" where="start" style-ref="string"/>
<context sub-pattern="1" where="end" style-ref="string"/>
</include>
</context>
<context id="double-quoted-f-string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>(\%{f-string-prefix}")</start>
<end>(")</end>
<include>
<context ref="escaped-curly-brace"/>
<context ref="f-string-curly-braces"/>
<context ref="python:escaped-char"/>
<context ref="def:line-continue"/>
<context style-ref="string" extend-parent="false" class="string">
<match>.</match>
</context>
<context sub-pattern="1" where="start" style-ref="string"/>
<context sub-pattern="1" where="end" style-ref="string"/>
</include>
</context>
<context id="single-quoted-f-string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>(\%{f-string-prefix}')</start>
<end>(')</end>
<include>
<context ref="escaped-curly-brace"/>
<context ref="f-string-curly-braces"/>
<context ref="python:escaped-char"/>
<context ref="def:line-continue"/>
<context style-ref="string" extend-parent="false" class="string">
<match>.</match>
</context>
<context sub-pattern="1" where="start" style-ref="string"/>
<context sub-pattern="1" where="end" style-ref="string"/>
</include>
</context>
<context id="multiline-double-quoted-raw-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>\%{raw-string-prefix}"""</start>
<end>"""</end>
<include>
<context ref="format"/>
</include>
</context>
<context id="multiline-single-quoted-raw-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>\%{raw-string-prefix}'''</start>
<end>'''</end>
<include>
<context ref="format"/>
</include>
</context>
<context id="double-quoted-raw-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>\%{raw-string-prefix}"</start>
<end>"</end>
<include>
<context ref="format"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-raw-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>\%{raw-string-prefix}'</start>
<end>'</end>
<include>
<context ref="format"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="module-handler-from">
<match extended="true">
(from)
\s+
(\%{relative-path})
</match>
<include>
<context sub-pattern="1" style-ref="module-handler"/>
<context sub-pattern="2" style-ref="class-name"/>
</include>
</context>
<!-- 'def' is also present in the 'keyword' context, but has a lower
priority, so 'def' is highlighted even if the function name doesn't match. -->
<context id="function-definition">
<match extended="true">
(def)
\s+
(\%{identifier})
</match>
<include>
<context sub-pattern="1" style-ref="keyword"/>
<context sub-pattern="2" style-ref="function-name"/>
</include>
</context>
<!-- 'class' is also present in the 'keyword' context, but has a lower
priority, so 'class' is highlighted even if the class name doesn't match. -->
<context id="class-definition">
<match extended="true">
(class)
\s+
(\%{identifier})
</match>
<include>
<context sub-pattern="1" style-ref="keyword"/>
<context sub-pattern="2" style-ref="class-name"/>
</include>
</context>
<context id="decorator" style-ref="decorator">
<match>@\%{identifier-path}</match>
</context>
<context id="python3" class="no-spell-check">
<include>
<context ref="method-calls"/>
<context ref="def:shebang"/>
<context ref="def:shell-like-comment"/>
<context ref="multiline-double-quoted-string"/>
<context ref="multiline-single-quoted-string"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="multiline-double-quoted-f-string"/>
<context ref="multiline-single-quoted-f-string"/>
<context ref="single-quoted-f-string"/>
<context ref="double-quoted-f-string"/>
<context ref="multiline-double-quoted-raw-string"/>
<context ref="multiline-single-quoted-raw-string"/>
<context ref="double-quoted-raw-string"/>
<context ref="single-quoted-raw-string"/>
<context ref="python:special-variables"/>
<context ref="python:boolean"/>
<context ref="python:complex"/>
<context ref="python:float"/>
<context id="decimal" style-ref="decimal">
<match>(?&lt;![\w\.])([1-9](_?[0-9])*|0)(?![\w\.])</match>
</context>
<context id="binary" style-ref="base-n-integer">
<match>(?&lt;![\w\.])0[bB](_?[0-1])+(?![\w\.])</match>
</context>
<context id="octal" style-ref="base-n-integer">
<match>(?&lt;![\w\.])0[oO](_?[0-7])+(?![\w\.])</match>
</context>
<context id="hex" style-ref="base-n-integer">
<match>(?&lt;![\w\.])0[xX](_?[0-9A-Fa-f])+(?![\w\.])</match>
</context>
<context ref="module-handler-from"/>
<context ref="python:module-handler"/>
<context ref="function-definition"/>
<context ref="class-definition"/>
<context ref="decorator"/>
<context ref="python:keywords"/>
<context id="3x-only-keywords" style-ref="keyword">
<keyword>async</keyword>
<keyword>await</keyword>
<keyword>nonlocal</keyword>
<keyword>match</keyword>
<keyword>case</keyword>
</context>
<context ref="python:builtin-constants"/>
<context ref="python:builtin-objects"/>
<context id="3x-only-builtin-objects" style-ref="builtin-object">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>ResourceWarning</keyword>
</context>
<context ref="python:builtin-functions"/>
<context id="3x-only-builtin-functions" style-ref="builtin-function">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>ascii</keyword>
<keyword>bin</keyword>
<keyword>breakpoint</keyword>
<keyword>bytearray</keyword>
<keyword>bytes</keyword>
<keyword>exec</keyword>
<keyword>format</keyword>
<keyword>memoryview</keyword>
<keyword>next</keyword>
<keyword>print</keyword>
</context>
</include>
</context>
</definitions>
</language>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,120 @@
<style-scheme name="Peacocks In Space" id="peacocks-in-space" version="1.0">
<author> ITDominator</author>
<description>An attempted clone of Dayle Rees' Peacocks In Space theme.</description>
<style name="current-line" background="#2b303b" />
<style name="current-line-number" background="#f7b83d" />
<style name="draw-spaces" foreground="#babdb6" />
<style name="background-pattern" background="#6e7a94" />
<style name="bracket-match" foreground="#white" background="#gray" />
<style name="bracket-mismatch" foreground="#white" background="#FF5D38" />
<style name="right-margin" foreground="#dee3ec" background="#454a54" />
<style name="search-match" background="#E6DB74" />
<style name="def:comment" foreground="#8998b9" />
<style name="def:shebang" foreground="#00a8c6" bold="true" />
<style name="def:doc-comment-element" italic="true" />
<style name="def:constant" foreground="#E6DB74" />
<style name="def:special-char" foreground="#26A6A6" />
<style name="def:identifier" foreground="#FF5D38" />
<style name="def:statement" foreground="#26A6A6" bold="true" />
<style name="def:type" foreground="#E6DB74" bold="true" />
<style name="def:preprocessor" foreground="#8998b9" />
<style name="def:error" background="#FF5D38" bold="true" />
<style name="def:warning" background="#f7b83d" />
<style name="def:note" foreground="#00a8c6" background="#yellow" bold="true" />
<style name="def:underlined" italic="true" underline="true" />
<style name="diff:added-line" foreground="#008B8B" />
<style name="diff:removed-line" foreground="#6A5ACD" />
<style name="diff:changed-line" foreground="#8998b9" />
<style name="diff:special-case" foreground="#E6DB74" />
<style name="diff:location" foreground="#26A6A6" bold="true" />
<style name="diff:diff-file" foreground="#E6DB74" bold="true" />
<style name="xml:tags" foreground="#00a8c6" />
<style name="xml:attribute-name" foreground="#ff5d38" />
<style name="xml:namespace" foreground="#E6DB74" bold="true" />
<style name="js:object" foreground="#2E8B57" bold="true" />
<style name="js:constructors" foreground="#008B8B" />
<style name="latex:display-math" foreground="#6A5ACD" />
<style name="latex:command" foreground="#2E8B57" bold="true" />
<style name="latex:include" foreground="#8998b9" />
<style name="sh:variable" foreground="#6A5ACD" />
<style name="Others" foreground="#2E8B57" bold="true" />
<style name="Others 2" foreground="#008B8B" />
<style name="Others 3" foreground="#6A5ACD" />
<style name="python:builtin-object" foreground="#00a8c6" />
<style name="python:class-name" foreground="#ff5d38" />
<style name="python:function-name" foreground="#e6db74" />
<style name="python:keyword" foreground="#00a8c6" />
<style name="python:special-variable" />
<style name="python:boolean" foreground="#ff5d38" />
<style name="python:complex" foreground="#ff5d38" />
<style name="python:format" foreground="#bf3f3f" />
<style name="python:builtin-constant" foreground="#ff5d38" />
<style name="python:builtin-function" foreground="#e6db74" />
<style name="python:module-handler" foreground="#00a8c6" />
<style name="python:escaped-char" foreground="#ff5d38" />
<style name="reserved" foreground="#ff5d38" />
<style name="operator" foreground="#00a8c6" />
<style name="keyword" foreground="#00a8c6" />
<style name="line-numbers" foreground="#ffffff" />
<style name="python3:function-name" foreground="#e6db74" />
<style name="text" />
<style name="emphasis" />
<style name="function" foreground="#e6db74" />
<style name="selection-unfocused" background="#ff7800" />
<style name="html:attrib-name" foreground="#ff5d38" />
<style name="html:dtd" />
<style name="html:attrib-value" foreground="#e6db74" />
<style name="xml:element-name" foreground="#00a8c6" />
<style name="xml:attribute-value" foreground="#e6db74" />
<style name="html:comment" foreground="#8998b9" />
<style name="xml:comment" foreground="#8998b9" />
<style name="python3:builtin-function" foreground="#ff5d38" />
<style name="python3:builtin-object" foreground="#ff5d38" />
<style name="python3:class-name" foreground="#ff5d38" />
<style name="python3:builtin-constant" foreground="#ff5d38" />
<style name="python3:complex" foreground="#e6db74" />
<style name="python3:escaped-char" foreground="#ff5d38" />
<style name="python3:decimal" />
<style name="python3:format" />
<style name="python3:base-n-integer" />
<style name="php:comment" foreground="#8998b9" />
<style name="php:string" foreground="#e6db74" />
<style name="json:keyname" foreground="#ff5d38" />
<style name="json:string" foreground="#e6db74" />
<style name="json:null-value" foreground="#ff5d38" />
<style name="json:float" foreground="#e6db74" />
<style name="json:boolean" foreground="#ff5d38" />
<style name="java:reserved" foreground="#ff5d38" />
<style name="js:function-expression" />
<style name="js:identifier" />
<style name="js:object-literal" />
<style name="js:expression-statement" foreground="#e6db74" />
<style name="js:expression" />
<style name="js:label-statement" />
<style name="js:variable-declaration" />
<style name="js:rest-syntax" />
<style name="js:regex-group" />
<style name="js:keyword" foreground="#00a8c6" />
<style name="js:grouping-operator" foreground="#ed333b" />
<style name="js:grouping" foreground="#2ec27e" />
<style name="js:escape" foreground="#ff5d38" />
<style name="js:directive" />
<style name="js:class-expression" />
<style name="js:built-in-property" />
<style name="js:built-in-object" />
<style name="js:built-in-method" />
<style name="js:built-in-function" />
<style name="js:built-in-constructor" />
<style name="js:block-statement" />
<style name="js:ternary-operator" foreground="#00a8c6" />
<style name="js:throw-statement" foreground="#00a8c6" />
<style name="js:try-catch-statement" foreground="#00a8c6" />
<style name="js:spread-syntax" />
<style name="js:switch-statement" foreground="#00a8c6" />
<style name="python3:keyword" foreground="#00a8c6" />
<style name="python3:module-handler" foreground="#00a8c6" />
<style name="python3:method-calls" foreground="#e6db74" />
<style name="java:keyword" foreground="#8998b9" />
<style name="method-calls" foreground="#e6db74" />
</style-scheme>

View File

@ -0,0 +1,117 @@
<style-scheme name="Penguins In Space" id="penguins-in-space" version="1.0">
<author> ITDominator</author>
<description>An homage to Dayle Rees' Peacocks In Space theme.</description>
<style name="current-line" background="#2b303b" />
<style name="current-line-number" background="#f7b83d" />
<style name="draw-spaces" foreground="#babdb6" />
<style name="background-pattern" background="#6e7a94" />
<style name="bracket-match" foreground="#white" background="#gray" />
<style name="bracket-mismatch" foreground="#white" background="#FF5D38" />
<style name="right-margin" foreground="#dee3ec" background="#454a54" />
<style name="search-match" background="#E6DB74" />
<style name="def:comment" foreground="#454a54" />
<style name="def:shebang" foreground="#00a8c6" bold="true" />
<style name="def:doc-comment-element" italic="true" />
<style name="def:constant" foreground="#E6DB74" />
<style name="def:special-char" foreground="#26A6A6" />
<style name="def:identifier" foreground="#FF5D38" />
<style name="def:statement" foreground="#26A6A6" bold="true" />
<style name="def:type" foreground="#E6DB74" bold="true" />
<style name="def:preprocessor" foreground="#8998b9" />
<style name="def:error" background="#FF5D38" bold="true" />
<style name="def:warning" background="#f7b83d" />
<style name="def:note" foreground="#00a8c6" background="#yellow" bold="true" />
<style name="def:underlined" italic="true" underline="true" />
<style name="diff:added-line" foreground="#008B8B" />
<style name="diff:removed-line" foreground="#6A5ACD" />
<style name="diff:changed-line" foreground="#8998b9" />
<style name="diff:special-case" foreground="#E6DB74" />
<style name="diff:location" foreground="#26A6A6" bold="true" />
<style name="diff:diff-file" foreground="#E6DB74" bold="true" />
<style name="xml:tags" foreground="#00a8c6" />
<style name="xml:attribute-name" foreground="#ff5d38" />
<style name="xml:namespace" foreground="#E6DB74" bold="true" />
<style name="js:object" foreground="#2E8B57" bold="true" />
<style name="js:constructors" foreground="#008B8B" />
<style name="latex:display-math" foreground="#6A5ACD" />
<style name="latex:command" foreground="#2E8B57" bold="true" />
<style name="latex:include" foreground="#8998b9" />
<style name="sh:variable" foreground="#6A5ACD" />
<style name="Others" foreground="#2E8B57" bold="true" />
<style name="Others 2" foreground="#008B8B" />
<style name="Others 3" foreground="#6A5ACD" />
<style name="python:builtin-object" foreground="#00a8c6" />
<style name="python:class-name" foreground="#ff5d38" />
<style name="python:function-name" foreground="#e6db74" />
<style name="python:keyword" foreground="#00a8c6" />
<style name="python:special-variable" foreground="#26a269" />
<style name="python:boolean" foreground="#ff5d38" />
<style name="python:complex" foreground="#ff5d38" />
<style name="python:format" foreground="#bf3f3f" />
<style name="python:builtin-constant" foreground="#ff5d38" />
<style name="python:builtin-function" foreground="#e6db74" />
<style name="python:module-handler" foreground="#00a8c6" />
<style name="python:escaped-char" foreground="#ff5d38" />
<style name="reserved" foreground="#ff5d38" />
<style name="operator" foreground="#00a8c6" />
<style name="keyword" foreground="#00a8c6" />
<style name="line-numbers" foreground="#ffffff" />
<style name="python3:function-name" foreground="#e6db74" />
<style name="text" />
<style name="emphasis" />
<style name="function" foreground="#e6db74" />
<style name="selection-unfocused" background="#ff7800" />
<style name="html:attrib-name" foreground="#ff5d38" />
<style name="html:dtd" />
<style name="html:attrib-value" foreground="#e6db74" />
<style name="xml:element-name" foreground="#00a8c6" />
<style name="xml:attribute-value" foreground="#e6db74" />
<style name="html:comment" foreground="#8998b9" />
<style name="xml:comment" foreground="#8998b9" />
<style name="python3:builtin-function" foreground="#ff5d38" />
<style name="python3:builtin-object" foreground="#ff5d38" />
<style name="python3:class-name" foreground="#ff5d38" />
<style name="python3:builtin-constant" foreground="#ff5d38" />
<style name="python3:complex" foreground="#e6db74" />
<style name="python3:escaped-char" foreground="#ff5d38" />
<style name="python3:decimal" />
<style name="python3:format" />
<style name="python3:base-n-integer" />
<style name="php:comment" foreground="#8998b9" />
<style name="php:string" foreground="#e6db74" />
<style name="json:keyname" foreground="#ff5d38" />
<style name="json:string" foreground="#e6db74" />
<style name="json:null-value" foreground="#e01b24" />
<style name="json:float" foreground="#00a8c6" />
<style name="json:boolean" foreground="#33d17a" />
<style name="java:reserved" foreground="#ff5d38" />
<style name="js:function-expression" />
<style name="js:identifier" />
<style name="js:object-literal" />
<style name="js:expression-statement" foreground="#e6db74" />
<style name="js:expression" />
<style name="js:label-statement" />
<style name="js:variable-declaration" />
<style name="js:rest-syntax" />
<style name="js:regex-group" />
<style name="js:keyword" foreground="#00a8c6" />
<style name="js:grouping-operator" foreground="#ed333b" />
<style name="js:grouping" foreground="#2ec27e" />
<style name="js:escape" foreground="#ff5d38" />
<style name="js:directive" />
<style name="js:class-expression" />
<style name="js:built-in-property" />
<style name="js:built-in-object" />
<style name="js:built-in-method" />
<style name="js:built-in-function" />
<style name="js:built-in-constructor" />
<style name="js:block-statement" />
<style name="js:ternary-operator" foreground="#00a8c6" />
<style name="js:throw-statement" foreground="#00a8c6" />
<style name="js:try-catch-statement" foreground="#00a8c6" />
<style name="js:spread-syntax" />
<style name="js:switch-statement" foreground="#00a8c6" />
<style name="python:multiline-string" foreground="#454a54" />
<style name="python3:method-calls" foreground="#e6db74" />
</style-scheme>

View File

@ -8,11 +8,6 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="stock">gtk-missing-image</property> <property name="stock">gtk-missing-image</property>
</object> </object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-missing-image</property>
</object>
<object class="GtkListStore" id="languages_list"> <object class="GtkListStore" id="languages_list">
<columns> <columns>
<!-- column-name Languages --> <!-- column-name Languages -->
@ -33,6 +28,8 @@
<object class="GtkBox" id="menu_box"> <object class="GtkBox" id="menu_box">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<child> <child>
<object class="GtkMenuBar"> <object class="GtkMenuBar">
<property name="visible">True</property> <property name="visible">True</property>
@ -97,15 +94,6 @@
<signal name="activate" handler="_interactive_debug" swapped="no"/> <signal name="activate" handler="_interactive_debug" swapped="no"/>
</object> </object>
</child> </child>
<child>
<object class="GtkImageMenuItem">
<property name="label">Transparancy Controls</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="image">image2</property>
<property name="use-stock">False</property>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>

View File

@ -1,130 +1,8 @@
.main-window > box {
background: rgba(39, 43, 52, 1.0);
}
.base-container { .base-container {
margin: 10px; margin: 10px;
} }
/* * selection {
background-color: rgba(116, 0, 0, 0.65);
color: rgba(255, 255, 255, 0.5);
} */
/* Rubberband coloring */
/* .rubberband,
rubberband,
flowbox rubberband,
treeview.view rubberband,
.content-view rubberband,
.content-view .rubberband,
XfdesktopIconView.view .rubberband {
border: 1px solid #6c6c6c;
background-color: rgba(21, 158, 167, 0.57);
}
XfdesktopIconView.view:active {
background-color: rgba(172, 102, 21, 1);
} */
.mw_transparency_1 { background: rgba(39, 43, 52, 0.1); }
.mw_transparency_2 { background: rgba(39, 43, 52, 0.2); }
.mw_transparency_3 { background: rgba(39, 43, 52, 0.3); }
.mw_transparency_4 { background: rgba(39, 43, 52, 0.4); }
.mw_transparency_5 { background: rgba(39, 43, 52, 0.5); }
.mw_transparency_6 { background: rgba(39, 43, 52, 0.6); }
.mw_transparency_7 { background: rgba(39, 43, 52, 0.7); }
.mw_transparency_8 { background: rgba(39, 43, 52, 0.8); }
.mw_transparency_9 { background: rgba(39, 43, 52, 0.9); }
.mw_transparency_10 { background: rgba(39, 43, 52, 0.10); }
.mw_transparency_11 { background: rgba(39, 43, 52, 0.11); }
.mw_transparency_12 { background: rgba(39, 43, 52, 0.12); }
.mw_transparency_13 { background: rgba(39, 43, 52, 0.13); }
.mw_transparency_14 { background: rgba(39, 43, 52, 0.14); }
.mw_transparency_15 { background: rgba(39, 43, 52, 0.15); }
.mw_transparency_16 { background: rgba(39, 43, 52, 0.16); }
.mw_transparency_17 { background: rgba(39, 43, 52, 0.17); }
.mw_transparency_18 { background: rgba(39, 43, 52, 0.18); }
.mw_transparency_19 { background: rgba(39, 43, 52, 0.19); }
.mw_transparency_20 { background: rgba(39, 43, 52, 0.20); }
.mw_transparency_21 { background: rgba(39, 43, 52, 0.21); }
.mw_transparency_22 { background: rgba(39, 43, 52, 0.22); }
.mw_transparency_23 { background: rgba(39, 43, 52, 0.23); }
.mw_transparency_24 { background: rgba(39, 43, 52, 0.24); }
.mw_transparency_25 { background: rgba(39, 43, 52, 0.25); }
.mw_transparency_26 { background: rgba(39, 43, 52, 0.26); }
.mw_transparency_27 { background: rgba(39, 43, 52, 0.27); }
.mw_transparency_28 { background: rgba(39, 43, 52, 0.28); }
.mw_transparency_29 { background: rgba(39, 43, 52, 0.29); }
.mw_transparency_30 { background: rgba(39, 43, 52, 0.30); }
.mw_transparency_31 { background: rgba(39, 43, 52, 0.31); }
.mw_transparency_32 { background: rgba(39, 43, 52, 0.32); }
.mw_transparency_33 { background: rgba(39, 43, 52, 0.33); }
.mw_transparency_34 { background: rgba(39, 43, 52, 0.34); }
.mw_transparency_35 { background: rgba(39, 43, 52, 0.35); }
.mw_transparency_36 { background: rgba(39, 43, 52, 0.36); }
.mw_transparency_37 { background: rgba(39, 43, 52, 0.37); }
.mw_transparency_38 { background: rgba(39, 43, 52, 0.38); }
.mw_transparency_39 { background: rgba(39, 43, 52, 0.39); }
.mw_transparency_40 { background: rgba(39, 43, 52, 0.40); }
.mw_transparency_41 { background: rgba(39, 43, 52, 0.41); }
.mw_transparency_42 { background: rgba(39, 43, 52, 0.42); }
.mw_transparency_43 { background: rgba(39, 43, 52, 0.43); }
.mw_transparency_44 { background: rgba(39, 43, 52, 0.44); }
.mw_transparency_45 { background: rgba(39, 43, 52, 0.45); }
.mw_transparency_46 { background: rgba(39, 43, 52, 0.46); }
.mw_transparency_47 { background: rgba(39, 43, 52, 0.47); }
.mw_transparency_48 { background: rgba(39, 43, 52, 0.48); }
.mw_transparency_49 { background: rgba(39, 43, 52, 0.49); }
.mw_transparency_50 { background: rgba(39, 43, 52, 0.50); }
.mw_transparency_51 { background: rgba(39, 43, 52, 0.51); }
.mw_transparency_52 { background: rgba(39, 43, 52, 0.52); }
.mw_transparency_53 { background: rgba(39, 43, 52, 0.53); }
.mw_transparency_54 { background: rgba(39, 43, 52, 0.54); }
.mw_transparency_55 { background: rgba(39, 43, 52, 0.55); }
.mw_transparency_56 { background: rgba(39, 43, 52, 0.56); }
.mw_transparency_57 { background: rgba(39, 43, 52, 0.57); }
.mw_transparency_58 { background: rgba(39, 43, 52, 0.58); }
.mw_transparency_59 { background: rgba(39, 43, 52, 0.59); }
.mw_transparency_60 { background: rgba(39, 43, 52, 0.60); }
.mw_transparency_61 { background: rgba(39, 43, 52, 0.61); }
.mw_transparency_62 { background: rgba(39, 43, 52, 0.62); }
.mw_transparency_63 { background: rgba(39, 43, 52, 0.63); }
.mw_transparency_64 { background: rgba(39, 43, 52, 0.64); }
.mw_transparency_65 { background: rgba(39, 43, 52, 0.65); }
.mw_transparency_66 { background: rgba(39, 43, 52, 0.66); }
.mw_transparency_67 { background: rgba(39, 43, 52, 0.67); }
.mw_transparency_68 { background: rgba(39, 43, 52, 0.68); }
.mw_transparency_69 { background: rgba(39, 43, 52, 0.69); }
.mw_transparency_70 { background: rgba(39, 43, 52, 0.70); }
.mw_transparency_71 { background: rgba(39, 43, 52, 0.71); }
.mw_transparency_72 { background: rgba(39, 43, 52, 0.72); }
.mw_transparency_73 { background: rgba(39, 43, 52, 0.73); }
.mw_transparency_74 { background: rgba(39, 43, 52, 0.74); }
.mw_transparency_75 { background: rgba(39, 43, 52, 0.75); }
.mw_transparency_76 { background: rgba(39, 43, 52, 0.76); }
.mw_transparency_77 { background: rgba(39, 43, 52, 0.77); }
.mw_transparency_78 { background: rgba(39, 43, 52, 0.78); }
.mw_transparency_79 { background: rgba(39, 43, 52, 0.79); }
.mw_transparency_80 { background: rgba(39, 43, 52, 0.80); }
.mw_transparency_81 { background: rgba(39, 43, 52, 0.81); }
.mw_transparency_82 { background: rgba(39, 43, 52, 0.82); }
.mw_transparency_83 { background: rgba(39, 43, 52, 0.83); }
.mw_transparency_84 { background: rgba(39, 43, 52, 0.84); }
.mw_transparency_85 { background: rgba(39, 43, 52, 0.85); }
.mw_transparency_86 { background: rgba(39, 43, 52, 0.86); }
.mw_transparency_87 { background: rgba(39, 43, 52, 0.87); }
.mw_transparency_88 { background: rgba(39, 43, 52, 0.88); }
.mw_transparency_89 { background: rgba(39, 43, 52, 0.89); }
.mw_transparency_90 { background: rgba(39, 43, 52, 0.90); }
.mw_transparency_91 { background: rgba(39, 43, 52, 0.91); }
.mw_transparency_92 { background: rgba(39, 43, 52, 0.92); }
.mw_transparency_93 { background: rgba(39, 43, 52, 0.93); }
.mw_transparency_94 { background: rgba(39, 43, 52, 0.94); }
.mw_transparency_95 { background: rgba(39, 43, 52, 0.95); }
.mw_transparency_96 { background: rgba(39, 43, 52, 0.96); }
.mw_transparency_97 { background: rgba(39, 43, 52, 0.97); }
.mw_transparency_98 { background: rgba(39, 43, 52, 0.98); }
.mw_transparency_99 { background: rgba(39, 43, 52, 0.99); }