forked from Mirrors/helix
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,140 @@
|
||||
# Icons
|
||||
|
||||
## Requirements
|
||||
|
||||
File-type and symbol-kind icons require a patched font such as [NerdFonts](https://www.nerdfonts.com/) to be installed and configured in your terminal emulator. These types of fonts are called *patched* fonts because they define arbitrary symbols for a range of Unicode values, which may vary from one font to another. Therefore, you need to use an icon flavor adapted to your configured terminal font, otherwise you may end up with undefined characters and mismatched icons.
|
||||
|
||||
To enable file-type and symbol-kind icons within the editor, see the `[editor.icons]` section of the [configuration file](./configuration.md).
|
||||
|
||||
To use an icon flavor add `icons = "<name>"` to your [`config.toml`](./configuration.md) at the very top of the file before the first section or select it during runtime using `:icons <name>`.
|
||||
|
||||
## Creating an icon flavor
|
||||
|
||||
Create a file with the name of your icon flavor as file name (i.e `myicons.toml`) and place it in your `icons` directory (i.e `~/.config/helix/icons`). The directory might have to be created beforehand.
|
||||
|
||||
The name "default" is reserved for the builtin icons and cannot be overridden by user defined icons.
|
||||
|
||||
The name of the icon flavor must be set using the `name` key.
|
||||
|
||||
The default icons.toml can be found [here](https://github.com/helix-editor/helix/blob/master/icons.toml), and user submitted icon flavors [here](https://github.com/helix-editor/helix/blob/master/runtime/icons).
|
||||
|
||||
Icons flavors have five sections:
|
||||
|
||||
- Diagnostics
|
||||
- Breakpoints
|
||||
- Diff
|
||||
- Symbol kinds
|
||||
- Mime types
|
||||
|
||||
Each line in these sections is specified as below:
|
||||
|
||||
```toml
|
||||
key = { icon = "…", color = "#ff0000" }
|
||||
```
|
||||
|
||||
where `key` represents what you want to style, `icon` specifies the character to show as the icon, and `color` specifies the foreground color of the icon. `color` can be omitted to defer to the defaults.
|
||||
|
||||
### Diagnostic icons
|
||||
|
||||
The `[diagnostic]` section defines four **required** diagnostic icons:
|
||||
|
||||
- `error`
|
||||
- `warning`
|
||||
- `info`
|
||||
- `hint`
|
||||
|
||||
These icons appear in the gutter, in the diagnostic pickers as well as in the status line diagnostic component.
|
||||
By default, they have the foreground color defined in the current theme's corresponding keys.
|
||||
|
||||
> An icon flavor TOML file must define all of these icons.
|
||||
|
||||
### Diff icons
|
||||
|
||||
The `[diff]` section defines three **required** diffing icons:
|
||||
|
||||
- `added`
|
||||
- `deleted`
|
||||
- `modified`
|
||||
|
||||
These icons appear in the gutter.
|
||||
By default, they have the foreground color defined in the current theme's corresponding keys.
|
||||
|
||||
> An icon flavor TOML file must define all of these icons.
|
||||
|
||||
### Breakpoint icons
|
||||
|
||||
The `[breakpoint]` section defines two **required** breakpoint icons:
|
||||
|
||||
- `verified`
|
||||
- `unverified`
|
||||
|
||||
These icons appear in the gutter while using the Debug Adapter Protocol (DAP). Their color depends on the breakpoint's condition and log message, it cannot be overridden by the `color` key.
|
||||
|
||||
> An icon flavor TOML file must define all of these icons.
|
||||
|
||||
### Symbol kinds icons
|
||||
|
||||
The `[symbol-kind]` section defines **optional** icons for the following required LSP-defined symbol kinds:
|
||||
|
||||
- `file` (this icon is also used on files for which the mime type has not been defined in the next section, as a "generic file" icon)
|
||||
- `module`
|
||||
- `namespace`
|
||||
- `package`
|
||||
- `class`
|
||||
- `method`
|
||||
- `property`
|
||||
- `field`
|
||||
- `constructor`
|
||||
- `enumeration`
|
||||
- `interface`
|
||||
- `variable`
|
||||
- `function`
|
||||
- `constant`
|
||||
- `string`
|
||||
- `number`
|
||||
- `boolean`
|
||||
- `array`
|
||||
- `object`
|
||||
- `key`
|
||||
- `null`
|
||||
- `enum-member`
|
||||
- `structure`
|
||||
- `event`
|
||||
- `operator`
|
||||
- `type-parameter`
|
||||
|
||||
By default, these icons have the same style as the loaded theme's `keyword` key. Their style can be customized using the `symbolkind` key in the theme configuration file, or it can individually be overridden by their `color` key.
|
||||
|
||||
> An icon flavor TOML file must define either none or all of these icons.
|
||||
|
||||
### Mime types icons
|
||||
|
||||
The `[mime-type]` section defines **optional** icons for mime types or filename, such as:
|
||||
|
||||
```toml
|
||||
[mime-type]
|
||||
".bashrc" = { icon = "…", color = "#…" }
|
||||
"LICENSE" = { icon = "…", color = "#…" }
|
||||
"rs" = { icon = "…", color = "#…" }
|
||||
```
|
||||
|
||||
These icons appear in the file picker, in the statusline `file-type-icon` component, and in the bufferline (when enabled).
|
||||
|
||||
> An icon flavor TOML file can define none, some or all of these icons.
|
||||
|
||||
### Inheritance
|
||||
|
||||
Extend upon other icon flavors by setting the `inherits` property to an existing theme.
|
||||
|
||||
```toml
|
||||
inherits = "nerdfonts"
|
||||
name = "custom_nerdfonts"
|
||||
|
||||
# Override the icon for generic files:
|
||||
[symbol-kind]
|
||||
file = {icon = "…"}
|
||||
|
||||
# Override the icon for Rust files
|
||||
[mime-type]
|
||||
"rs" = { icon = "…", color = "#…" }
|
||||
```
|
@ -1 +1,4 @@
|
||||
/target
|
||||
|
||||
# This folder is used by `test_explorer` to create temporary folders needed for testing
|
||||
test_explorer
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,304 @@
|
||||
use helix_loader::merge_toml_values;
|
||||
use log::warn;
|
||||
use once_cell::sync::Lazy;
|
||||
use serde::Deserialize;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::{path::PathBuf, str};
|
||||
use toml::Value;
|
||||
|
||||
use crate::graphics::{Color, Style};
|
||||
use crate::Theme;
|
||||
|
||||
pub static BLANK_ICON: Icon = Icon {
|
||||
icon_char: ' ',
|
||||
style: None,
|
||||
};
|
||||
|
||||
/// The style of an icon can either be defined by the TOML file, or by the theme.
|
||||
/// We need to remember that in order to reload the icons colors when the theme changes.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum IconStyle {
|
||||
Custom(Style),
|
||||
Default(Style),
|
||||
}
|
||||
|
||||
impl Default for IconStyle {
|
||||
fn default() -> Self {
|
||||
IconStyle::Default(Style::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<IconStyle> for Style {
|
||||
fn from(icon_style: IconStyle) -> Self {
|
||||
match icon_style {
|
||||
IconStyle::Custom(style) => style,
|
||||
IconStyle::Default(style) => style,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
||||
pub struct Icon {
|
||||
#[serde(rename = "icon")]
|
||||
pub icon_char: char,
|
||||
#[serde(default)]
|
||||
#[serde(deserialize_with = "icon_color_to_style", rename = "color")]
|
||||
pub style: Option<IconStyle>,
|
||||
}
|
||||
|
||||
impl Icon {
|
||||
/// Loads a given style if the icon style is undefined or based on a default value
|
||||
pub fn with_default_style(&mut self, style: Style) {
|
||||
if self.style.is_none() || matches!(self.style, Some(IconStyle::Default(_))) {
|
||||
self.style = Some(IconStyle::Default(style));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn unstyled(icon_char: char) -> Self {
|
||||
Self {
|
||||
icon_char,
|
||||
style: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
||||
pub struct Icons {
|
||||
pub name: String,
|
||||
pub mime_type: Option<HashMap<String, Icon>>,
|
||||
pub diagnostic: Diagnostic,
|
||||
pub symbol_kind: Option<HashMap<String, Icon>>,
|
||||
pub breakpoint: Breakpoint,
|
||||
pub diff: Diff,
|
||||
pub ui: Option<HashMap<String, Icon>>,
|
||||
}
|
||||
|
||||
impl Icons {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
/// Set theme defined styles to diagnostic icons
|
||||
pub fn set_diagnostic_icons_base_style(&mut self, theme: &Theme) {
|
||||
self.diagnostic.error.with_default_style(theme.get("error"));
|
||||
self.diagnostic.info.with_default_style(theme.get("info"));
|
||||
self.diagnostic.hint.with_default_style(theme.get("hint"));
|
||||
self.diagnostic
|
||||
.warning
|
||||
.with_default_style(theme.get("warning"));
|
||||
}
|
||||
|
||||
/// Set theme defined styles to symbol-kind icons
|
||||
pub fn set_symbolkind_icons_base_style(&mut self, theme: &Theme) {
|
||||
let style = theme
|
||||
.try_get("symbolkind")
|
||||
.unwrap_or_else(|| theme.get("keyword"));
|
||||
if let Some(symbol_kind_icons) = &mut self.symbol_kind {
|
||||
for (_, icon) in symbol_kind_icons.iter_mut() {
|
||||
icon.with_default_style(style);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the default style for all icons
|
||||
pub fn reset_styles(&mut self) {
|
||||
if let Some(mime_type_icons) = &mut self.mime_type {
|
||||
for (_, icon) in mime_type_icons.iter_mut() {
|
||||
icon.style = Some(IconStyle::Default(Style::default()));
|
||||
}
|
||||
}
|
||||
if let Some(symbol_kind_icons) = &mut self.symbol_kind {
|
||||
for (_, icon) in symbol_kind_icons.iter_mut() {
|
||||
icon.style = Some(IconStyle::Default(Style::default()));
|
||||
}
|
||||
}
|
||||
if let Some(ui_icons) = &mut self.ui {
|
||||
for (_, icon) in ui_icons.iter_mut() {
|
||||
icon.style = Some(IconStyle::Default(Style::default()));
|
||||
}
|
||||
}
|
||||
self.diagnostic.error.style = Some(IconStyle::Default(Style::default()));
|
||||
self.diagnostic.warning.style = Some(IconStyle::Default(Style::default()));
|
||||
self.diagnostic.hint.style = Some(IconStyle::Default(Style::default()));
|
||||
self.diagnostic.info.style = Some(IconStyle::Default(Style::default()));
|
||||
}
|
||||
|
||||
pub fn icon_from_filetype<'a>(&'a self, filetype: &str) -> Option<&'a Icon> {
|
||||
if let Some(mime_type_icons) = &self.mime_type {
|
||||
mime_type_icons.get(filetype)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// Try to return a reference to an appropriate icon for the specified file path, with a default "file" icon if none is found.
|
||||
/// If no such "file" icon is available, return `None`.
|
||||
pub fn icon_from_path<'a>(&'a self, filepath: Option<&PathBuf>) -> Option<&'a Icon> {
|
||||
self.mime_type
|
||||
.as_ref()
|
||||
.and_then(|mime_type_icons| {
|
||||
filepath?
|
||||
.extension()
|
||||
.or(filepath?.file_name())
|
||||
.map(|extension_or_filename| extension_or_filename.to_str())?
|
||||
.and_then(|extension_or_filename| mime_type_icons.get(extension_or_filename))
|
||||
})
|
||||
.or_else(|| self.ui.as_ref().and_then(|ui_icons| ui_icons.get("file")))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
||||
pub struct Diagnostic {
|
||||
pub error: Icon,
|
||||
pub warning: Icon,
|
||||
pub info: Icon,
|
||||
pub hint: Icon,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
||||
pub struct Breakpoint {
|
||||
pub verified: Icon,
|
||||
pub unverified: Icon,
|
||||
pub pause_indicator: Icon,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
|
||||
pub struct Diff {
|
||||
pub added: Icon,
|
||||
pub deleted: Icon,
|
||||
pub modified: Icon,
|
||||
}
|
||||
|
||||
fn icon_color_to_style<'de, D>(deserializer: D) -> Result<Option<IconStyle>, D::Error>
|
||||
where
|
||||
D: serde::Deserializer<'de>,
|
||||
{
|
||||
let s: String = Deserialize::deserialize(deserializer)?;
|
||||
let mut style = Style::default();
|
||||
if !s.is_empty() {
|
||||
match hex_string_to_rgb(&s) {
|
||||
Ok(c) => {
|
||||
style = style.fg(c);
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("{}", e);
|
||||
}
|
||||
};
|
||||
Ok(Some(IconStyle::Custom(style)))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn hex_string_to_rgb(s: &str) -> Result<Color, String> {
|
||||
if s.starts_with('#') && s.len() >= 7 {
|
||||
if let (Ok(red), Ok(green), Ok(blue)) = (
|
||||
u8::from_str_radix(&s[1..3], 16),
|
||||
u8::from_str_radix(&s[3..5], 16),
|
||||
u8::from_str_radix(&s[5..7], 16),
|
||||
) {
|
||||
return Ok(Color::Rgb(red, green, blue));
|
||||
}
|
||||
}
|
||||
Err(format!("Icon color: malformed hexcode: {}", s))
|
||||
}
|
||||
|
||||
pub struct Loader {
|
||||
/// Icons directories to search from highest to lowest priority
|
||||
icons_dirs: Vec<PathBuf>,
|
||||
}
|
||||
|
||||
pub static DEFAULT_ICONS_DATA: Lazy<Value> = Lazy::new(|| {
|
||||
let bytes = include_bytes!("../../icons.toml");
|
||||
toml::from_str(str::from_utf8(bytes).unwrap()).expect("Failed to parse base 16 default theme")
|
||||
});
|
||||
|
||||
pub static DEFAULT_ICONS: Lazy<Icons> = Lazy::new(|| Icons {
|
||||
name: "default".into(),
|
||||
..Icons::from(DEFAULT_ICONS_DATA.clone())
|
||||
});
|
||||
|
||||
impl Loader {
|
||||
/// Creates a new loader that can load icons flavors from two directories.
|
||||
pub fn new(dirs: &[PathBuf]) -> Self {
|
||||
Self {
|
||||
icons_dirs: dirs.iter().map(|p| p.join("icons")).collect(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Loads icons flavors first looking in the `user_dir` then in `default_dir`.
|
||||
/// The `theme` is needed in order to load default styles for diagnostic icons.
|
||||
pub fn load(
|
||||
&self,
|
||||
name: &str,
|
||||
theme: &Theme,
|
||||
true_color: bool,
|
||||
) -> Result<Icons, anyhow::Error> {
|
||||
if name == "default" {
|
||||
return Ok(self.default(theme));
|
||||
}
|
||||
|
||||
let mut visited_paths = HashSet::new();
|
||||
let default_icons = HashMap::from([("default", &DEFAULT_ICONS_DATA)]);
|
||||
let mut icons = helix_loader::load_inheritable_toml(
|
||||
name,
|
||||
&self.icons_dirs,
|
||||
&mut visited_paths,
|
||||
&default_icons,
|
||||
Self::merge_icons,
|
||||
)
|
||||
.map(Icons::from)?;
|
||||
|
||||
// Remove all styles when there is no truecolor support.
|
||||
// Not classy, but less cumbersome than trying to pass a parameter to a deserializer.
|
||||
if !true_color {
|
||||
icons.reset_styles();
|
||||
} else {
|
||||
icons.set_diagnostic_icons_base_style(theme);
|
||||
icons.set_symbolkind_icons_base_style(theme);
|
||||
}
|
||||
|
||||
Ok(Icons {
|
||||
name: name.into(),
|
||||
..icons
|
||||
})
|
||||
}
|
||||
|
||||
fn merge_icons(parent: Value, child: Value) -> Value {
|
||||
merge_toml_values(parent, child, 3)
|
||||
}
|
||||
|
||||
/// Returns the default icon flavor.
|
||||
/// The `theme` is needed in order to load default styles for diagnostic icons.
|
||||
pub fn default(&self, theme: &Theme) -> Icons {
|
||||
let mut icons = DEFAULT_ICONS.clone();
|
||||
icons.set_diagnostic_icons_base_style(theme);
|
||||
icons.set_symbolkind_icons_base_style(theme);
|
||||
icons
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Value> for Icons {
|
||||
fn from(value: Value) -> Self {
|
||||
if let Value::Table(mut table) = value {
|
||||
// remove inherits from value to prevent errors
|
||||
table.remove("inherits");
|
||||
let toml_str = table.to_string();
|
||||
match toml::from_str(&toml_str) {
|
||||
Ok(icons) => icons,
|
||||
Err(e) => {
|
||||
log::error!("Failed to load icons, falling back to default: {}\n", e);
|
||||
DEFAULT_ICONS.clone()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
warn!("Expected icons TOML value to be a table, found {:?}", value);
|
||||
DEFAULT_ICONS.clone()
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
name = "default"
|
||||
|
||||
# All icons here must be available as [default Unicode characters](https://en.wikipedia.org/wiki/List_of_Unicode_characters)
|
||||
|
||||
[diagnostic]
|
||||
error = {icon = "●"}
|
||||
warning = {icon = "●"}
|
||||
info = {icon = "●"}
|
||||
hint = {icon = "●"}
|
||||
|
||||
[breakpoint]
|
||||
verified = {icon = "●"}
|
||||
unverified = {icon = "◯"}
|
||||
pause-indicator = {icon = "▶"}
|
||||
|
||||
[diff]
|
||||
added = {icon = "▍"}
|
||||
deleted = {icon = "▔"}
|
||||
modified = {icon = "▍"}
|
@ -1 +1,66 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" viewBox="663.38 37.57 575.35 903.75"> <g transform="matrix(1,0,0,1,-31352.7,-1817.25)"> <g transform="matrix(1,0,0,1,31062.7,-20.8972)"> <g transform="matrix(1,0,0,1,-130.173,0.00185558)"> <path d="M1083.58,1875.72L1635.06,2194.12C1649.8,2202.63 1658.88,2218.37 1658.88,2235.39C1658.88,2264.98 1658.88,2311.74 1658.88,2341.33C1658.88,2349.84 1656.61,2358.03 1652.5,2365.16C1652.5,2365.16 1214.7,2112.4 1107.2,2050.33C1092.58,2041.89 1083.58,2026.29 1083.58,2009.41C1083.58,1963.5 1083.58,1875.72 1083.58,1875.72Z" style="fill:#706bc8;"></path> </g> <g transform="matrix(1,0,0,1,-130.173,0.00185558)"> <path d="M1635.26,2604.84C1649.88,2613.28 1658.88,2628.87 1658.88,2645.75C1658.88,2691.67 1658.88,2779.44 1658.88,2779.44L1107.41,2461.05C1092.66,2452.53 1083.58,2436.8 1083.58,2419.78C1083.58,2390.19 1083.58,2343.42 1083.58,2313.84C1083.58,2305.32 1085.85,2297.13 1089.96,2290.01C1089.96,2290.01 1527.76,2542.77 1635.26,2604.84Z" style="fill:#55c5e4;"></path> </g> <g transform="matrix(1,0,0,1,216.062,984.098)"> <path d="M790.407,1432.56C785.214,1435.55 780.717,1439.9 777.509,1445.46C767.862,1462.16 773.473,1483.76 790.004,1493.59L789.998,1493.59L761.173,1476.95C746.427,1468.44 737.344,1452.71 737.344,1435.68C737.344,1406.09 737.344,1359.33 737.344,1329.74C737.344,1312.71 746.427,1296.98 761.173,1288.47L1259.59,1000.74L1259.83,1000.6C1264.92,997.617 1269.33,993.314 1272.48,987.844C1282.13,971.136 1276.52,949.544 1259.99,939.707L1260,939.707L1288.82,956.349C1303.57,964.862 1312.65,980.595 1312.65,997.622C1312.65,1027.21 1312.65,1073.97 1312.65,1103.56C1312.65,1120.59 1303.57,1136.32 1288.82,1144.83L1259.19,1161.94L1259.59,1161.68L790.407,1432.56Z" style="fill:#84ddea;"></path> </g> <g transform="matrix(1,0,0,1,216.062,984.098)"> <path d="M790.407,1686.24C785.214,1689.23 780.717,1693.58 777.509,1699.13C767.862,1715.84 773.473,1737.43 790.004,1747.27L789.998,1747.27L761.173,1730.63C746.427,1722.12 737.344,1706.38 737.344,1689.36C737.344,1659.77 737.344,1613.01 737.344,1583.42C737.344,1566.39 746.427,1550.66 761.173,1542.15L1259.59,1254.42L1259.83,1254.28C1264.92,1251.29 1269.33,1246.99 1272.48,1241.52C1282.13,1224.81 1276.52,1203.22 1259.99,1193.38L1260,1193.38L1288.82,1210.03C1303.57,1218.54 1312.65,1234.27 1312.65,1251.3C1312.65,1280.89 1312.65,1327.65 1312.65,1357.24C1312.65,1374.26 1303.57,1390 1288.82,1398.51L1259.19,1415.61L1259.59,1415.36L790.407,1686.24Z" style="fill:#997bc8;"></path></g></g></g> </svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
version="1.1"
|
||||
xml:space="preserve"
|
||||
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
|
||||
viewBox="663.38 37.57 575.35 903.75"
|
||||
id="svg22"
|
||||
sodipodi:docname="logo.svg"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs26" /><sodipodi:namedview
|
||||
id="namedview24"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.58133371"
|
||||
inkscape:cx="100.63067"
|
||||
inkscape:cy="442.08687"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1001"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g18" /> <g
|
||||
transform="matrix(1,0,0,1,-31352.7,-1817.25)"
|
||||
id="g20"> <g
|
||||
transform="matrix(1,0,0,1,31062.7,-20.8972)"
|
||||
id="g18"> <g
|
||||
transform="matrix(1,0,0,1,-130.173,0.00185558)"
|
||||
id="g4"> <path
|
||||
d="M1083.58,1875.72L1635.06,2194.12C1649.8,2202.63 1658.88,2218.37 1658.88,2235.39C1658.88,2264.98 1658.88,2311.74 1658.88,2341.33C1658.88,2349.84 1656.61,2358.03 1652.5,2365.16C1652.5,2365.16 1214.7,2112.4 1107.2,2050.33C1092.58,2041.89 1083.58,2026.29 1083.58,2009.41C1083.58,1963.5 1083.58,1875.72 1083.58,1875.72Z"
|
||||
style="fill:#706bc8;"
|
||||
id="path2" /> </g> <g
|
||||
transform="matrix(1,0,0,1,-130.173,0.00185558)"
|
||||
id="g8"> <path
|
||||
d="M1635.26,2604.84C1649.88,2613.28 1658.88,2628.87 1658.88,2645.75C1658.88,2691.67 1658.88,2779.44 1658.88,2779.44L1107.41,2461.05C1092.66,2452.53 1083.58,2436.8 1083.58,2419.78C1083.58,2390.19 1083.58,2343.42 1083.58,2313.84C1083.58,2305.32 1085.85,2297.13 1089.96,2290.01C1089.96,2290.01 1527.76,2542.77 1635.26,2604.84Z"
|
||||
style="fill:#55c5e4;"
|
||||
id="path6" /> </g> <g
|
||||
transform="matrix(1,0,0,1,216.062,984.098)"
|
||||
id="g12"> <path
|
||||
d="M790.407,1432.56C785.214,1435.55 780.717,1439.9 777.509,1445.46C767.862,1462.16 773.473,1483.76 790.004,1493.59L789.998,1493.59L761.173,1476.95C746.427,1468.44 737.344,1452.71 737.344,1435.68C737.344,1406.09 737.344,1359.33 737.344,1329.74C737.344,1312.71 746.427,1296.98 761.173,1288.47L1259.59,1000.74L1259.83,1000.6C1264.92,997.617 1269.33,993.314 1272.48,987.844C1282.13,971.136 1276.52,949.544 1259.99,939.707L1260,939.707L1288.82,956.349C1303.57,964.862 1312.65,980.595 1312.65,997.622C1312.65,1027.21 1312.65,1073.97 1312.65,1103.56C1312.65,1120.59 1303.57,1136.32 1288.82,1144.83L1259.19,1161.94L1259.59,1161.68L790.407,1432.56Z"
|
||||
style="fill:#84ddea;"
|
||||
id="path10" /> </g> <g
|
||||
transform="matrix(1,0,0,1,216.062,984.098)"
|
||||
id="g16"> <path
|
||||
d="M790.407,1686.24C785.214,1689.23 780.717,1693.58 777.509,1699.13C767.862,1715.84 773.473,1737.43 790.004,1747.27L789.998,1747.27L761.173,1730.63C746.427,1722.12 737.344,1706.38 737.344,1689.36C737.344,1659.77 737.344,1613.01 737.344,1583.42C737.344,1566.39 746.427,1550.66 761.173,1542.15L1259.59,1254.42L1259.83,1254.28C1264.92,1251.29 1269.33,1246.99 1272.48,1241.52C1282.13,1224.81 1276.52,1203.22 1259.99,1193.38L1260,1193.38L1288.82,1210.03C1303.57,1218.54 1312.65,1234.27 1312.65,1251.3C1312.65,1280.89 1312.65,1327.65 1312.65,1357.24C1312.65,1374.26 1303.57,1390 1288.82,1398.51L1259.19,1415.61L1259.59,1415.36L790.407,1686.24Z"
|
||||
style="fill:#997bc8;"
|
||||
id="path14" /></g><text
|
||||
xml:space="preserve"
|
||||
style="font-size:742.268px;clip-rule:evenodd;fill:#8ff8b6;fill-opacity:1;fill-rule:evenodd;stroke:#8ff8b6;stroke-width:20;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:2;stroke-dasharray:none;stroke-opacity:1;paint-order:normal;-inkscape-font-specification:'sans-serif Bold';font-family:sans-serif;font-weight:bold;font-style:normal;font-stretch:normal;font-variant:normal"
|
||||
x="1086.8125"
|
||||
y="2811.8589"
|
||||
id="text186"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan184"
|
||||
x="1086.8125"
|
||||
y="2811.8589"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:742.268px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#8ff8b6;fill-opacity:1;stroke:#8ff8b6;stroke-width:20;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:normal">+</tspan></text></g></g> </svg>
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 8.3 KiB |
@ -0,0 +1,285 @@
|
||||
name = "nerdfonts"
|
||||
|
||||
[diagnostic]
|
||||
error = {icon = ""}
|
||||
warning = {icon = ""}
|
||||
info = {icon = ""}
|
||||
hint = {icon = ""}
|
||||
|
||||
[breakpoint]
|
||||
verified = {icon = "●"}
|
||||
unverified = {icon = "◯"}
|
||||
pause-indicator = {icon = "▶"}
|
||||
|
||||
[diff]
|
||||
added = {icon = "▍"}
|
||||
deleted = {icon = "▔"}
|
||||
modified = {icon = "▍"}
|
||||
|
||||
[symbol-kind]
|
||||
file = {icon = ""}
|
||||
module = {icon = ""}
|
||||
namespace = {icon = ""}
|
||||
package = {icon = ""}
|
||||
class = {icon = "ﴯ"}
|
||||
method = {icon = ""}
|
||||
property = {icon = ""}
|
||||
field = {icon = ""}
|
||||
constructor = {icon = ""}
|
||||
enumeration = {icon = ""}
|
||||
interface = {icon = ""}
|
||||
variable = {icon = ""}
|
||||
function = {icon = ""}
|
||||
constant = {icon = ""}
|
||||
string = {icon = ""}
|
||||
number = {icon = ""}
|
||||
boolean = {icon = ""}
|
||||
array = {icon = ""}
|
||||
object = {icon = ""}
|
||||
key = {icon = ""}
|
||||
null = {icon = "ﳠ"}
|
||||
enum-member = {icon = ""}
|
||||
structure = {icon = "פּ"}
|
||||
event = {icon = ""}
|
||||
operator = {icon = ""}
|
||||
type-parameter = {icon = ""}
|
||||
|
||||
[ui]
|
||||
file = {icon = ""}
|
||||
folder = {icon = ""}
|
||||
folder_opened = {icon = ""}
|
||||
vcs_branch = {icon = ""}
|
||||
|
||||
[mime-type]
|
||||
# This is heavily based on https://github.com/nvim-tree/nvim-web-devicons
|
||||
".babelrc" = { icon = "ﬥ", color = "#cbcb41" }
|
||||
".bash_profile" = { icon = "", color = "#89e051" }
|
||||
".bashrc" = { icon = "", color = "#89e051" }
|
||||
".DS_Store" = { icon = "", color = "#41535b" }
|
||||
".gitattributes" = { icon = "", color = "#41535b" }
|
||||
".gitconfig" = { icon = "", color = "#41535b" }
|
||||
".gitignore" = { icon = "", color = "#41535b" }
|
||||
".gitlab-ci.yml" = { icon = "", color = "#e24329" }
|
||||
".gitmodules" = { icon = "", color = "#41535b" }
|
||||
".gvimrc" = { icon = "", color = "#019833" }
|
||||
".npmignore" = { icon = "", color = "#E8274B" }
|
||||
".npmrc" = { icon = "", color = "#E8274B" }
|
||||
".settings.json" = { icon = "", color = "#854CC7" }
|
||||
".vimrc" = { icon = "", color = "#019833" }
|
||||
".zprofile" = { icon = "", color = "#89e051" }
|
||||
".zshenv" = { icon = "", color = "#89e051" }
|
||||
".zshrc" = { icon = "", color = "#89e051" }
|
||||
"Brewfile" = { icon = "", color = "#701516" }
|
||||
"CMakeLists.txt" = { icon = "", color = "#6d8086" }
|
||||
"COMMIT_EDITMSG" = { icon = "", color = "#41535b" }
|
||||
"COPYING" = { icon = "", color = "#cbcb41" }
|
||||
"COPYING.LESSER" = { icon = "", color = "#cbcb41" }
|
||||
"Dockerfile" = { icon = "", color = "#384d54" }
|
||||
"Gemfile$" = { icon = "", color = "#701516" }
|
||||
"LICENSE" = { icon = "", color = "#d0bf41" }
|
||||
"R" = { icon = "ﳒ", color = "#358a5b" }
|
||||
"Rmd" = { icon = "", color = "#519aba" }
|
||||
"Vagrantfile$" = { icon = "", color = "#1563FF" }
|
||||
"_gvimrc" = { icon = "", color = "#019833" }
|
||||
"_vimrc" = { icon = "", color = "#019833" }
|
||||
"ai" = { icon = "", color = "#cbcb41" }
|
||||
"awk" = { icon = "", color = "#4d5a5e" }
|
||||
"bash" = { icon = "", color = "#89e051" }
|
||||
"bat" = { icon = "", color = "#C1F12E" }
|
||||
"bmp" = { icon = "", color = "#a074c4" }
|
||||
"c" = { icon = "", color = "#599eff" }
|
||||
"c++" = { icon = "", color = "#f34b7d" }
|
||||
"cbl" = { icon = "⚙", color = "#005ca5" }
|
||||
"cc" = { icon = "", color = "#f34b7d" }
|
||||
"cfg" = { icon = "", color = "#ECECEC" }
|
||||
"clj" = { icon = "", color = "#8dc149" }
|
||||
"cljc" = { icon = "", color = "#8dc149" }
|
||||
"cljs" = { icon = "", color = "#519aba" }
|
||||
"cljd" = { icon = "", color = "#519aba" }
|
||||
"cmake" = { icon = "", color = "#6d8086" }
|
||||
"cob" = { icon = "⚙", color = "#005ca5" }
|
||||
"cobol" = { icon = "⚙", color = "#005ca5" }
|
||||
"coffee" = { icon = "", color = "#cbcb41" }
|
||||
"conf" = { icon = "", color = "#6d8086" }
|
||||
"config.ru" = { icon = "", color = "#701516" }
|
||||
"cp" = { icon = "", color = "#519aba" }
|
||||
"cpp" = { icon = "", color = "#519aba" }
|
||||
"cpy" = { icon = "⚙", color = "#005ca5" }
|
||||
"cr" = { icon = "" }
|
||||
"cs" = { icon = "", color = "#596706" }
|
||||
"csh" = { icon = "", color = "#4d5a5e" }
|
||||
"cson" = { icon = "", color = "#cbcb41" }
|
||||
"css" = { icon = "", color = "#42a5f5" }
|
||||
"csv" = { icon = "", color = "#89e051" }
|
||||
"cxx" = { icon = "", color = "#519aba" }
|
||||
"d" = { icon = "", color = "#427819" }
|
||||
"dart" = { icon = "", color = "#03589C" }
|
||||
"db" = { icon = "", color = "#dad8d8" }
|
||||
"desktop" = { icon = "", color = "#563d7c" }
|
||||
"diff" = { icon = "", color = "#41535b" }
|
||||
"doc" = { icon = "", color = "#185abd" }
|
||||
"dockerfile" = { icon = "", color = "#384d54" }
|
||||
"drl" = { icon = "", color = "#ffafaf" }
|
||||
"dropbox" = { icon = "", color = "#0061FE" }
|
||||
"dump" = { icon = "", color = "#dad8d8" }
|
||||
"edn" = { icon = "", color = "#519aba" }
|
||||
"eex" = { icon = "", color = "#a074c4" }
|
||||
"ejs" = { icon = "", color = "#cbcb41" }
|
||||
"elm" = { icon = "", color = "#519aba" }
|
||||
"epp" = { icon = "", color = "#FFA61A" }
|
||||
"erb" = { icon = "", color = "#701516" }
|
||||
"erl" = { icon = "", color = "#B83998" }
|
||||
"ex" = { icon = "", color = "#a074c4" }
|
||||
"exs" = { icon = "", color = "#a074c4" }
|
||||
"f#" = { icon = "", color = "#519aba" }
|
||||
"favicon.ico" = { icon = "", color = "#cbcb41" }
|
||||
"fnl" = { icon = "🌜", color = "#fff3d7" }
|
||||
"fish" = { icon = "", color = "#4d5a5e" }
|
||||
"fs" = { icon = "", color = "#519aba" }
|
||||
"fsi" = { icon = "", color = "#519aba" }
|
||||
"fsscript" = { icon = "", color = "#519aba" }
|
||||
"fsx" = { icon = "", color = "#519aba" }
|
||||
"gd" = { icon = "", color = "#6d8086" }
|
||||
"gemspec" = { icon = "", color = "#701516" }
|
||||
"gif" = { icon = "", color = "#a074c4" }
|
||||
"git" = { icon = "", color = "#F14C28" }
|
||||
"glb" = { icon = "", color = "#FFB13B" }
|
||||
"go" = { icon = "", color = "#519aba" }
|
||||
"godot" = { icon = "", color = "#6d8086" }
|
||||
"graphql" = { icon = "", color = "#e535ab" }
|
||||
"gruntfile" = { icon = "", color = "#e37933" }
|
||||
"gulpfile" = { icon = "", color = "#cc3e44" }
|
||||
"h" = { icon = "", color = "#a074c4" }
|
||||
"haml" = { icon = "", color = "#eaeae1" }
|
||||
"hbs" = { icon = "", color = "#f0772b" }
|
||||
"heex" = { icon = "", color = "#a074c4" }
|
||||
"hh" = { icon = "", color = "#a074c4" }
|
||||
"hpp" = { icon = "", color = "#a074c4" }
|
||||
"hrl" = { icon = "", color = "#B83998" }
|
||||
"hs" = { icon = "", color = "#a074c4" }
|
||||
"htm" = { icon = "", color = "#e34c26" }
|
||||
"html" = { icon = "", color = "#e44d26" }
|
||||
"hxx" = { icon = "", color = "#a074c4" }
|
||||
"ico" = { icon = "", color = "#cbcb41" }
|
||||
"import" = { icon = "", color = "#ECECEC" }
|
||||
"ini" = { icon = "", color = "#6d8086" }
|
||||
"java" = { icon = "", color = "#cc3e44" }
|
||||
"jl" = { icon = "", color = "#a270ba" }
|
||||
"jpeg" = { icon = "", color = "#a074c4" }
|
||||
"jpg" = { icon = "", color = "#a074c4" }
|
||||
"js" = { icon = "", color = "#cbcb41" }
|
||||
"json" = { icon = "", color = "#cbcb41" }
|
||||
"json5" = { icon = "ﬥ", color = "#cbcb41" }
|
||||
"jsx" = { icon = "", color = "#519aba" }
|
||||
"ksh" = { icon = "", color = "#4d5a5e" }
|
||||
"kt" = { icon = "", color = "#F88A02" }
|
||||
"kts" = { icon = "", color = "#F88A02" }
|
||||
"leex" = { icon = "", color = "#a074c4" }
|
||||
"less" = { icon = "", color = "#563d7c" }
|
||||
"lhs" = { icon = "", color = "#a074c4" }
|
||||
"license" = { icon = "", color = "#cbcb41" }
|
||||
"lua" = { icon = "", color = "#51a0cf" }
|
||||
"luau" = { icon = "", color = "#51a0cf" }
|
||||
"makefile" = { icon = "", color = "#6d8086" }
|
||||
"markdown" = { icon = "", color = "#d74c4c" }
|
||||
"material" = { icon = "", color = "#B83998" }
|
||||
"md" = { icon = "", color = "#d74c4c" }
|
||||
"mdx" = { icon = "", color = "#d74c4c" }
|
||||
"mint" = { icon = "", color = "#87c095" }
|
||||
"mix.lock" = { icon = "", color = "#a074c4" }
|
||||
"mjs" = { icon = "", color = "#f1e05a" }
|
||||
"ml" = { icon = "λ", color = "#e37933" }
|
||||
"mli" = { icon = "λ", color = "#e37933" }
|
||||
"mo" = { icon = "∞", color = "#9772FB" }
|
||||
"mustache" = { icon = "", color = "#e37933" }
|
||||
"nim" = { icon = "👑", color = "#f3d400" }
|
||||
"nix" = { icon = "", color = "#7ebae4" }
|
||||
"node_modules" = { icon = "", color = "#E8274B" }
|
||||
"opus" = { icon = "", color = "#F88A02" }
|
||||
"otf" = { icon = "", color = "#ECECEC" }
|
||||
"package.json" = { icon = "", color = "#e8274b" }
|
||||
"package-lock.json" = { icon = "", color = "#7a0d21" }
|
||||
"pck" = { icon = "", color = "#6d8086" }
|
||||
"pdf" = { icon = "", color = "#b30b00" }
|
||||
"php" = { icon = "", color = "#a074c4" }
|
||||
"pl" = { icon = "", color = "#519aba" }
|
||||
"pm" = { icon = "", color = "#519aba" }
|
||||
"png" = { icon = "", color = "#a074c4" }
|
||||
"pp" = { icon = "", color = "#FFA61A" }
|
||||
"ppt" = { icon = "", color = "#cb4a32" }
|
||||
"pro" = { icon = "", color = "#e4b854" }
|
||||
"Procfile" = { icon = "", color = "#a074c4" }
|
||||
"ps1" = { icon = "", color = "#4d5a5e" }
|
||||
"psb" = { icon = "", color = "#519aba" }
|
||||
"psd" = { icon = "", color = "#519aba" }
|
||||
"py" = { icon = "", color = "#ffbc03" }
|
||||
"pyc" = { icon = "", color = "#ffe291" }
|
||||
"pyd" = { icon = "", color = "#ffe291" }
|
||||
"pyo" = { icon = "", color = "#ffe291" }
|
||||
"query" = { icon = "", color = "#90a850" }
|
||||
"r" = { icon = "ﳒ", color = "#358a5b" }
|
||||
"rake" = { icon = "", color = "#701516" }
|
||||
"rakefile" = { icon = "", color = "#701516" }
|
||||
"rb" = { icon = "", color = "#701516" }
|
||||
"rlib" = { icon = "", color = "#dea584" }
|
||||
"rmd" = { icon = "", color = "#519aba" }
|
||||
"rproj" = { icon = "鉶", color = "#358a5b" }
|
||||
"rs" = { icon = "", color = "#dea584" }
|
||||
"rss" = { icon = "", color = "#FB9D3B" }
|
||||
"sass" = { icon = "", color = "#f55385" }
|
||||
"sbt" = { icon = "", color = "#cc3e44" }
|
||||
"scala" = { icon = "", color = "#cc3e44" }
|
||||
"scm" = { icon = "ﬦ" }
|
||||
"scss" = { icon = "", color = "#f55385" }
|
||||
"sh" = { icon = "", color = "#4d5a5e" }
|
||||
"sig" = { icon = "λ", color = "#e37933" }
|
||||
"slim" = { icon = "", color = "#e34c26" }
|
||||
"sln" = { icon = "", color = "#854CC7" }
|
||||
"sml" = { icon = "λ", color = "#e37933" }
|
||||
"sql" = { icon = "", color = "#dad8d8" }
|
||||
"sqlite" = { icon = "", color = "#dad8d8" }
|
||||
"sqlite3" = { icon = "", color = "#dad8d8" }
|
||||
"styl" = { icon = "", color = "#8dc149" }
|
||||
"sublime" = { icon = "", color = "#e37933" }
|
||||
"suo" = { icon = "", color = "#854CC7" }
|
||||
"sv" = { icon = "", color = "#019833" }
|
||||
"svelte" = { icon = "", color = "#ff3e00" }
|
||||
"svh" = { icon = "", color = "#019833" }
|
||||
"svg" = { icon = "ﰟ", color = "#FFB13B" }
|
||||
"swift" = { icon = "", color = "#e37933" }
|
||||
"t" = { icon = "", color = "#519aba" }
|
||||
"tbc" = { icon = "", color = "#1e5cb3" }
|
||||
"tcl" = { icon = "", color = "#1e5cb3" }
|
||||
"terminal" = { icon = "", color = "#31B53E" }
|
||||
"tex" = { icon = "ﭨ", color = "#3D6117" }
|
||||
"tf" = { icon = "", color = "#5F43E9" }
|
||||
"tfvars" = { icon = "", color = "#5F43E9" }
|
||||
"toml" = { icon = "", color = "#6d8086" }
|
||||
"tres" = { icon = "", color = "#cbcb41" }
|
||||
"ts" = { icon = "", color = "#519aba" }
|
||||
"tscn" = { icon = "", color = "#a074c4" }
|
||||
"tsx" = { icon = "", color = "#519aba" }
|
||||
"twig" = { icon = "", color = "#8dc149" }
|
||||
"txt" = { icon = "", color = "#89e051" }
|
||||
"v" = { icon = "", color = "#019833" }
|
||||
"vh" = { icon = "", color = "#019833" }
|
||||
"vhd" = { icon = "", color = "#019833" }
|
||||
"vhdl" = { icon = "", color = "#019833" }
|
||||
"vim" = { icon = "", color = "#019833" }
|
||||
"vue" = { icon = "﵂", color = "#8dc149" }
|
||||
"webmanifest" = { icon = "", color = "#f1e05a" }
|
||||
"webp" = { icon = "", color = "#a074c4" }
|
||||
"webpack" = { icon = "ﰩ", color = "#519aba" }
|
||||
"xcplayground" = { icon = "", color = "#e37933" }
|
||||
"xls" = { icon = "", color = "#207245" }
|
||||
"xml" = { icon = "謹", color = "#e37933" }
|
||||
"xul" = { icon = "", color = "#e37933" }
|
||||
"yaml" = { icon = "", color = "#6d8086" }
|
||||
"yml" = { icon = "", color = "#6d8086" }
|
||||
"zig" = { icon = "", color = "#f69a1b" }
|
||||
"zsh" = { icon = "", color = "#89e051" }
|
||||
"sol" = { icon = "ﲹ", color = "#519aba" }
|
||||
".env" = { icon = "", color = "#faf743" }
|
||||
"prisma" = { icon = "卑" }
|
||||
"lock" = { icon = "", color = "#bbbbbb" }
|
||||
"log" = { icon = "" }
|
@ -0,0 +1,2 @@
|
||||
(comment) @comment.inside
|
||||
(comment)+ @comment.around
|
@ -0,0 +1,127 @@
|
||||
[
|
||||
"[QueryStringParams]"
|
||||
"[FormParams]"
|
||||
"[MultipartFormData]"
|
||||
"[Cookies]"
|
||||
"[Captures]"
|
||||
"[Asserts]"
|
||||
"[Options]"
|
||||
"[BasicAuth]"
|
||||
] @attribute
|
||||
|
||||
(comment) @comment
|
||||
|
||||
[
|
||||
(key_string)
|
||||
(json_key_string)
|
||||
] @variable.other.member
|
||||
|
||||
(value_string) @string
|
||||
(quoted_string) @string
|
||||
(json_string) @string
|
||||
(file_value) @string.special.path
|
||||
(regex) @string.regex
|
||||
|
||||
[
|
||||
"\\"
|
||||
(regex_escaped_char)
|
||||
(quoted_string_escaped_char)
|
||||
(key_string_escaped_char)
|
||||
(value_string_escaped_char)
|
||||
(oneline_string_escaped_char)
|
||||
(multiline_string_escaped_char)
|
||||
(filename_escaped_char)
|
||||
(json_string_escaped_char)
|
||||
] @constant.character.escape
|
||||
|
||||
(method) @type.builtin
|
||||
(multiline_string_type) @type
|
||||
|
||||
[
|
||||
"status"
|
||||
"url"
|
||||
"header"
|
||||
"cookie"
|
||||
"body"
|
||||
"xpath"
|
||||
"jsonpath"
|
||||
"regex"
|
||||
"variable"
|
||||
"duration"
|
||||
"sha256"
|
||||
"md5"
|
||||
"bytes"
|
||||
] @function.builtin
|
||||
|
||||
(filter) @attribute
|
||||
|
||||
(version) @string.special
|
||||
[
|
||||
"null"
|
||||
"cacert"
|
||||
"location"
|
||||
"insecure"
|
||||
"max-redirs"
|
||||
"retry"
|
||||
"retry-interval"
|
||||
"retry-max-count"
|
||||
(variable_option "variable")
|
||||
"verbose"
|
||||
"very-verbose"
|
||||
] @constant.builtin
|
||||
|
||||
(boolean) @constant.builtin.boolean
|
||||
|
||||
(variable_name) @variable
|
||||
|
||||
[
|
||||
"not"
|
||||
"equals"
|
||||
"=="
|
||||
"notEquals"
|
||||
"!="
|
||||
"greaterThan"
|
||||
">"
|
||||
"greaterThanOrEquals"
|
||||
">="
|
||||
"lessThan"
|
||||
"<"
|
||||
"lessThanOrEquals"
|
||||
"<="
|
||||
"startsWith"
|
||||
"endsWith"
|
||||
"contains"
|
||||
"matches"
|
||||
"exists"
|
||||
"includes"
|
||||
"isInteger"
|
||||
"isFloat"
|
||||
"isBoolean"
|
||||
"isString"
|
||||
"isCollection"
|
||||
] @keyword.operator
|
||||
|
||||
(integer) @constant.numeric.integer
|
||||
(float) @constant.numeric.float
|
||||
(status) @constant.numeric
|
||||
(json_number) @constant.numeric.float
|
||||
|
||||
[
|
||||
":"
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"{{"
|
||||
"}}"
|
||||
] @punctuation.special
|
||||
|
||||
[
|
||||
"base64,"
|
||||
"file,"
|
||||
"hex,"
|
||||
] @string.special
|
@ -0,0 +1,11 @@
|
||||
[
|
||||
(json_object)
|
||||
(json_array)
|
||||
(xml_tag)
|
||||
] @indent
|
||||
|
||||
[
|
||||
"}"
|
||||
"]"
|
||||
(xml_close_tag)
|
||||
] @outdent
|
@ -0,0 +1,14 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((json_value) @injection.content
|
||||
(#set! injection.language "json"))
|
||||
|
||||
((xml) @injection.content
|
||||
(#set! injection.language "xml"))
|
||||
|
||||
((multiline_string
|
||||
(multiline_string_type) @injection.language
|
||||
(multiline_string_content) @injection.content)
|
||||
(#set! injection.include-children)
|
||||
(#set! injection.combined))
|
@ -0,0 +1,16 @@
|
||||
[
|
||||
(struct_definition)
|
||||
(macro_definition)
|
||||
(function_definition)
|
||||
(compound_expression)
|
||||
(let_statement)
|
||||
(if_statement)
|
||||
(for_statement)
|
||||
(while_statement)
|
||||
(do_clause)
|
||||
(parameter_list)
|
||||
] @indent
|
||||
|
||||
[
|
||||
"end"
|
||||
] @outdent
|
@ -0,0 +1,46 @@
|
||||
(function_definition (_)? @function.inside) @function.around
|
||||
|
||||
(short_function_definition (_)? @function.inside) @function.around
|
||||
|
||||
(macro_definition (_)? @function.inside) @function.around
|
||||
|
||||
(struct_definition (_)? @class.inside) @class.around
|
||||
|
||||
(abstract_definition (_)? @class.inside) @class.around
|
||||
|
||||
(primitive_definition (_)? @class.inside) @class.around
|
||||
|
||||
(parameter_list
|
||||
; Match all children of parameter_list *except* keyword_parameters
|
||||
([(identifier)
|
||||
(slurp_parameter)
|
||||
(optional_parameter)
|
||||
(typed_parameter)
|
||||
(tuple_expression)
|
||||
(interpolation_expression)
|
||||
(call_expression)]
|
||||
@parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(keyword_parameters
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(argument_list
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(type_parameter_list
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(line_comment) @comment.inside
|
||||
|
||||
(line_comment)+ @comment.around
|
||||
|
||||
(block_comment) @comment.inside
|
||||
|
||||
(block_comment)+ @comment.around
|
||||
|
||||
(_expression (macro_identifier
|
||||
(identifier) @_name
|
||||
(#match? @_name "^(test|test_throws|test_logs|inferred|test_deprecated|test_warn|test_nowarn|test_broken|test_skip)$")
|
||||
)
|
||||
.
|
||||
(macro_argument_list) @test.inside) @test.around
|
@ -0,0 +1,315 @@
|
||||
;; Constants, Comments, and Literals
|
||||
|
||||
(comment) @comment.line
|
||||
(multilineComment) @comment.block
|
||||
(docComment) @comment.block.documentation
|
||||
(multilineDocComment) @comment.block.documentation
|
||||
; comments
|
||||
|
||||
[(literal) (generalizedLit)] @constant
|
||||
[(nil_lit)] @constant.builtin
|
||||
[(bool_lit)] @constant.builtin.boolean
|
||||
[(char_lit)] @constant.character
|
||||
[(char_esc_seq) (str_esc_seq)] @constant.character.escape
|
||||
[(custom_numeric_lit)] @constant.numeric
|
||||
[(int_lit) (int_suffix)] @constant.numeric.integer
|
||||
[(float_lit) (float_suffix)] @constant.numeric.float
|
||||
; literals
|
||||
; note: somewhat irritatingly for testing, lits have the same syntax highlighting as types
|
||||
|
||||
[
|
||||
(str_lit)
|
||||
(triplestr_lit)
|
||||
(rstr_lit)
|
||||
(generalized_str_lit)
|
||||
(generalized_triplestr_lit)
|
||||
(interpolated_str_lit)
|
||||
(interpolated_triplestr_lit)
|
||||
] @string
|
||||
; [] @string.regexp
|
||||
; string literals
|
||||
|
||||
[
|
||||
"."
|
||||
","
|
||||
";"
|
||||
":"
|
||||
] @punctuation.delimiter
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"{."
|
||||
".}"
|
||||
"#["
|
||||
"]#"
|
||||
] @punctuation.bracket
|
||||
(interpolated_str_lit "&" @punctuation.special)
|
||||
(interpolated_str_lit "{" @punctuation.special)
|
||||
(interpolated_str_lit "}" @punctuation.special)
|
||||
; punctuation
|
||||
|
||||
[
|
||||
"and"
|
||||
"or"
|
||||
"xor"
|
||||
"not"
|
||||
"in"
|
||||
"notin"
|
||||
"is"
|
||||
"isnot"
|
||||
"div"
|
||||
"mod"
|
||||
"shl"
|
||||
"shr"
|
||||
] @keyword.operator
|
||||
; operators: we list them explicitly to deliminate them from symbolic operators
|
||||
|
||||
[(operator) (opr) "="] @operator
|
||||
; all operators (must come after @keyword.operator)
|
||||
|
||||
(pragma) @attribute
|
||||
; pragmas
|
||||
|
||||
|
||||
;; Imports and Exports
|
||||
|
||||
(importStmt
|
||||
(keyw) @keyword.control.import
|
||||
(expr (primary (symbol) @namespace))?
|
||||
(expr (primary (arrayConstr (exprColonExprList (exprColonExpr (expr (primary (symbol) @namespace)))))))?)
|
||||
(exportStmt
|
||||
(keyw) @keyword.control.import
|
||||
(expr (primary (symbol) @namespace))?
|
||||
(expr (primary (arrayConstr (exprColonExprList (exprColonExpr (expr (primary (symbol) @namespace)))))))?)
|
||||
(fromStmt
|
||||
(keyw) @keyword.control.import
|
||||
(expr (primary (symbol) @namespace))?
|
||||
(expr (primary (arrayConstr (exprColonExprList (exprColonExpr (expr (primary (symbol) @namespace)))))))?)
|
||||
(includeStmt
|
||||
(keyw) @keyword.control.import
|
||||
(expr (primary (symbol) @namespace))?
|
||||
(expr (primary (arrayConstr (exprColonExprList (exprColonExpr (expr (primary (symbol) @namespace)))))))?)
|
||||
(importExceptStmt
|
||||
(keyw) @keyword.control.import
|
||||
(expr (primary (symbol) @namespace))?
|
||||
(expr (primary (arrayConstr (exprColonExprList (exprColonExpr (expr (primary (symbol) @namespace)))))))?)
|
||||
; import statements
|
||||
; yeah, this is a bit gross.
|
||||
|
||||
|
||||
;; Control Flow
|
||||
|
||||
(ifStmt (keyw) @keyword.control.conditional)
|
||||
(whenStmt (keyw) @keyword.control.conditional)
|
||||
(elifStmt (keyw) @keyword.control.conditional)
|
||||
(elseStmt (keyw) @keyword.control.conditional)
|
||||
(caseStmt (keyw) @keyword.control.conditional)
|
||||
(ofBranch (keyw) @keyword.control.conditional)
|
||||
(inlineIfStmt (keyw) @keyword.control.conditional)
|
||||
(inlineWhenStmt (keyw) @keyword.control.conditional)
|
||||
; conditional statements
|
||||
; todo: do block
|
||||
|
||||
(forStmt
|
||||
. (keyw) @keyword.control.repeat
|
||||
. (symbol) @variable
|
||||
. (keyw) @keyword.control.repeat)
|
||||
(whileStmt (keyw) @keyword.control.repeat)
|
||||
; loop statements
|
||||
|
||||
(returnStmt (keyw) @keyword.control.repeat)
|
||||
(yieldStmt (keyw) @keyword.control.repeat)
|
||||
(discardStmt (keyw) @keyword.control.repeat)
|
||||
(breakStmt (keyw) @keyword.control.repeat)
|
||||
(continueStmt (keyw) @keyword.control.repeat)
|
||||
; control flow statements
|
||||
|
||||
(raiseStmt (keyw) @keyword.control.exception)
|
||||
(tryStmt (keyw) @keyword.control.exception)
|
||||
(tryExceptStmt (keyw) @keyword.control.exception)
|
||||
(tryFinallyStmt (keyw) @keyword.control.exception)
|
||||
(inlineTryStmt (keyw) @keyword.control.exception)
|
||||
; (inlineTryExceptStmt (keyw) @keyword.control.exception)
|
||||
; (inlineTryFinallyStmt (keyw) @keyword.control.exception)
|
||||
; exception handling statements
|
||||
|
||||
(staticStmt (keyw) @keyword)
|
||||
(deferStmt (keyw) @keyword)
|
||||
(asmStmt (keyw) @keyword)
|
||||
(bindStmt (keyw) @keyword)
|
||||
(mixinStmt (keyw) @keyword)
|
||||
; miscellaneous blocks
|
||||
|
||||
(blockStmt
|
||||
(keyw) @keyword.control
|
||||
(symbol) @label)
|
||||
; block statements
|
||||
|
||||
|
||||
;; Types and Type Declarations
|
||||
|
||||
(typeDef
|
||||
(keyw) @keyword.storage.type
|
||||
(symbol) @type)
|
||||
; names of new types type declarations
|
||||
|
||||
(exprColonEqExpr
|
||||
. (expr (primary (symbol) @variable))
|
||||
. (expr (primary (symbol) @type)))
|
||||
; variables in inline tuple declarations
|
||||
|
||||
(primarySuffix
|
||||
(indexSuffix
|
||||
(exprColonEqExprList
|
||||
(exprColonEqExpr
|
||||
(expr
|
||||
(primary
|
||||
(symbol) @type))))))
|
||||
; nested types in brackets, i.e. seq[string]
|
||||
|
||||
(primaryTypeDef (symbol) @type)
|
||||
; primary types of type declarations (NOT nested types)
|
||||
|
||||
(primaryTypeDef (primaryPrefix (keyw) @type))
|
||||
; for consistency
|
||||
|
||||
(primaryTypeDesc (symbol) @type)
|
||||
; type annotations, on declarations or in objects
|
||||
|
||||
(primaryTypeDesc (primaryPrefix (keyw) @type))
|
||||
; var types etc
|
||||
|
||||
(genericParamList (genericParam (symbol) @type))
|
||||
; types in generic blocks
|
||||
|
||||
(enumDecl (keyw) @keyword.storage.type)
|
||||
(enumElement (symbol) @type.enum.variant)
|
||||
; enum declarations and elements
|
||||
|
||||
(tupleDecl (keyw) @keyword.storage.type)
|
||||
; tuple declarations
|
||||
|
||||
(objectDecl (keyw) @keyword.storage.type)
|
||||
(objectPart (symbol) @variable.other.member)
|
||||
; object declarations and fields
|
||||
|
||||
(objectCase
|
||||
(keyw) @keyword.control.conditional
|
||||
(symbol) @variable.other.member)
|
||||
(objectBranch (keyw) @keyword.control.conditional)
|
||||
(objectElif (keyw) @keyword.control.conditional)
|
||||
(objectElse (keyw) @keyword.control.conditional)
|
||||
(objectWhen (keyw) @keyword.control.conditional)
|
||||
; variant objects
|
||||
|
||||
(conceptDecl (keyw) @keyword.storage.type)
|
||||
(conceptParam (keyw) @type)
|
||||
(conceptParam (symbol) @variable)
|
||||
; concept declarations, parameters, and qualifiers on those parameters
|
||||
|
||||
((expr
|
||||
(primary (symbol))
|
||||
(operator) @operator
|
||||
(primary (symbol) @type))
|
||||
(#match? @operator "is"))
|
||||
((exprStmt
|
||||
(primary (symbol))
|
||||
(operator) @operator
|
||||
(primary (symbol) @type))
|
||||
(#match? @operator "is"))
|
||||
; symbols likely to be types: "x is t" means t is either a type or a type variable
|
||||
|
||||
; distinct?
|
||||
|
||||
|
||||
;; Functions
|
||||
|
||||
(routine
|
||||
. (keyw) @keyword.function
|
||||
. (symbol) @function)
|
||||
; function declarations
|
||||
|
||||
(routineExpr (keyw) @keyword.function)
|
||||
; discarded function
|
||||
|
||||
(routineExprTypeDesc (keyw) @keyword.function)
|
||||
; function declarations as types
|
||||
|
||||
(primary
|
||||
. (symbol) @function.call
|
||||
. (primarySuffix (functionCall)))
|
||||
; regular function calls
|
||||
|
||||
(primary
|
||||
. (symbol) @function.call
|
||||
. (primarySuffix (cmdCall)))
|
||||
; function calls without parenthesis
|
||||
|
||||
(primary
|
||||
(primarySuffix (qualifiedSuffix (symbol) @function.call))
|
||||
. (primarySuffix (functionCall)))
|
||||
; uniform function call syntax calls
|
||||
|
||||
(primary
|
||||
(primarySuffix (qualifiedSuffix (symbol) @function.call))
|
||||
. (primarySuffix (cmdCall)))
|
||||
; just in case
|
||||
|
||||
(primary
|
||||
(symbol) @constructor
|
||||
(primarySuffix (objectConstr)))
|
||||
; object constructor
|
||||
|
||||
; does not appear to be a way to distinguish these without verbatium matching
|
||||
; [] @function.builtin
|
||||
; [] @function.method
|
||||
; [] @function.macro
|
||||
; [] @function.special
|
||||
|
||||
|
||||
;; Variables
|
||||
|
||||
(paramList (paramColonEquals (symbol) @variable.parameter))
|
||||
; parameter identifiers
|
||||
|
||||
(identColon (ident) @variable.other.member)
|
||||
; named parts of tuples
|
||||
|
||||
(symbolColonExpr (symbol) @variable)
|
||||
; object constructor parameters
|
||||
|
||||
(symbolEqExpr (symbol) @variable)
|
||||
; named parameters
|
||||
|
||||
(variable
|
||||
(keyw) @keyword.storage.type
|
||||
(declColonEquals (symbol) @variable))
|
||||
; let, var, const expressions
|
||||
|
||||
((primary (symbol) @variable.builtin)
|
||||
(#match? @variable.builtin "result"))
|
||||
; `result` is an implicit builtin variable inside function scopes
|
||||
|
||||
((primary (symbol) @type)
|
||||
(#match? @type "^[A-Z]"))
|
||||
; assume PascalCase identifiers to be types
|
||||
|
||||
((primary
|
||||
(primarySuffix
|
||||
(qualifiedSuffix
|
||||
(symbol) @type)))
|
||||
(#match? @type "^[A-Z]"))
|
||||
; assume PascalCase member variables to be enum entries
|
||||
|
||||
(primary (symbol) @variable)
|
||||
; overzealous, matches variables
|
||||
|
||||
(primary (primarySuffix (qualifiedSuffix (symbol) @variable.other.member)))
|
||||
; overzealous, matches member variables: i.e. x in foo.x
|
||||
|
||||
(keyw) @keyword
|
||||
; more specific matches are done above whenever possible
|
@ -0,0 +1,54 @@
|
||||
[
|
||||
(typeDef)
|
||||
(ifStmt)
|
||||
(whenStmt)
|
||||
(elifStmt)
|
||||
(elseStmt)
|
||||
(ofBranch) ; note: not caseStmt
|
||||
(whileStmt)
|
||||
(tryStmt)
|
||||
(tryExceptStmt)
|
||||
(tryFinallyStmt)
|
||||
(forStmt)
|
||||
(blockStmt)
|
||||
(staticStmt)
|
||||
(deferStmt)
|
||||
(asmStmt)
|
||||
; exprStmt?
|
||||
] @indent
|
||||
;; increase the indentation level
|
||||
|
||||
[
|
||||
(ifStmt)
|
||||
(whenStmt)
|
||||
(elifStmt)
|
||||
(elseStmt)
|
||||
(ofBranch) ; note: not caseStmt
|
||||
(whileStmt)
|
||||
(tryStmt)
|
||||
(tryExceptStmt)
|
||||
(tryFinallyStmt)
|
||||
(forStmt)
|
||||
(blockStmt)
|
||||
(staticStmt)
|
||||
(deferStmt)
|
||||
(asmStmt)
|
||||
; exprStmt?
|
||||
] @extend
|
||||
;; ???
|
||||
|
||||
[
|
||||
(returnStmt)
|
||||
(raiseStmt)
|
||||
(yieldStmt)
|
||||
(breakStmt)
|
||||
(continueStmt)
|
||||
] @extend.prevent-once
|
||||
;; end a level of indentation while staying indented
|
||||
|
||||
[
|
||||
")" ; tuples
|
||||
"]" ; arrays, seqs
|
||||
"}" ; sets
|
||||
] @outdent
|
||||
;; end a level of indentation and unindent the line
|
@ -0,0 +1,19 @@
|
||||
(routine
|
||||
(block) @function.inside) @function.around
|
||||
|
||||
; @class.inside (types?)
|
||||
; @class.around
|
||||
|
||||
; paramListSuffix is strange and i do not understand it
|
||||
(paramList
|
||||
(paramColonEquals) @parameter.inside) @parameter.around
|
||||
|
||||
(comment) @comment.inside
|
||||
(multilineComment) @comment.inside
|
||||
(docComment) @comment.inside
|
||||
(multilineDocComment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
(multilineComment) @comment.around
|
||||
(docComment)+ @comment.around
|
||||
(multilineDocComment) @comment.around
|
@ -0,0 +1,68 @@
|
||||
[
|
||||
(import)
|
||||
] @keyword.control.import
|
||||
|
||||
[
|
||||
(package)
|
||||
] @namespace
|
||||
|
||||
[
|
||||
(with)
|
||||
(as)
|
||||
(every)
|
||||
(some)
|
||||
(in)
|
||||
(default)
|
||||
"null"
|
||||
] @keyword.control
|
||||
|
||||
[
|
||||
(not)
|
||||
(if)
|
||||
(contains)
|
||||
(else)
|
||||
] @keyword.control.conditional
|
||||
|
||||
[
|
||||
(boolean)
|
||||
] @constant.builtin.boolean
|
||||
|
||||
[
|
||||
(assignment_operator)
|
||||
(bool_operator)
|
||||
(arith_operator)
|
||||
(bin_operator)
|
||||
] @operator
|
||||
|
||||
[
|
||||
(string)
|
||||
(raw_string)
|
||||
] @string
|
||||
|
||||
(term (ref (var))) @variable
|
||||
|
||||
(comment) @comment.line
|
||||
|
||||
(number) @constant.numeric.integer
|
||||
|
||||
(expr_call func_name: (fn_name (var) @function .))
|
||||
|
||||
(expr_call func_arguments: (fn_args (expr) @variable.parameter))
|
||||
|
||||
(rule_args (term) @variable.parameter)
|
||||
|
||||
[
|
||||
(open_paren)
|
||||
(close_paren)
|
||||
(open_bracket)
|
||||
(close_bracket)
|
||||
(open_curly)
|
||||
(close_curly)
|
||||
] @punctuation.bracket
|
||||
|
||||
(rule (rule_head (var) @function.method))
|
||||
|
||||
(rule
|
||||
(rule_head (term (ref (var) @namespace)))
|
||||
(rule_body (query (literal (expr (expr_infix (expr (term (ref (var)) @_output)))))) (#eq? @_output @namespace))
|
||||
)
|
@ -0,0 +1,2 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
@ -0,0 +1,21 @@
|
||||
(comment) @comment
|
||||
(ellipses) @punctuation.delimiter
|
||||
|
||||
(section_header) @keyword
|
||||
(extra_text) @comment
|
||||
|
||||
(setting_statement) @keyword
|
||||
|
||||
(variable_definition (variable_name) @variable)
|
||||
|
||||
(keyword_definition (name) @function)
|
||||
(keyword_definition (body (keyword_setting) @keyword))
|
||||
|
||||
(test_case_definition (name) @property)
|
||||
|
||||
(keyword_invocation (keyword) @function)
|
||||
|
||||
(argument (text_chunk) @string)
|
||||
(argument (scalar_variable) @string.special)
|
||||
(argument (list_variable) @string.special)
|
||||
(argument (dictionary_variable) @string.special)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue