mirror of https://github.com/helix-editor/helix
Merge remote-tracking branch 'origin/master' into goto_next_reference
commit
0190c48d41
Binary file not shown.
After Width: | Height: | Size: 264 KiB |
@ -1,10 +1,45 @@
|
||||
/// Syntax configuration loader based on built-in languages.toml.
|
||||
pub fn default_syntax_loader() -> crate::syntax::Configuration {
|
||||
use crate::syntax::{Configuration, Loader, LoaderError};
|
||||
|
||||
/// Language configuration based on built-in languages.toml.
|
||||
pub fn default_lang_config() -> Configuration {
|
||||
helix_loader::config::default_lang_config()
|
||||
.try_into()
|
||||
.expect("Could not serialize built-in languages.toml")
|
||||
.expect("Could not deserialize built-in languages.toml")
|
||||
}
|
||||
/// Syntax configuration loader based on user configured languages.toml.
|
||||
pub fn user_syntax_loader() -> Result<crate::syntax::Configuration, toml::de::Error> {
|
||||
|
||||
/// Language configuration loader based on built-in languages.toml.
|
||||
pub fn default_lang_loader() -> Loader {
|
||||
Loader::new(default_lang_config()).expect("Could not compile loader for default config")
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum LanguageLoaderError {
|
||||
DeserializeError(toml::de::Error),
|
||||
LoaderError(LoaderError),
|
||||
}
|
||||
|
||||
impl std::fmt::Display for LanguageLoaderError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::DeserializeError(err) => write!(f, "Failed to parse language config: {err}"),
|
||||
Self::LoaderError(err) => write!(f, "Failed to compile language config: {err}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for LanguageLoaderError {}
|
||||
|
||||
/// Language configuration based on user configured languages.toml.
|
||||
pub fn user_lang_config() -> Result<Configuration, toml::de::Error> {
|
||||
helix_loader::config::user_lang_config()?.try_into()
|
||||
}
|
||||
|
||||
/// Language configuration loader based on user configured languages.toml.
|
||||
pub fn user_lang_loader() -> Result<Loader, LanguageLoaderError> {
|
||||
let config: Configuration = helix_loader::config::user_lang_config()
|
||||
.map_err(LanguageLoaderError::DeserializeError)?
|
||||
.try_into()
|
||||
.map_err(LanguageLoaderError::DeserializeError)?;
|
||||
|
||||
Loader::new(config).map_err(LanguageLoaderError::LoaderError)
|
||||
}
|
||||
|
@ -0,0 +1,105 @@
|
||||
use std::path::Path;
|
||||
|
||||
use globset::{GlobBuilder, GlobSet};
|
||||
|
||||
use crate::lsp;
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub(crate) struct FileOperationFilter {
|
||||
dir_globs: GlobSet,
|
||||
file_globs: GlobSet,
|
||||
}
|
||||
|
||||
impl FileOperationFilter {
|
||||
fn new(capability: Option<&lsp::FileOperationRegistrationOptions>) -> FileOperationFilter {
|
||||
let Some(cap) = capability else {
|
||||
return FileOperationFilter::default();
|
||||
};
|
||||
let mut dir_globs = GlobSet::builder();
|
||||
let mut file_globs = GlobSet::builder();
|
||||
for filter in &cap.filters {
|
||||
// TODO: support other url schemes
|
||||
let is_non_file_schema = filter
|
||||
.scheme
|
||||
.as_ref()
|
||||
.is_some_and(|schema| schema != "file");
|
||||
if is_non_file_schema {
|
||||
continue;
|
||||
}
|
||||
let ignore_case = filter
|
||||
.pattern
|
||||
.options
|
||||
.as_ref()
|
||||
.and_then(|opts| opts.ignore_case)
|
||||
.unwrap_or(false);
|
||||
let mut glob_builder = GlobBuilder::new(&filter.pattern.glob);
|
||||
glob_builder.case_insensitive(!ignore_case);
|
||||
let glob = match glob_builder.build() {
|
||||
Ok(glob) => glob,
|
||||
Err(err) => {
|
||||
log::error!("invalid glob send by LS: {err}");
|
||||
continue;
|
||||
}
|
||||
};
|
||||
match filter.pattern.matches {
|
||||
Some(lsp::FileOperationPatternKind::File) => {
|
||||
file_globs.add(glob);
|
||||
}
|
||||
Some(lsp::FileOperationPatternKind::Folder) => {
|
||||
dir_globs.add(glob);
|
||||
}
|
||||
None => {
|
||||
file_globs.add(glob.clone());
|
||||
dir_globs.add(glob);
|
||||
}
|
||||
};
|
||||
}
|
||||
let file_globs = file_globs.build().unwrap_or_else(|err| {
|
||||
log::error!("invalid globs send by LS: {err}");
|
||||
GlobSet::empty()
|
||||
});
|
||||
let dir_globs = dir_globs.build().unwrap_or_else(|err| {
|
||||
log::error!("invalid globs send by LS: {err}");
|
||||
GlobSet::empty()
|
||||
});
|
||||
FileOperationFilter {
|
||||
dir_globs,
|
||||
file_globs,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn has_interest(&self, path: &Path, is_dir: bool) -> bool {
|
||||
if is_dir {
|
||||
self.dir_globs.is_match(path)
|
||||
} else {
|
||||
self.file_globs.is_match(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub(crate) struct FileOperationsInterest {
|
||||
// TODO: support other notifications
|
||||
// did_create: FileOperationFilter,
|
||||
// will_create: FileOperationFilter,
|
||||
pub did_rename: FileOperationFilter,
|
||||
pub will_rename: FileOperationFilter,
|
||||
// did_delete: FileOperationFilter,
|
||||
// will_delete: FileOperationFilter,
|
||||
}
|
||||
|
||||
impl FileOperationsInterest {
|
||||
pub fn new(capabilities: &lsp::ServerCapabilities) -> FileOperationsInterest {
|
||||
let capabilities = capabilities
|
||||
.workspace
|
||||
.as_ref()
|
||||
.and_then(|capabilities| capabilities.file_operations.as_ref());
|
||||
let Some(capabilities) = capabilities else {
|
||||
return FileOperationsInterest::default();
|
||||
};
|
||||
FileOperationsInterest {
|
||||
did_rename: FileOperationFilter::new(capabilities.did_rename.as_ref()),
|
||||
will_rename: FileOperationFilter::new(capabilities.will_rename.as_ref()),
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
; Operators
|
||||
|
||||
[
|
||||
"-"
|
||||
"!"
|
||||
"*"
|
||||
"/"
|
||||
"&&"
|
||||
"%"
|
||||
"+"
|
||||
"<"
|
||||
"<="
|
||||
"=="
|
||||
">"
|
||||
">="
|
||||
"||"
|
||||
] @operator
|
||||
|
||||
; Keywords
|
||||
|
||||
[
|
||||
"in"
|
||||
] @keyword
|
||||
|
||||
; Function calls
|
||||
|
||||
(call_expression
|
||||
function: (identifier) @function)
|
||||
|
||||
(member_call_expression
|
||||
function: (identifier) @function)
|
||||
|
||||
; Identifiers
|
||||
|
||||
(select_expression
|
||||
operand: (identifier) @type)
|
||||
|
||||
(select_expression
|
||||
operand: (select_expression
|
||||
member: (identifier) @type))
|
||||
|
||||
(identifier) @variable.other.member
|
||||
|
||||
; Literals
|
||||
|
||||
[
|
||||
(double_quote_string_literal)
|
||||
(single_quoted_string_literal)
|
||||
(triple_double_quote_string_literal)
|
||||
(triple_single_quoted_string_literal)
|
||||
] @string
|
||||
|
||||
[
|
||||
(int_literal)
|
||||
(uint_literal)
|
||||
] @constant.numeric.integer
|
||||
(float_literal) @constant.numeric.float
|
||||
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
] @constant.builtin.boolean
|
||||
|
||||
(null) @constant.builtin
|
||||
|
||||
(comment) @comment
|
@ -1,2 +1,14 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
|
||||
(call_expression
|
||||
(selector_expression) @_function
|
||||
(#any-of? @_function "regexp.Match" "regexp.MatchReader" "regexp.MatchString" "regexp.Compile" "regexp.CompilePOSIX" "regexp.MustCompile" "regexp.MustCompilePOSIX")
|
||||
(argument_list
|
||||
.
|
||||
[
|
||||
(raw_string_literal)
|
||||
(interpreted_string_literal)
|
||||
] @injection.content
|
||||
(#set! injection.language "regex")))
|
||||
|
@ -0,0 +1,32 @@
|
||||
(number) @constant.numeric
|
||||
|
||||
(string) @string
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
(coreTerminator)
|
||||
(seriesTerminator)
|
||||
] @punctuation.delimiter
|
||||
|
||||
|
||||
(rune) @keyword
|
||||
|
||||
(term) @constant
|
||||
|
||||
(aura) @constant.builtin
|
||||
|
||||
(Gap) @comment
|
||||
|
||||
(boolean) @constant.builtin
|
||||
|
||||
(date) @constant.builtin
|
||||
(mold) @constant.builtin
|
||||
(specialIndex) @constant.builtin
|
||||
(lark) @operator
|
||||
(fullContext) @constant.builtin
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,179 @@
|
||||
; Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
;
|
||||
; Licensed under the Apache License, Version 2.0 (the "License");
|
||||
; you may not use this file except in compliance with the License.
|
||||
; You may obtain a copy of the License at
|
||||
;
|
||||
; https://www.apache.org/licenses/LICENSE-2.0
|
||||
;
|
||||
; Unless required by applicable law or agreed to in writing, software
|
||||
; distributed under the License is distributed on an "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
; See the License for the specific language governing permissions and
|
||||
; limitations under the License.
|
||||
|
||||
; this definition is imprecise in that
|
||||
; * any qualified or unqualified call to a method named "Regex" is considered a regex
|
||||
; * string delimiters are considered part of the regex
|
||||
|
||||
; Operators
|
||||
|
||||
[
|
||||
"??"
|
||||
"@"
|
||||
"="
|
||||
"<"
|
||||
">"
|
||||
"!"
|
||||
"=="
|
||||
"!="
|
||||
"<="
|
||||
">="
|
||||
"&&"
|
||||
"||"
|
||||
"+"
|
||||
"-"
|
||||
"**"
|
||||
"*"
|
||||
"/"
|
||||
"~/"
|
||||
"%"
|
||||
"|>"
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
"?"
|
||||
"|"
|
||||
"->"
|
||||
] @operator.type
|
||||
|
||||
[
|
||||
","
|
||||
":"
|
||||
"."
|
||||
"?."
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
; "[" @punctuation.bracket TODO: FIGURE OUT HOW TO REFER TO CUSTOM TOKENS
|
||||
] @punctuation.bracket
|
||||
|
||||
; Keywords
|
||||
|
||||
[
|
||||
"abstract"
|
||||
"amends"
|
||||
"as"
|
||||
"class"
|
||||
"extends"
|
||||
"external"
|
||||
"function"
|
||||
"hidden"
|
||||
"import"
|
||||
"import*"
|
||||
"in"
|
||||
"let"
|
||||
"local"
|
||||
"module"
|
||||
"new"
|
||||
"open"
|
||||
"out"
|
||||
"typealias"
|
||||
"when"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"if"
|
||||
"is"
|
||||
"else"
|
||||
] @keyword.control.conditional
|
||||
|
||||
[
|
||||
"for"
|
||||
] @keyword.control.repeat
|
||||
|
||||
(importExpr "import" @keyword.control.import)
|
||||
(importGlobExpr "import*" @keyword.control.import)
|
||||
|
||||
"read" @function.builtin
|
||||
"read?" @function.builtin
|
||||
"read*" @function.builtin
|
||||
"throw" @function.builtin
|
||||
"trace" @function.builtin
|
||||
|
||||
(moduleExpr "module" @type.builtin)
|
||||
"nothing" @type.builtin
|
||||
"unknown" @type.builtin
|
||||
|
||||
(outerExpr) @variable.builtin
|
||||
"super" @variable.builtin
|
||||
(thisExpr) @variable.builtin
|
||||
|
||||
[
|
||||
(falseLiteral)
|
||||
(nullLiteral)
|
||||
(trueLiteral)
|
||||
] @constant.builtin
|
||||
|
||||
; Literals
|
||||
|
||||
(stringConstant) @string
|
||||
(slStringLiteral) @string
|
||||
(mlStringLiteral) @string
|
||||
|
||||
(escapeSequence) @constent.character.escape
|
||||
|
||||
(intLiteral) @constant.numeric.integer
|
||||
(floatLiteral) @constant.numeric.float
|
||||
|
||||
(interpolationExpr
|
||||
"\\(" @punctuation.special
|
||||
")" @punctuation.special) @embedded
|
||||
|
||||
(interpolationExpr
|
||||
"\\#(" @punctuation.special
|
||||
")" @punctuation.special) @embedded
|
||||
|
||||
(interpolationExpr
|
||||
"\\##(" @punctuation.special
|
||||
")" @punctuation.special) @embedded
|
||||
|
||||
(lineComment) @comment
|
||||
(blockComment) @comment
|
||||
(docComment) @comment
|
||||
|
||||
; Identifiers
|
||||
|
||||
(classProperty (identifier) @variable.other.member)
|
||||
(objectProperty (identifier) @variable.other.member)
|
||||
|
||||
(parameterList (typedIdentifier (identifier) @variable.parameter))
|
||||
(objectBodyParameters (typedIdentifier (identifier) @variable.parameter))
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
; Method definitions
|
||||
|
||||
(classMethod (methodHeader (identifier)) @function.method)
|
||||
(objectMethod (methodHeader (identifier)) @function.method)
|
||||
|
||||
; Method calls
|
||||
|
||||
(methodCallExpr
|
||||
(identifier) @function.method)
|
||||
|
||||
; Types
|
||||
|
||||
(clazz (identifier) @type)
|
||||
(typeAlias (identifier) @type)
|
||||
((identifier) @type
|
||||
(match? @type "^[A-Z]"))
|
||||
|
||||
(typeArgumentList
|
||||
"<" @punctuation.bracket
|
||||
">" @punctuation.bracket)
|
@ -0,0 +1,23 @@
|
||||
; Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
;
|
||||
; Licensed under the Apache License, Version 2.0 (the "License");
|
||||
; you may not use this file except in compliance with the License.
|
||||
; You may obtain a copy of the License at
|
||||
;
|
||||
; https://www.apache.org/licenses/LICENSE-2.0
|
||||
;
|
||||
; Unless required by applicable law or agreed to in writing, software
|
||||
; distributed under the License is distributed on an "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
; See the License for the specific language governing permissions and
|
||||
; limitations under the License.
|
||||
|
||||
; this definition is imprecise in that
|
||||
; * any qualified or unqualified call to a method named "Regex" is considered a regex
|
||||
; * string delimiters are considered part of the regex
|
||||
[
|
||||
(objectBody)
|
||||
(classBody)
|
||||
(ifExpr)
|
||||
(mlStringLiteral) ; This isn't perfect; newlines are too indented but it's better than if omitted.
|
||||
] @indent
|
@ -0,0 +1,30 @@
|
||||
; Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
;
|
||||
; Licensed under the Apache License, Version 2.0 (the "License");
|
||||
; you may not use this file except in compliance with the License.
|
||||
; You may obtain a copy of the License at
|
||||
;
|
||||
; https://www.apache.org/licenses/LICENSE-2.0
|
||||
;
|
||||
; Unless required by applicable law or agreed to in writing, software
|
||||
; distributed under the License is distributed on an "AS IS" BASIS,
|
||||
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
; See the License for the specific language governing permissions and
|
||||
; limitations under the License.
|
||||
|
||||
; this definition is imprecise in that
|
||||
; * any qualified or unqualified call to a method named "Regex" is considered a regex
|
||||
; * string delimiters are considered part of the regex
|
||||
(
|
||||
((methodCallExpr (identifier) @methodName (argumentList (slStringLiteral) @injection.content))
|
||||
(#set! injection.language "regex"))
|
||||
(eq? @methodName "Regex"))
|
||||
|
||||
((lineComment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((blockComment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((docComment) @injection.content
|
||||
(#set! injection.language "markdown"))
|
@ -1,2 +1,16 @@
|
||||
((comment) @injection.content
|
||||
([(comment) (block_comment)] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
|
||||
; TODO for some reason multiline string (triple quotes) interpolation works only if it contains interpolated value
|
||||
; Matches these SQL interpolators:
|
||||
; - Doobie: 'sql', 'fr'
|
||||
; - Quill: 'sql', 'infix'
|
||||
; - Slick: 'sql', 'sqlu'
|
||||
(interpolated_string_expression
|
||||
interpolator:
|
||||
((identifier) @interpolator
|
||||
(#any-of? @interpolator "fr" "infix" "sql" "sqlu"))
|
||||
(interpolated_string) @injection.content
|
||||
(#set! injection.language "sql"))
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
[
|
||||
(comp_body)
|
||||
(state_statement)
|
||||
(transition_statement)
|
||||
(handler_body)
|
||||
(consequence_body)
|
||||
(global_single)
|
||||
(anon_struct_block)
|
||||
(assignment_block)
|
||||
(block)
|
||||
(enum_block)
|
||||
(global_block)
|
||||
(imperative_block)
|
||||
(struct_block)
|
||||
] @indent
|
||||
|
||||
[
|
||||
"}"
|
||||
] @outdent
|
||||
"}" @outdent
|
||||
|
@ -1,3 +1,6 @@
|
||||
; locals.scm
|
||||
|
||||
(component_item) @local.scope
|
||||
[
|
||||
(component)
|
||||
(component_definition)
|
||||
(function_definition)
|
||||
(imperative_block)
|
||||
] @local.scope
|
||||
|
@ -0,0 +1,35 @@
|
||||
(function_definition
|
||||
(imperative_block) @funtion.inside) @function.around
|
||||
|
||||
(callback_event
|
||||
(imperative_block) @function.inside) @function.around
|
||||
|
||||
(property
|
||||
(imperative_block) @function.inside) @function.around
|
||||
|
||||
(struct_definition
|
||||
(struct_block) @class.inside) @class.around
|
||||
|
||||
(enum_definition
|
||||
(enum_block) @class.inside) @class.around
|
||||
|
||||
(global_definition
|
||||
(global_block) @class.inside) @class.around
|
||||
|
||||
(component_definition
|
||||
(block) @class.inside) @class.around
|
||||
|
||||
(component_definition
|
||||
(block) @class.inside) @class.around
|
||||
|
||||
(comment) @comment.around
|
||||
|
||||
(typed_identifier
|
||||
name: (_) @parameter.inside) @parameter.around
|
||||
|
||||
(callback
|
||||
arguments: (_) @parameter.inside)
|
||||
|
||||
(string_value
|
||||
"\"" . (_) @text.inside . "\"") @text.around
|
||||
|
@ -0,0 +1,47 @@
|
||||
; highlights.scm
|
||||
|
||||
[
|
||||
"definition"
|
||||
"caveat"
|
||||
"permission"
|
||||
"relation"
|
||||
"nil"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
","
|
||||
":"
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
"|"
|
||||
"+"
|
||||
"-"
|
||||
"&"
|
||||
"#"
|
||||
"->"
|
||||
"="
|
||||
] @operator
|
||||
("with") @keyword.operator
|
||||
|
||||
[
|
||||
"nil"
|
||||
"*"
|
||||
] @constant.builtin
|
||||
|
||||
(comment) @comment
|
||||
(type_identifier) @type
|
||||
(cel_type_identifier) @type
|
||||
(cel_variable_identifier) @variable.parameter
|
||||
(field_identifier) @variable.other.member
|
||||
[
|
||||
(func_identifier)
|
||||
(method_identifier)
|
||||
] @function.method
|
@ -0,0 +1,5 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((caveat_expr) @injection.content
|
||||
(#set! injection.language "cel"))
|
@ -0,0 +1,4 @@
|
||||
(object_definition
|
||||
name: (type_identifier) @name) @definition.type
|
||||
|
||||
(type_identifier) @name @reference.type
|
@ -0,0 +1,298 @@
|
||||
; See: https://docs.helix-editor.com/master/themes.html#syntax-highlighting
|
||||
; -------------------------------------------------------------------------
|
||||
|
||||
; attribute
|
||||
; ---------
|
||||
|
||||
[
|
||||
"@name"
|
||||
"@interface"
|
||||
] @attribute
|
||||
|
||||
; comment.line
|
||||
; ------------
|
||||
|
||||
((comment) @comment.line
|
||||
(#match? @comment.line "^//"))
|
||||
|
||||
; comment.block
|
||||
; -------------
|
||||
|
||||
(comment) @comment.block
|
||||
|
||||
; function.builtin
|
||||
; ----------------
|
||||
|
||||
((identifier) @function.builtin
|
||||
(#any-of? @function.builtin
|
||||
"send" "sender" "require" "now"
|
||||
"myBalance" "myAddress" "newAddress"
|
||||
"contractAddress" "contractAddressExt"
|
||||
"emit" "cell" "ton"
|
||||
"beginString" "beginComment" "beginTailString" "beginStringFromBuilder" "beginCell" "emptyCell"
|
||||
"randomInt" "random"
|
||||
"checkSignature" "checkDataSignature" "sha256"
|
||||
"min" "max" "abs" "pow"
|
||||
"throw" "dump" "getConfigParam"
|
||||
"nativeThrowWhen" "nativeThrowUnless" "nativeReserve"
|
||||
"nativeRandomize" "nativeRandomizeLt" "nativePrepareRandom" "nativeRandom" "nativeRandomInterval")
|
||||
(#is-not? local))
|
||||
|
||||
; function.method
|
||||
; ---------------
|
||||
|
||||
(method_call_expression
|
||||
name: (identifier) @function.method)
|
||||
|
||||
; function
|
||||
; --------
|
||||
|
||||
(func_identifier) @function
|
||||
|
||||
(native_function
|
||||
name: (identifier) @function)
|
||||
|
||||
(static_function
|
||||
name: (identifier) @function)
|
||||
|
||||
(static_call_expression
|
||||
name: (identifier) @function)
|
||||
|
||||
(init_function
|
||||
"init" @function.method)
|
||||
|
||||
(receive_function
|
||||
"receive" @function.method)
|
||||
|
||||
(bounced_function
|
||||
"bounced" @function.method)
|
||||
|
||||
(external_function
|
||||
"external" @function.method)
|
||||
|
||||
(function
|
||||
name: (identifier) @function.method)
|
||||
|
||||
; keyword.control.conditional
|
||||
; ---------------------------
|
||||
|
||||
[
|
||||
"if" "else"
|
||||
] @keyword.control.conditional
|
||||
|
||||
; keyword.control.repeat
|
||||
; ----------------------
|
||||
|
||||
[
|
||||
"while" "repeat" "do" "until"
|
||||
] @keyword.control.repeat
|
||||
|
||||
; keyword.control.import
|
||||
; ----------------------
|
||||
|
||||
"import" @keyword.control.import
|
||||
|
||||
; keyword.control.return
|
||||
; ----------------------
|
||||
|
||||
"return" @keyword.control.return
|
||||
|
||||
; keyword.operator
|
||||
; ----------------
|
||||
|
||||
"initOf" @keyword.operator
|
||||
|
||||
; keyword.directive
|
||||
; -----------------
|
||||
|
||||
"primitive" @keyword.directive
|
||||
|
||||
; keyword.function
|
||||
; ----------------
|
||||
|
||||
[
|
||||
"fun"
|
||||
"native"
|
||||
] @keyword.function
|
||||
|
||||
; keyword.storage.type
|
||||
; --------------------
|
||||
|
||||
[
|
||||
"contract" "trait" "struct" "message" "with"
|
||||
"const" "let"
|
||||
] @keyword.storage.type
|
||||
|
||||
; keyword.storage.modifier
|
||||
; ------------------------
|
||||
|
||||
[
|
||||
"get" "mutates" "extends" "virtual" "override" "inline" "abstract"
|
||||
] @keyword.storage.modifier
|
||||
|
||||
; keyword
|
||||
; -------
|
||||
|
||||
[
|
||||
"with"
|
||||
; "public" ; -- not used, but declared in grammar.ohm
|
||||
; "extend" ; -- not used, but declared in grammar.ohm
|
||||
] @keyword
|
||||
|
||||
; constant.builtin.boolean
|
||||
; ------------------------
|
||||
|
||||
(boolean) @constant.builtin.boolean
|
||||
|
||||
; constant.builtin
|
||||
; ----------------
|
||||
|
||||
((identifier) @constant.builtin
|
||||
(#any-of? @constant.builtin
|
||||
"SendPayGasSeparately"
|
||||
"SendIgnoreErrors"
|
||||
"SendDestroyIfZero"
|
||||
"SendRemainingValue"
|
||||
"SendRemainingBalance")
|
||||
(#is-not? local))
|
||||
|
||||
(null) @constant.builtin
|
||||
|
||||
; constant.numeric.integer
|
||||
; ------------------------
|
||||
|
||||
(integer) @constant.numeric.integer
|
||||
|
||||
; constant
|
||||
; --------
|
||||
|
||||
(constant
|
||||
name: (identifier) @constant)
|
||||
|
||||
; string.special.path
|
||||
; -------------------
|
||||
|
||||
(import_statement
|
||||
library: (string) @string.special.path)
|
||||
|
||||
; string
|
||||
; ------
|
||||
|
||||
(string) @string
|
||||
|
||||
; type.builtin
|
||||
; ------------
|
||||
|
||||
(tlb_serialization
|
||||
"as" @keyword
|
||||
type: (identifier) @type.builtin
|
||||
(#any-of? @type.builtin
|
||||
"int8" "int16" "int32" "int64" "int128" "int256" "int257"
|
||||
"uint8" "uint16" "uint32" "uint64" "uint128" "uint256"
|
||||
"coins" "remaining" "bytes32" "bytes64"))
|
||||
|
||||
((type_identifier) @type.builtin
|
||||
(#any-of? @type.builtin
|
||||
"Address" "Bool" "Builder" "Cell" "Int" "Slice" "String" "StringBuilder"))
|
||||
|
||||
(map_type
|
||||
"map" @type.builtin
|
||||
"<" @punctuation.bracket
|
||||
">" @punctuation.bracket)
|
||||
|
||||
(bounced_type
|
||||
"bounced" @type.builtin
|
||||
"<" @punctuation.bracket
|
||||
">" @punctuation.bracket)
|
||||
|
||||
((identifier) @type.builtin
|
||||
(#eq? @type.builtin "SendParameters")
|
||||
(#is-not? local))
|
||||
|
||||
; type
|
||||
; ----
|
||||
|
||||
(type_identifier) @type
|
||||
|
||||
; constructor
|
||||
; -----------
|
||||
|
||||
(instance_expression
|
||||
name: (identifier) @constructor)
|
||||
|
||||
(initOf
|
||||
name: (identifier) @constructor)
|
||||
|
||||
; operator
|
||||
; --------
|
||||
|
||||
[
|
||||
"-" "-="
|
||||
"+" "+="
|
||||
"*" "*="
|
||||
"/" "/="
|
||||
"%" "%="
|
||||
"=" "=="
|
||||
"!" "!=" "!!"
|
||||
"<" "<=" "<<"
|
||||
">" ">=" ">>"
|
||||
"&" "|"
|
||||
"&&" "||"
|
||||
] @operator
|
||||
|
||||
; punctuation.bracket
|
||||
; -------------------
|
||||
|
||||
[
|
||||
"(" ")"
|
||||
"{" "}"
|
||||
] @punctuation.bracket
|
||||
|
||||
; punctuation.delimiter
|
||||
; ---------------------
|
||||
|
||||
[
|
||||
";"
|
||||
","
|
||||
"."
|
||||
":"
|
||||
"?"
|
||||
] @punctuation.delimiter
|
||||
|
||||
; variable.other.member
|
||||
; ---------------------
|
||||
|
||||
(field
|
||||
name: (identifier) @variable.other.member)
|
||||
|
||||
(contract_body
|
||||
(constant
|
||||
name: (identifier) @variable.other.member))
|
||||
|
||||
(trait_body
|
||||
(constant
|
||||
name: (identifier) @variable.other.member))
|
||||
|
||||
(field_access_expression
|
||||
name: (identifier) @variable.other.member)
|
||||
|
||||
(lvalue (_) (_) @variable.other.member)
|
||||
|
||||
(instance_argument
|
||||
name: (identifier) @variable.other.member)
|
||||
|
||||
; variable.parameter
|
||||
; ------------------
|
||||
|
||||
(parameter
|
||||
name: (identifier) @variable.parameter)
|
||||
|
||||
; variable.builtin
|
||||
; ----------------
|
||||
|
||||
(self) @variable.builtin
|
||||
|
||||
; variable
|
||||
; --------
|
||||
|
||||
(identifier) @variable
|
@ -0,0 +1,38 @@
|
||||
; indent
|
||||
; ------
|
||||
|
||||
[
|
||||
; (..., ...)
|
||||
(parameter_list)
|
||||
(argument_list)
|
||||
|
||||
; {..., ...}
|
||||
(instance_argument_list)
|
||||
|
||||
; {...; ...}
|
||||
(message_body)
|
||||
(struct_body)
|
||||
(contract_body)
|
||||
(trait_body)
|
||||
(function_body)
|
||||
(block_statement)
|
||||
|
||||
; misc.
|
||||
(binary_expression)
|
||||
(return_statement)
|
||||
] @indent
|
||||
|
||||
; outdent
|
||||
; -------
|
||||
|
||||
[
|
||||
"}"
|
||||
")"
|
||||
">"
|
||||
] @outdent
|
||||
|
||||
; indent.always
|
||||
; outdent.always
|
||||
; align
|
||||
; extend
|
||||
; extend.prevent-once
|
@ -0,0 +1,5 @@
|
||||
; See: https://docs.helix-editor.com/guides/injection.html
|
||||
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment")
|
||||
(#match? @injection.content "^//"))
|
@ -0,0 +1,35 @@
|
||||
; See: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables
|
||||
|
||||
; Scopes @local.scope
|
||||
; -------------------------
|
||||
|
||||
[
|
||||
(static_function)
|
||||
(init_function)
|
||||
(bounced_function)
|
||||
(receive_function)
|
||||
(external_function)
|
||||
(function)
|
||||
(block_statement)
|
||||
] @local.scope
|
||||
|
||||
; Definitions @local.definition
|
||||
; ------------------------------
|
||||
|
||||
(let_statement
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(parameter
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
(constant
|
||||
name: (identifier) @local.definition)
|
||||
|
||||
; References @local.reference
|
||||
; -----------------------------
|
||||
|
||||
(self) @local.reference
|
||||
|
||||
(value_expression (identifier) @local.reference)
|
||||
|
||||
(lvalue (identifier) @local.reference)
|
@ -0,0 +1,58 @@
|
||||
; function.inside & around
|
||||
; ------------------------
|
||||
|
||||
(static_function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(init_function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(bounced_function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(receive_function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(external_function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
; class.inside & around
|
||||
; ---------------------
|
||||
|
||||
(struct
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(message
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
(contract
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
; NOTE: Marked as @definition.interface in tags, as it's semantically correct
|
||||
(trait
|
||||
body: (_) @class.inside) @class.around
|
||||
|
||||
; parameter.inside & around
|
||||
; -------------------------
|
||||
|
||||
(parameter_list
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(argument_list
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(instance_argument_list
|
||||
((_) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
; comment.inside
|
||||
; --------------
|
||||
|
||||
(comment) @comment.inside
|
||||
|
||||
; comment.around
|
||||
; --------------
|
||||
|
||||
(comment)+ @comment.around
|
@ -0,0 +1,15 @@
|
||||
[
|
||||
(term_definition)
|
||||
(type_declaration)
|
||||
(pattern)
|
||||
(tuple_or_parenthesized)
|
||||
(literal_list)
|
||||
(tuple_pattern)
|
||||
(function_application)
|
||||
(exp_if)
|
||||
(constructor)
|
||||
(delay_block)
|
||||
(type_signature)
|
||||
] @indent
|
||||
|
||||
[(kw_then) (kw_else) (cases)] @indent.always @extend
|
@ -0,0 +1,118 @@
|
||||
attribute_color = "attribute_color"
|
||||
keyword = "keyword_foreground_color"
|
||||
"keyword.directive" = "light_blue"
|
||||
namespace = "light_blue"
|
||||
punctuation = "punctuation_color"
|
||||
"punctuation.delimiter" = "punctuation_color"
|
||||
operator = "operator_color"
|
||||
special = "label"
|
||||
"variable.other.member" = "white"
|
||||
variable = "variable"
|
||||
"variable.parameter" = { fg = "variable" }
|
||||
"variable.builtin" = {fg = "built_in", modifiers=["bold","italic"]}
|
||||
type = "white"
|
||||
"type.builtin" = "white"
|
||||
constructor = "light_blue"
|
||||
function = "white"
|
||||
"function.macro" = {fg ="light_blue" }
|
||||
"function.builtin" = "white"
|
||||
tag = "tag"
|
||||
comment = { fg = "comment_color", modifiers = ["italic"] }
|
||||
constant = {fg ="white"}
|
||||
"constant.builtin" = "white"
|
||||
string = {fg="string", modifiers=["italic"]}
|
||||
"constant.numeric" = "constant_numeric_foreground_color"
|
||||
"constant.character.escape" = "label"
|
||||
# used for lifetimes
|
||||
label = "label"
|
||||
|
||||
"markup.heading" = "light_blue"
|
||||
"markup.bold" = { modifiers = ["bold"] }
|
||||
"markup.italic" = { modifiers = ["italic"] }
|
||||
"markup.strikethrough" = { modifiers = ["crossed_out"] }
|
||||
"markup.link.url" = { fg = "link_url_foreground_color", modifiers = ["underlined"] }
|
||||
"markup.link.text" = "markup_link_foreground_color"
|
||||
"markup.raw" = "markup_raw_foreground_color"
|
||||
|
||||
"diff.plus" = "#35bf86"
|
||||
"diff.minus" = "#f22c86"
|
||||
"diff.delta" = "info"
|
||||
|
||||
"ui.background" = { bg = "black" }
|
||||
"ui.background.separator" = { fg = "window_color" }
|
||||
"ui.linenr" = { fg = "window_color" }
|
||||
"ui.linenr.selected" = { fg = "light_blue" }
|
||||
"ui.statusline" = { fg = "statusline_foreground_color", bg = "black" }
|
||||
"ui.statusline.inactive" = { fg = "statusline_inactive_foreground_color", bg = "black" }
|
||||
"ui.virtual.ruler" = { bg = "dark"}
|
||||
|
||||
"ui.popup" = { fg = "menu_normal_text_color", bg = "menu_background_color" }
|
||||
"ui.window" = { fg = "dark"}
|
||||
"ui.help" = { fg = "menu_normal_text_color", bg = "menu_background_color" }
|
||||
|
||||
"ui.text" = { fg = "text" }
|
||||
"ui.text.focus" = { fg = "white" }
|
||||
"ui.text.inactive" = "comment_color"
|
||||
"ui.virtual" = { fg = "#008DFF" }
|
||||
|
||||
"ui.virtual.indent-guide" = { fg = "window_color" }
|
||||
|
||||
"ui.selection" = { bg = "#4f46e5" }
|
||||
"ui.selection.primary" = { bg = "#4f46e5" }
|
||||
"ui.cursor.select" = { bg = "cursor_normal_bg_color" }
|
||||
"ui.cursor.primary.insert" = { bg = "#f43f5e", fg = "white" }
|
||||
"ui.cursor.match" = { fg = "#212121", bg = "#6C6999" }
|
||||
"ui.cursorline.primary" = { bg = "dark"}
|
||||
"ui.highlight" = { bg = "dark" }
|
||||
"ui.highlight.frameline" = { bg = "#634450" }
|
||||
"ui.debug" = { fg = "#634450" }
|
||||
"ui.debug.breakpoint" = { fg = "debug_breakpoint" }
|
||||
"ui.menu" = { fg = "menu_normal_text_color", bg = "menu_background_color" }
|
||||
"ui.menu.selected" = { fg = "menu_background_color", bg = "white" }
|
||||
"ui.menu.scroll" = { fg = "menu_scroll", bg = "window_color" }
|
||||
|
||||
"diagnostic.hint" = { underline = { color = "hint", style = "curl" } }
|
||||
"diagnostic.info" = { underline = { color = "info", style = "curl" } }
|
||||
"diagnostic.warning" = { underline = { color = "warning", style = "curl" } }
|
||||
"diagnostic.error" = { underline = { color = "error", style = "curl" } }
|
||||
|
||||
warning = "warning"
|
||||
error = "#f43f5e"
|
||||
info = "info"
|
||||
hint = "#38bdf8"
|
||||
|
||||
[palette]
|
||||
label = "#efba5d"
|
||||
constant_numeric_foreground_color = "#E8DCA0"
|
||||
tag = "#eccdba"
|
||||
markup_link_foreground_color = "#eccdba"
|
||||
markup_raw_foreground_color = "#eccdba"
|
||||
keyword_foreground_color="#eccdba" # alternative color "#ecc1ba"
|
||||
comment_color = "#697C81"
|
||||
link_url_foreground_color="#b8b8b8"
|
||||
debug_breakpoint = "#f47868"
|
||||
window_color = "#484a4d"
|
||||
light_blue = "#bee0ec" #change name
|
||||
text="#bfdbfe"
|
||||
black = "#000000"
|
||||
white = "#ffffff"
|
||||
dark= "#111111"
|
||||
punctuation_color = "#a4a0e8"
|
||||
string="#6ee7b7"
|
||||
attribute_color="#dbbfef"
|
||||
operator_color="#bee0ec"
|
||||
menu_background_color="#1e3a8a"
|
||||
menu_normal_text_color="#93c5fd"
|
||||
statusline_active_background_color="#111111"
|
||||
statusline_inactive_background_color="#0e0e0e"
|
||||
statusline_inactive_foreground_color="#b8b8b8"
|
||||
popup_background_color="#1e3a8a"
|
||||
cursor_normal_bg_color="#6366f1"
|
||||
warning="#ffcd1c"
|
||||
error = "#f43f5e"
|
||||
hint = "#38bdf8"
|
||||
info = "#6366f1"
|
||||
variable="#c7d2fe"
|
||||
menu_scroll="#93c5fd"
|
||||
built_in="#10b981"
|
||||
statusline_foreground_color="#6366f1"
|
@ -0,0 +1,7 @@
|
||||
# Author : Twinkle <saintwinkle@gmail.com>
|
||||
# The theme uses the gruvbox light palette with hard contrast: github.com/morhetz/gruvbox
|
||||
|
||||
inherits = "gruvbox_light"
|
||||
|
||||
[palette]
|
||||
bg0 = "#f9f5d7" # main background
|
@ -0,0 +1,7 @@
|
||||
# Author : Twinkle <saintwinkle@gmail.com>
|
||||
# The theme uses the gruvbox light palette with soft contrast: github.com/morhetz/gruvbox
|
||||
|
||||
inherits = "gruvbox_light"
|
||||
|
||||
[palette]
|
||||
bg0 = "#f2e5bc" # main background
|
@ -0,0 +1,80 @@
|
||||
# Author: dgkf
|
||||
|
||||
"ui.background" = { }
|
||||
"ui.background.separator" = { fg = "red" }
|
||||
"ui.cursor" = { fg = "light-gray", modifiers = ["reversed"] }
|
||||
"ui.cursor.match" = { fg = "light-yellow", modifiers = ["reversed"] }
|
||||
"ui.cursor.primary" = { fg = "light-gray", modifiers = ["reversed"] }
|
||||
"ui.cursor.secondary" = { fg = "gray", modifiers = ["reversed"] }
|
||||
"ui.cursorline.primary" = { bg = "black" }
|
||||
"ui.gutter" = { }
|
||||
"ui.gutter.selected" = { bg = "black" }
|
||||
"ui.help" = { fg = "white", bg = "black" }
|
||||
"ui.linenr" = { fg = "gray", modifiers = ["bold"] }
|
||||
"ui.linenr.selected" = { fg = "white", modifiers = ["bold"] }
|
||||
"ui.menu" = { fg = "light-gray", bg = "gray" }
|
||||
"ui.menu.selected" = { modifiers = ["reversed"] }
|
||||
"ui.menu.scroll" = { fg = "light-blue" }
|
||||
"ui.popup" = { bg = "black" }
|
||||
"ui.selection" = { bg = "gray" }
|
||||
"ui.statusline" = { fg = "light-gray", bg = "gray" }
|
||||
"ui.statusline.inactive" = { bg = "black" }
|
||||
"ui.virtual" = { bg = "black" }
|
||||
"ui.virtual.indent-guide" = { fg = "gray" }
|
||||
"ui.virtual.whitespace" = {}
|
||||
"ui.virtual.wrap" = { fg = "gray" }
|
||||
"ui.virtual.inlay-hint" = { fg = "light-gray", modifiers = ["dim", "italic"] }
|
||||
"ui.virtual.inlay-hint.parameter" = { fg = "yellow", modifiers = ["dim", "italic"] }
|
||||
"ui.virtual.inlay-hint.type" = { fg = "blue", modifiers = ["dim", "italic"] }
|
||||
"ui.window" = { fg = "gray", modifiers = ["dim"] }
|
||||
|
||||
"comment" = { fg = "light-gray", modifiers = ["italic", "dim"] }
|
||||
|
||||
"attribute" = "light-yellow"
|
||||
"constant" = { fg = "light-yellow", modifiers = ["bold", "dim"] }
|
||||
"constant.numeric" = "light-yellow"
|
||||
"constant.character.escape" = "light-cyan"
|
||||
"constructor" = "light-blue"
|
||||
"function" = "light-blue"
|
||||
"function.macro" = "light-red"
|
||||
"function.builtin" = { fg = "light-blue", modifiers = ["bold"] }
|
||||
"tag" = { fg = "light-magenta", modifiers = ["dim"] }
|
||||
"type" = "blue"
|
||||
"type.builtin" = { fg = "blue", modifiers = ["bold"] }
|
||||
"type.enum.variant" = { fg = "light-magenta", modifiers = ["dim"] }
|
||||
"string" = "light-green"
|
||||
"special" = "light-red"
|
||||
"variable" = "white"
|
||||
"variable.parameter" = { fg = "light-yellow", modifiers = ["italic"] }
|
||||
"variable.other.member" = "light-green"
|
||||
"keyword" = "light-magenta"
|
||||
"keyword.control.exception" = "light-red"
|
||||
"keyword.directive" = { fg = "light-yellow", modifiers = ["bold"] }
|
||||
"keyword.operator" = { fg = "light-blue", modifiers = ["bold"] }
|
||||
"label" = "light-green"
|
||||
"namespace" = { fg = "blue", modifiers = ["dim"] }
|
||||
|
||||
"markup.heading" = "light-blue"
|
||||
"markup.list" = "light-red"
|
||||
"markup.bold" = { fg = "light-cyan", modifiers = ["bold"] }
|
||||
"markup.italic" = { fg = "light-blue", modifiers = ["italic"] }
|
||||
"markup.strikethrough" = { modifiers = ["crossed_out"] }
|
||||
"markup.link.url" = { fg = "magenta", modifiers = ["dim"] }
|
||||
"markup.link.text" = "light-magenta"
|
||||
"markup.quote" = "light-cyan"
|
||||
"markup.raw" = "light-green"
|
||||
|
||||
"diff.plus" = "light-green"
|
||||
"diff.delta" = "light-yellow"
|
||||
"diff.minus" = "light-red"
|
||||
|
||||
"diagnostic.hint" = { underline = { color = "gray", style = "curl" } }
|
||||
"diagnostic.info" = { underline = { color = "light-cyan", style = "curl" } }
|
||||
"diagnostic.warning" = { underline = { color = "light-yellow", style = "curl" } }
|
||||
"diagnostic.error" = { underline = { color = "light-red", style = "curl" } }
|
||||
|
||||
"info" = "light-cyan"
|
||||
"hint" = { fg = "light-gray", modifiers = ["dim"] }
|
||||
"debug" = "white"
|
||||
"warning" = "yellow"
|
||||
"error" = "light-red"
|
@ -0,0 +1,85 @@
|
||||
# Author: dgkf
|
||||
# Modified from base16_terminal, Author: NNB <nnbnh@protonmail.com>
|
||||
|
||||
inherits = "term16_dark"
|
||||
|
||||
"ui.background.separator" = "light-gray"
|
||||
"ui.cursor" = { fg = "gray", modifiers = ["reversed"] }
|
||||
"ui.cursor.match" = { fg = "yellow", modifiers = ["reversed"] }
|
||||
"ui.cursor.primary" = { fg = "black", modifiers = ["reversed"] }
|
||||
"ui.cursor.secondary" = { fg = "gray", modifiers = ["reversed"] }
|
||||
"ui.cursorline.primary" = { bg = "white" }
|
||||
"ui.cursorline.secondary" = { bg = "white" }
|
||||
"ui.cursorcolumn.primary" = { bg = "white" }
|
||||
"ui.cursorcolumn.secondary" = { bg = "white" }
|
||||
"ui.gutter" = { }
|
||||
"ui.gutter.selected" = { bg = "white" }
|
||||
"ui.linenr" = { fg = "gray", modifiers = ["dim"] }
|
||||
"ui.linenr.selected" = { fg = "black", modifiers = ["bold"] }
|
||||
"ui.menu" = { bg = "light-gray" }
|
||||
"ui.menu.selected" = { fg = "white", bg = "gray", modifiers = ["bold"] }
|
||||
"ui.menu.scroll" = { fg = "light-blue" }
|
||||
"ui.help" = { }
|
||||
"ui.text" = { }
|
||||
"ui.text.focus" = { }
|
||||
"ui.popup" = { bg = "white" }
|
||||
"ui.selection" = { bg = "light-gray" }
|
||||
"ui.statusline" = { bg = "white" }
|
||||
"ui.statusline.inactive" = { fg = "gray", modifiers = ["underlined"] }
|
||||
"ui.statusline.insert" = { fg = "white", bg = "blue" }
|
||||
"ui.statusline.select" = { fg = "white", bg = "magenta" }
|
||||
"ui.virtual" = { fg = "light-gray" }
|
||||
"ui.virtual.indent-guide" = { fg = "light-gray", modifiers = ["dim"] }
|
||||
"ui.virtual.ruler" = { bg = "white" }
|
||||
"ui.virtual.wrap" = { fg = "light-gray" }
|
||||
"ui.window" = { fg = "gray", modifiers = ["dim"] }
|
||||
|
||||
"comment" = { fg = "gray", modifiers = ["italic", "dim"] }
|
||||
|
||||
"attribute" = "yellow"
|
||||
"constant" = { fg = "yellow", modifiers = ["bold"] }
|
||||
"constant.numeric" = { fg = "yellow", modifiers = ["bold"] }
|
||||
"constant.character.escape" = "blue"
|
||||
"constructor" = "blue"
|
||||
"function" = "blue"
|
||||
"function.builtin" = { fg = "blue", modifiers = ["bold"] }
|
||||
"tag" = { fg = "magenta", modifiers = ["dim"] }
|
||||
"type" = "blue"
|
||||
"type.builtin" = { fg = "blue", modifiers = ["bold"] }
|
||||
"type.enum.variant" = { fg = "magenta", modifiers = ["dim"] }
|
||||
"string" = "green"
|
||||
"special" = "red"
|
||||
"variable" = { fg = "black", modifiers = ["dim"] }
|
||||
"variable.parameter" = { fg = "red", modifiers = ["italic", "dim"] }
|
||||
"variable.other.member" = "green"
|
||||
"keyword" = "magenta"
|
||||
"keyword.control.exception" = "red"
|
||||
"keyword.directive" = { fg = "yellow", modifiers = ["bold"] }
|
||||
"keyword.operator" = { fg = "blue", modifiers = ["bold"] }
|
||||
"label" = "red"
|
||||
"namespace" = { fg = "blue", modifiers = ["dim"] }
|
||||
|
||||
"markup.heading" = { fg = "blue", modifiers = ["bold"] }
|
||||
"markup.list" = "red"
|
||||
"markup.bold" = { fg = "cyan", modifiers = ["bold"] }
|
||||
"markup.italic" = { fg = "blue", modifiers = ["italic"] }
|
||||
"markup.strikethrough" = { modifiers = ["crossed_out"] }
|
||||
"markup.link.url" = { fg = "magenta", modifiers = ["dim"] }
|
||||
"markup.link.text" = { fg = "magenta", modifiers = ["bold"] }
|
||||
"markup.quote" = "cyan"
|
||||
"markup.raw" = "blue"
|
||||
|
||||
"diff.plus" = "green"
|
||||
"diff.delta" = "yellow"
|
||||
"diff.minus" = "red"
|
||||
|
||||
"diagnostic.hint" = { underline = { color = "cyan", style = "curl" } }
|
||||
"diagnostic.info" = { underline = { color = "blue", style = "curl" } }
|
||||
"diagnostic.warning" = { underline = { color = "yellow", style = "curl" } }
|
||||
"diagnostic.error" = { underline = { color = "red", style = "curl" } }
|
||||
|
||||
"hint" = "cyan"
|
||||
"info" = "blue"
|
||||
"debug" = "light-yellow"
|
||||
"warning" = "yellow"
|
||||
"error" = "red"
|
Loading…
Reference in New Issue