mirror of https://github.com/helix-editor/helix
Merge branch 'master' into dylanbulfin/bufferline_duplicate_names
commit
a677e9b53a
|
@ -9,3 +9,4 @@ edit-url-template = "https://github.com/helix-editor/helix/tree/master/book/{pat
|
||||||
cname = "docs.helix-editor.com"
|
cname = "docs.helix-editor.com"
|
||||||
default-theme = "colibri"
|
default-theme = "colibri"
|
||||||
preferred-dark-theme = "colibri"
|
preferred-dark-theme = "colibri"
|
||||||
|
git-repository-url = "https://github.com/helix-editor/helix"
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
| gowork | ✓ | | | `gopls` |
|
| gowork | ✓ | | | `gopls` |
|
||||||
| graphql | ✓ | | | |
|
| graphql | ✓ | | | |
|
||||||
| hare | ✓ | | | |
|
| hare | ✓ | | | |
|
||||||
| haskell | ✓ | | | `haskell-language-server-wrapper` |
|
| haskell | ✓ | ✓ | | `haskell-language-server-wrapper` |
|
||||||
| hcl | ✓ | | ✓ | `terraform-ls` |
|
| hcl | ✓ | | ✓ | `terraform-ls` |
|
||||||
| heex | ✓ | ✓ | | `elixir-ls` |
|
| heex | ✓ | ✓ | | `elixir-ls` |
|
||||||
| html | ✓ | | | `vscode-html-language-server` |
|
| html | ✓ | | | `vscode-html-language-server` |
|
||||||
|
|
|
@ -71,4 +71,5 @@
|
||||||
| `:insert-output` | Run shell command, inserting output before each selection. |
|
| `:insert-output` | Run shell command, inserting output before each selection. |
|
||||||
| `:append-output` | Run shell command, appending output after each selection. |
|
| `:append-output` | Run shell command, appending output after each selection. |
|
||||||
| `:pipe` | Pipe each selection to the shell command. |
|
| `:pipe` | Pipe each selection to the shell command. |
|
||||||
|
| `:pipe-to` | Pipe each selection to the shell command, ignoring output. |
|
||||||
| `:run-shell-command`, `:sh` | Run a shell command |
|
| `:run-shell-command`, `:sh` | Run a shell command |
|
||||||
|
|
|
@ -103,7 +103,7 @@ Some styles might not be supported by your terminal emulator.
|
||||||
| `line` |
|
| `line` |
|
||||||
| `curl` |
|
| `curl` |
|
||||||
| `dashed` |
|
| `dashed` |
|
||||||
| `dot` |
|
| `dotted` |
|
||||||
| `double_line` |
|
| `double_line` |
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ pub fn find_root(root: Option<&str>, root_markers: &[String]) -> std::path::Path
|
||||||
top_marker = Some(ancestor);
|
top_marker = Some(ancestor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ancestor.join(".git").is_dir() {
|
if ancestor.join(".git").exists() {
|
||||||
// Top marker is repo root if not root marker was detected yet
|
// Top marker is repo root if not root marker was detected yet
|
||||||
if top_marker.is_none() {
|
if top_marker.is_none() {
|
||||||
top_marker = Some(ancestor);
|
top_marker = Some(ancestor);
|
||||||
|
|
|
@ -263,7 +263,7 @@ fn fetch_grammar(grammar: GrammarConfiguration) -> Result<FetchStatus> {
|
||||||
))?;
|
))?;
|
||||||
|
|
||||||
// create the grammar dir contains a git directory
|
// create the grammar dir contains a git directory
|
||||||
if !grammar_dir.join(".git").is_dir() {
|
if !grammar_dir.join(".git").exists() {
|
||||||
git(&grammar_dir, ["init"])?;
|
git(&grammar_dir, ["init"])?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ pub fn find_local_config_dirs() -> Vec<PathBuf> {
|
||||||
let mut directories = Vec::new();
|
let mut directories = Vec::new();
|
||||||
|
|
||||||
for ancestor in current_dir.ancestors() {
|
for ancestor in current_dir.ancestors() {
|
||||||
if ancestor.join(".git").is_dir() {
|
if ancestor.join(".git").exists() {
|
||||||
directories.push(ancestor.to_path_buf());
|
directories.push(ancestor.to_path_buf());
|
||||||
// Don't go higher than repo if we're in one
|
// Don't go higher than repo if we're in one
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -2672,62 +2672,7 @@ fn open_above(cx: &mut Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn normal_mode(cx: &mut Context) {
|
fn normal_mode(cx: &mut Context) {
|
||||||
if cx.editor.mode == Mode::Normal {
|
cx.editor.enter_normal_mode();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
cx.editor.mode = Mode::Normal;
|
|
||||||
let (view, doc) = current!(cx.editor);
|
|
||||||
|
|
||||||
try_restore_indent(doc, view);
|
|
||||||
|
|
||||||
// if leaving append mode, move cursor back by 1
|
|
||||||
if doc.restore_cursor {
|
|
||||||
let text = doc.text().slice(..);
|
|
||||||
let selection = doc.selection(view.id).clone().transform(|range| {
|
|
||||||
Range::new(
|
|
||||||
range.from(),
|
|
||||||
graphemes::prev_grapheme_boundary(text, range.to()),
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
doc.set_selection(view.id, selection);
|
|
||||||
doc.restore_cursor = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn try_restore_indent(doc: &mut Document, view: &mut View) {
|
|
||||||
use helix_core::chars::char_is_whitespace;
|
|
||||||
use helix_core::Operation;
|
|
||||||
|
|
||||||
fn inserted_a_new_blank_line(changes: &[Operation], pos: usize, line_end_pos: usize) -> bool {
|
|
||||||
if let [Operation::Retain(move_pos), Operation::Insert(ref inserted_str), Operation::Retain(_)] =
|
|
||||||
changes
|
|
||||||
{
|
|
||||||
move_pos + inserted_str.len() == pos
|
|
||||||
&& inserted_str.starts_with('\n')
|
|
||||||
&& inserted_str.chars().skip(1).all(char_is_whitespace)
|
|
||||||
&& pos == line_end_pos // ensure no characters exists after current position
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let doc_changes = doc.changes().changes();
|
|
||||||
let text = doc.text().slice(..);
|
|
||||||
let range = doc.selection(view.id).primary();
|
|
||||||
let pos = range.cursor(text);
|
|
||||||
let line_end_pos = line_end_char_index(&text, range.cursor_line(text));
|
|
||||||
|
|
||||||
if inserted_a_new_blank_line(doc_changes, pos, line_end_pos) {
|
|
||||||
// Removes tailing whitespaces.
|
|
||||||
let transaction =
|
|
||||||
Transaction::change_by_selection(doc.text(), doc.selection(view.id), |range| {
|
|
||||||
let line_start_pos = text.line_to_char(range.cursor_line(text));
|
|
||||||
(line_start_pos, pos, None)
|
|
||||||
});
|
|
||||||
apply_transaction(&transaction, doc, view);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store a jump on the jumplist.
|
// Store a jump on the jumplist.
|
||||||
|
|
|
@ -1741,13 +1741,30 @@ fn insert_output(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn pipe_to(
|
||||||
|
cx: &mut compositor::Context,
|
||||||
|
args: &[Cow<str>],
|
||||||
|
event: PromptEvent,
|
||||||
|
) -> anyhow::Result<()> {
|
||||||
|
pipe_impl(cx, args, event, &ShellBehavior::Ignore)
|
||||||
|
}
|
||||||
|
|
||||||
fn pipe(cx: &mut compositor::Context, args: &[Cow<str>], event: PromptEvent) -> anyhow::Result<()> {
|
fn pipe(cx: &mut compositor::Context, args: &[Cow<str>], event: PromptEvent) -> anyhow::Result<()> {
|
||||||
|
pipe_impl(cx, args, event, &ShellBehavior::Replace)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn pipe_impl(
|
||||||
|
cx: &mut compositor::Context,
|
||||||
|
args: &[Cow<str>],
|
||||||
|
event: PromptEvent,
|
||||||
|
behavior: &ShellBehavior,
|
||||||
|
) -> anyhow::Result<()> {
|
||||||
if event != PromptEvent::Validate {
|
if event != PromptEvent::Validate {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure!(!args.is_empty(), "Shell command required");
|
ensure!(!args.is_empty(), "Shell command required");
|
||||||
shell(cx, &args.join(" "), &ShellBehavior::Replace);
|
shell(cx, &args.join(" "), behavior);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2292,6 +2309,13 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
|
||||||
fun: pipe,
|
fun: pipe,
|
||||||
completer: None,
|
completer: None,
|
||||||
},
|
},
|
||||||
|
TypableCommand {
|
||||||
|
name: "pipe-to",
|
||||||
|
aliases: &[],
|
||||||
|
doc: "Pipe each selection to the shell command, ignoring output.",
|
||||||
|
fun: pipe_to,
|
||||||
|
completer: None,
|
||||||
|
},
|
||||||
TypableCommand {
|
TypableCommand {
|
||||||
name: "run-shell-command",
|
name: "run-shell-command",
|
||||||
aliases: &["sh"],
|
aliases: &["sh"],
|
||||||
|
|
|
@ -207,7 +207,7 @@ pub fn file_picker(root: PathBuf, config: &helix_view::editor::Config) -> FilePi
|
||||||
|
|
||||||
// Cap the number of files if we aren't in a git project, preventing
|
// Cap the number of files if we aren't in a git project, preventing
|
||||||
// hangs when using the picker in your home directory
|
// hangs when using the picker in your home directory
|
||||||
let files: Vec<_> = if root.join(".git").is_dir() {
|
let files: Vec<_> = if root.join(".git").exists() {
|
||||||
files.collect()
|
files.collect()
|
||||||
} else {
|
} else {
|
||||||
// const MAX: usize = 8192;
|
// const MAX: usize = 8192;
|
||||||
|
|
|
@ -1005,6 +1005,8 @@ impl Editor {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.enter_normal_mode();
|
||||||
|
|
||||||
match action {
|
match action {
|
||||||
Action::Replace => {
|
Action::Replace => {
|
||||||
let (view, doc) = current_ref!(self);
|
let (view, doc) = current_ref!(self);
|
||||||
|
@ -1025,6 +1027,9 @@ impl Editor {
|
||||||
let (view, doc) = current!(self);
|
let (view, doc) = current!(self);
|
||||||
let view_id = view.id;
|
let view_id = view.id;
|
||||||
|
|
||||||
|
// Append any outstanding changes to history in the old document.
|
||||||
|
doc.append_changes_to_history(view);
|
||||||
|
|
||||||
if remove_empty_scratch {
|
if remove_empty_scratch {
|
||||||
// Copy `doc.id` into a variable before calling `self.documents.remove`, which requires a mutable
|
// Copy `doc.id` into a variable before calling `self.documents.remove`, which requires a mutable
|
||||||
// borrow, invalidating direct access to `doc.id`.
|
// borrow, invalidating direct access to `doc.id`.
|
||||||
|
@ -1262,7 +1267,7 @@ impl Editor {
|
||||||
// if leaving the view: mode should reset and the cursor should be
|
// if leaving the view: mode should reset and the cursor should be
|
||||||
// within view
|
// within view
|
||||||
if prev_id != view_id {
|
if prev_id != view_id {
|
||||||
self.mode = Mode::Normal;
|
self.enter_normal_mode();
|
||||||
self.ensure_cursor_in_view(view_id);
|
self.ensure_cursor_in_view(view_id);
|
||||||
|
|
||||||
// Update jumplist selections with new document changes.
|
// Update jumplist selections with new document changes.
|
||||||
|
@ -1427,4 +1432,67 @@ impl Editor {
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Switches the editor into normal mode.
|
||||||
|
pub fn enter_normal_mode(&mut self) {
|
||||||
|
use helix_core::{graphemes, Range};
|
||||||
|
|
||||||
|
if self.mode == Mode::Normal {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.mode = Mode::Normal;
|
||||||
|
let (view, doc) = current!(self);
|
||||||
|
|
||||||
|
try_restore_indent(doc, view);
|
||||||
|
|
||||||
|
// if leaving append mode, move cursor back by 1
|
||||||
|
if doc.restore_cursor {
|
||||||
|
let text = doc.text().slice(..);
|
||||||
|
let selection = doc.selection(view.id).clone().transform(|range| {
|
||||||
|
Range::new(
|
||||||
|
range.from(),
|
||||||
|
graphemes::prev_grapheme_boundary(text, range.to()),
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
|
doc.set_selection(view.id, selection);
|
||||||
|
doc.restore_cursor = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn try_restore_indent(doc: &mut Document, view: &mut View) {
|
||||||
|
use helix_core::{
|
||||||
|
chars::char_is_whitespace, line_ending::line_end_char_index, Operation, Transaction,
|
||||||
|
};
|
||||||
|
|
||||||
|
fn inserted_a_new_blank_line(changes: &[Operation], pos: usize, line_end_pos: usize) -> bool {
|
||||||
|
if let [Operation::Retain(move_pos), Operation::Insert(ref inserted_str), Operation::Retain(_)] =
|
||||||
|
changes
|
||||||
|
{
|
||||||
|
move_pos + inserted_str.len() == pos
|
||||||
|
&& inserted_str.starts_with('\n')
|
||||||
|
&& inserted_str.chars().skip(1).all(char_is_whitespace)
|
||||||
|
&& pos == line_end_pos // ensure no characters exists after current position
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let doc_changes = doc.changes().changes();
|
||||||
|
let text = doc.text().slice(..);
|
||||||
|
let range = doc.selection(view.id).primary();
|
||||||
|
let pos = range.cursor(text);
|
||||||
|
let line_end_pos = line_end_char_index(&text, range.cursor_line(text));
|
||||||
|
|
||||||
|
if inserted_a_new_blank_line(doc_changes, pos, line_end_pos) {
|
||||||
|
// Removes tailing whitespaces.
|
||||||
|
let transaction =
|
||||||
|
Transaction::change_by_selection(doc.text(), doc.selection(view.id), |range| {
|
||||||
|
let line_start_pos = text.line_to_char(range.cursor_line(text));
|
||||||
|
(line_start_pos, pos, None)
|
||||||
|
});
|
||||||
|
crate::apply_transaction(&transaction, doc, view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -918,13 +918,19 @@ grammar = "scheme"
|
||||||
name = "common-lisp"
|
name = "common-lisp"
|
||||||
scope = "source.lisp"
|
scope = "source.lisp"
|
||||||
roots = []
|
roots = []
|
||||||
file-types = ["lisp", "asd", "cl", "l", "lsp", "ny"," podsl", "sexp"]
|
file-types = ["lisp", "asd", "cl", "l", "lsp", "ny", "podsl", "sexp"]
|
||||||
shebangs = ["lisp", "sbcl", "ccl", "clisp", "ecl"]
|
shebangs = ["lisp", "sbcl", "ccl", "clisp", "ecl"]
|
||||||
comment-token = ";"
|
comment-token = ";"
|
||||||
indent = { tab-width = 2, unit = " " }
|
indent = { tab-width = 2, unit = " " }
|
||||||
language-server = { command = "cl-lsp", args = [ "stdio" ] }
|
language-server = { command = "cl-lsp", args = [ "stdio" ] }
|
||||||
grammar = "scheme"
|
grammar = "scheme"
|
||||||
|
|
||||||
|
[language.auto-pairs]
|
||||||
|
'(' = ')'
|
||||||
|
'{' = '}'
|
||||||
|
'[' = ']'
|
||||||
|
'"' = '"'
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "comment"
|
name = "comment"
|
||||||
scope = "scope.comment"
|
scope = "scope.comment"
|
||||||
|
@ -1083,7 +1089,7 @@ source = { git = "https://github.com/the-mikedavis/tree-sitter-git-commit", rev
|
||||||
name = "diff"
|
name = "diff"
|
||||||
scope = "source.diff"
|
scope = "source.diff"
|
||||||
roots = []
|
roots = []
|
||||||
file-types = ["diff"]
|
file-types = ["diff", "patch"]
|
||||||
injection-regex = "diff"
|
injection-regex = "diff"
|
||||||
comment-token = "#"
|
comment-token = "#"
|
||||||
indent = { tab-width = 2, unit = " " }
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
@ -1577,7 +1583,7 @@ indent = { tab-width = 2, unit = " " }
|
||||||
|
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "scheme"
|
name = "scheme"
|
||||||
source = { git = "https://github.com/6cdh/tree-sitter-scheme", rev = "27fb77db05f890c2823b4bd751c6420378df146b" }
|
source = { git = "https://github.com/6cdh/tree-sitter-scheme", rev = "c0741320bfca6b7b5b7a13b5171275951e96a842" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "v"
|
name = "v"
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
(comment) @comment.inside
|
||||||
|
|
||||||
|
[
|
||||||
|
(adt)
|
||||||
|
(decl_type)
|
||||||
|
(newtype)
|
||||||
|
] @class.around
|
||||||
|
|
||||||
|
((signature)? (function rhs:(_) @function.inside)) @function.around
|
||||||
|
(exp_lambda) @function.around
|
||||||
|
|
||||||
|
(adt (type_variable) @parameter.inside)
|
||||||
|
(patterns (_) @parameter.inside)
|
|
@ -5,8 +5,6 @@
|
||||||
; overrides are unnecessary.
|
; overrides are unnecessary.
|
||||||
; -------
|
; -------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; -------
|
; -------
|
||||||
; Types
|
; Types
|
||||||
; -------
|
; -------
|
||||||
|
@ -241,6 +239,14 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(attribute
|
||||||
|
(identifier) @_macro
|
||||||
|
arguments: (token_tree (identifier) @constant.numeric.integer)
|
||||||
|
(#eq? @_macro "derive")
|
||||||
|
)
|
||||||
|
@special
|
||||||
|
|
||||||
|
|
||||||
; -------
|
; -------
|
||||||
; Functions
|
; Functions
|
||||||
; -------
|
; -------
|
||||||
|
@ -271,6 +277,7 @@
|
||||||
; ---
|
; ---
|
||||||
; Macros
|
; Macros
|
||||||
; ---
|
; ---
|
||||||
|
|
||||||
(attribute
|
(attribute
|
||||||
(identifier) @function.macro)
|
(identifier) @function.macro)
|
||||||
(attribute
|
(attribute
|
||||||
|
|
|
@ -2,29 +2,40 @@
|
||||||
(character) @constant.character
|
(character) @constant.character
|
||||||
(boolean) @constant.builtin.boolean
|
(boolean) @constant.builtin.boolean
|
||||||
|
|
||||||
[(string)
|
(string) @string
|
||||||
(character)] @string
|
|
||||||
|
|
||||||
(escape_sequence) @constant.character.escape
|
(escape_sequence) @constant.character.escape
|
||||||
|
|
||||||
[(comment)
|
(comment) @comment.line
|
||||||
(block_comment)
|
(block_comment) @comment.block
|
||||||
(directive)] @comment
|
(directive) @keyword.directive
|
||||||
|
|
||||||
[(boolean)
|
; operators
|
||||||
(character)] @constant
|
|
||||||
|
|
||||||
((symbol) @function.builtin
|
((symbol) @operator
|
||||||
(#match? @function.builtin "^(eqv\\?|eq\\?|equal\\?)")) ; TODO
|
(#match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$"))
|
||||||
|
|
||||||
; keywords
|
; keywords
|
||||||
|
|
||||||
((symbol) @keyword.conditional
|
(list
|
||||||
(#match? @keyword.conditional "^(if|cond|case|when|unless)$"))
|
.
|
||||||
|
((symbol) @keyword.conditional
|
||||||
|
(#match? @keyword.conditional "^(if|cond|case|when|unless)$"
|
||||||
|
)))
|
||||||
|
|
||||||
((symbol) @keyword
|
(list
|
||||||
|
.
|
||||||
|
(symbol) @keyword
|
||||||
(#match? @keyword
|
(#match? @keyword
|
||||||
"^(define|lambda|begin|do|define-syntax|and|or|if|cond|case|when|unless|else|=>|let|let*|let-syntax|let-values|let*-values|letrec|letrec*|letrec-syntax|set!|syntax-rules|identifier-syntax|quote|unquote|quote-splicing|quasiquote|unquote-splicing|delay|assert|library|export|import|rename|only|except|prefix)$"))
|
"^(define-syntax|let\\*|lambda|λ|case|=>|quote-splicing|unquote-splicing|set!|let|letrec|letrec-syntax|let-values|let\\*-values|do|else|define|cond|syntax-rules|unquote|begin|quote|let-syntax|and|if|quasiquote|letrec|delay|or|when|unless|identifier-syntax|assert|library|export|import|rename|only|except|prefix)$"
|
||||||
|
))
|
||||||
|
|
||||||
|
(list
|
||||||
|
.
|
||||||
|
(symbol) @function.builtin
|
||||||
|
(#match? @function.builtin
|
||||||
|
"^(caar|cadr|call-with-input-file|call-with-output-file|cdar|cddr|list|open-input-file|open-output-file|with-input-from-file|with-output-to-file|\\*|\\+|-|/|<|<=|=|>|>=|abs|acos|angle|append|apply|asin|assoc|assq|assv|atan|boolean\\?|caaaar|caaadr|caaar|caadar|caaddr|caadr|cadaar|cadadr|cadar|caddar|cadddr|caddr|call-with-current-continuation|call-with-values|car|cdaaar|cdaadr|cdaar|cdadar|cdaddr|cdadr|cddaar|cddadr|cddar|cdddar|cddddr|cdddr|cdr|ceiling|char->integer|char-alphabetic\\?|char-ci<=\\?|char-ci<\\?|char-ci=\\?|char-ci>=\\?|char-ci>\\?|char-downcase|char-lower-case\\?|char-numeric\\?|char-ready\\?|char-upcase|char-upper-case\\?|char-whitespace\\?|char<=\\?|char<\\?|char=\\?|char>=\\?|char>\\?|char\\?|close-input-port|close-output-port|complex\\?|cons|cos|current-error-port|current-input-port|current-output-port|denominator|display|dynamic-wind|eof-object\\?|eq\\?|equal\\?|eqv\\?|eval|even\\?|exact->inexact|exact\\?|exp|expt|floor|flush-output|for-each|force|gcd|imag-part|inexact->exact|inexact\\?|input-port\\?|integer->char|integer\\?|interaction-environment|lcm|length|list->string|list->vector|list-ref|list-tail|list\\?|load|log|magnitude|make-polar|make-rectangular|make-string|make-vector|map|max|member|memq|memv|min|modulo|negative\\?|newline|not|null-environment|null\\?|number->string|number\\?|numerator|odd\\?|output-port\\?|pair\\?|peek-char|positive\\?|procedure\\?|quotient|rational\\?|rationalize|read|read-char|real-part|real\\?|remainder|reverse|round|scheme-report-environment|set-car!|set-cdr!|sin|sqrt|string|string->list|string->number|string->symbol|string-append|string-ci<=\\?|string-ci<\\?|string-ci=\\?|string-ci>=\\?|string-ci>\\?|string-copy|string-fill!|string-length|string-ref|string-set!|string<=\\?|string<\\?|string=\\?|string>=\\?|string>\\?|string\\?|substring|symbol->string|symbol\\?|tan|transcript-off|transcript-on|truncate|values|vector|vector->list|vector-fill!|vector-length|vector-ref|vector-set!|vector\\?|write|write-char|zero\\?)$"
|
||||||
|
))
|
||||||
|
|
||||||
; special forms
|
; special forms
|
||||||
|
|
||||||
|
@ -47,26 +58,16 @@
|
||||||
.
|
.
|
||||||
(list
|
(list
|
||||||
(list
|
(list
|
||||||
(symbol) @variable))
|
(symbol) @variable.parameter))
|
||||||
(#match? @_f
|
(#match? @_f
|
||||||
"^(let|let\\*|let-syntax|let-values|let\\*-values|letrec|letrec\\*|letrec-syntax)$"))
|
"^(let|let\\*|let-syntax|let-values|let\\*-values|letrec|letrec\\*|letrec-syntax)$"))
|
||||||
|
|
||||||
; operators
|
|
||||||
|
|
||||||
(list
|
|
||||||
.
|
|
||||||
(symbol) @operator
|
|
||||||
(#match? @operator "^([+*/<>=-]|(<=)|(>=))$"))
|
|
||||||
|
|
||||||
; quote
|
; quote
|
||||||
|
|
||||||
(abbreviation
|
|
||||||
"'" (symbol)) @constant
|
|
||||||
|
|
||||||
(list
|
(list
|
||||||
.
|
.
|
||||||
(symbol) @_f
|
(symbol) @_f
|
||||||
(#eq? @_f "quote")) @symbol
|
(#eq? @_f "quote")) @string.symbol
|
||||||
|
|
||||||
; library
|
; library
|
||||||
|
|
||||||
|
@ -89,12 +90,10 @@
|
||||||
((symbol) @variable.builtin
|
((symbol) @variable.builtin
|
||||||
(#eq? @variable.builtin "..."))
|
(#eq? @variable.builtin "..."))
|
||||||
|
|
||||||
(symbol) @variable
|
|
||||||
((symbol) @variable.builtin
|
((symbol) @variable.builtin
|
||||||
(#eq? @variable.builtin "."))
|
(#eq? @variable.builtin "."))
|
||||||
|
|
||||||
(symbol) @variable
|
(symbol) @variable
|
||||||
|
|
||||||
|
|
||||||
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,28 @@
|
||||||
# Author: GreasySlug <9619abgoni@gmail.com>
|
# Author: GreasySlug <9619abgoni@gmail.com>
|
||||||
|
# This theme is base on base16_theme(Author: NNB <nnbnh@protonmail.com>)
|
||||||
|
|
||||||
"ui.background" = { fg = "white"}
|
"ui.background" = { fg = "white"}
|
||||||
"ui.background.separator" = { fg = "gray" }
|
"ui.background.separator" = { fg = "gray" }
|
||||||
"ui.menu" = { fg = "gray" }
|
"ui.menu" = { fg = "white" }
|
||||||
"ui.menu.selected" = { modifiers = ["reversed"] }
|
"ui.menu.selected" = { modifiers = ["reversed"] }
|
||||||
"ui.menu.scroll" = { fg = "light-gray" }
|
"ui.menu.scroll" = { fg = "light-gray" }
|
||||||
"ui.linenr" = { fg = "light-gray" }
|
"ui.linenr" = { fg = "light-gray" }
|
||||||
"ui.linenr.selected" = { fg = "white", modifiers = ["bold"] }
|
"ui.linenr.selected" = { fg = "white", modifiers = ["bold"] }
|
||||||
"ui.popup" = { fg = "white" }
|
"ui.popup" = { fg = "white" }
|
||||||
"ui.window" = { fg = "white" }
|
"ui.window" = { fg = "white" }
|
||||||
"ui.selection" = { modifiers = [ "reversed"] }
|
"ui.selection" = { bg = "gray" }
|
||||||
"comment" = { fg = "gray", modifiers = ["italic"] }
|
"comment" = "light-gray"
|
||||||
"ui.statusline" = { fg = "white" }
|
"ui.statusline" = { fg = "white" }
|
||||||
"ui.statusline.inactive" = { fg = "gray" }
|
"ui.statusline.inactive" = { fg = "gray" }
|
||||||
"ui.statusline.normal" = { fg = "blue", modifiers = ["reversed"] }
|
"ui.statusline.normal" = { fg = "black", bg = "blue" }
|
||||||
"ui.statusline.insert" = { fg = "green", modifiers = ["reversed"] }
|
"ui.statusline.insert" = { fg = "black", bg = "green" }
|
||||||
"ui.statusline.select" = { fg = "magenta", modifiers = ["reversed"] }
|
"ui.statusline.select" = { fg = "black", bg = "magenta" }
|
||||||
"ui.help" = { fg = "light-gray" }
|
"ui.help" = { fg = "light-gray" }
|
||||||
"ui.cursor" = { modifiers = ["reversed"] }
|
"ui.cursor" = { modifiers = ["reversed"] }
|
||||||
"ui.cursor.match" = { fg = "light-yellow", modifiers = ["underlined"] }
|
"ui.cursor.match" = { fg = "light-yellow", underline = { color = "light-yellow", style = "line" } }
|
||||||
"ui.cursor.primary" = { modifiers = ["reversed", "slow_blink"] }
|
"ui.cursor.primary" = { modifiers = ["reversed", "slow_blink"] }
|
||||||
"ui.cursor.secondary" = { modifiers = ["reversed"] }
|
"ui.cursor.secondary" = { modifiers = ["reversed"] }
|
||||||
"ui.virtual.ruler" = { fg = "gray", modifiers = ["reversed"] }
|
"ui.virtual.ruler" = { bg = "gray" }
|
||||||
"ui.virtual.whitespace" = "gray"
|
"ui.virtual.whitespace" = "gray"
|
||||||
"ui.virtual.indent-guide" = "gray"
|
"ui.virtual.indent-guide" = "gray"
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@
|
||||||
"markup.list" = "light-red"
|
"markup.list" = "light-red"
|
||||||
"markup.bold" = { fg = "light-yellow", modifiers = ["bold"] }
|
"markup.bold" = { fg = "light-yellow", modifiers = ["bold"] }
|
||||||
"markup.italic" = { fg = "light-magenta", modifiers = ["italic"] }
|
"markup.italic" = { fg = "light-magenta", modifiers = ["italic"] }
|
||||||
"markup.link.url" = { fg = "yellow", modifiers = ["underlined"] }
|
"markup.link.url" = { fg = "yellow", underline = { color = "yellow", style = "line"} }
|
||||||
"markup.link.text" = "light-red"
|
"markup.link.text" = "light-red"
|
||||||
"markup.quote" = "light-cyan"
|
"markup.quote" = "light-cyan"
|
||||||
"markup.raw" = "green"
|
"markup.raw" = "green"
|
||||||
|
@ -53,19 +54,19 @@
|
||||||
"markup.select" = { fg = "magenta" }
|
"markup.select" = { fg = "magenta" }
|
||||||
|
|
||||||
"diff.plus" = "light-green"
|
"diff.plus" = "light-green"
|
||||||
"diff.delta" = "yellow"
|
"diff.delta" = "light-blue"
|
||||||
|
"diff.delta.moved" = "blue"
|
||||||
"diff.minus" = "light-red"
|
"diff.minus" = "light-red"
|
||||||
|
|
||||||
"ui.gutter" = "gray"
|
"ui.gutter" = "gray"
|
||||||
"info" = "light-blue"
|
"info" = "light-blue"
|
||||||
"hint" = "gray"
|
"hint" = "light-gray"
|
||||||
"debug" = "gray"
|
"debug" = "light-gray"
|
||||||
"warning" = "yellow"
|
"warning" = "light-yellow"
|
||||||
"error" = "light-red"
|
"error" = "light-red"
|
||||||
|
|
||||||
"diagnostic" = { modifiers = ["underlined"] }
|
"diagnostic.info" = { underline = { color = "light-blue", style = "dotted" } }
|
||||||
"diagnostic.info" = { fg = "light-blue", modifiers = ["underlined"] }
|
"diagnostic.hint" = { underline = { color = "light-gray", style = "double_line" } }
|
||||||
"diagnostic.hint" = { fg = "gray", modifiers = ["underlined"] }
|
"diagnostic.debug" = { underline ={ color ="light-gray", style = "dashed" } }
|
||||||
"diagnostic.debug" ={ fg ="gray", modifiers = ["underlined"] }
|
"diagnostic.warning" = { underline = { color = "light-yellow", style = "curl" } }
|
||||||
"diagnostic.warning" = { fg = "yellow", modifiers = ["underlined"] }
|
"diagnostic.error" = { underline = { color ="light-red", style = "curl" } }
|
||||||
"diagnostic.error" = { fg ="light-red", modifiers = ["underlined"] }
|
|
||||||
|
|
|
@ -9,29 +9,29 @@
|
||||||
"ui.text.focus" = { modifiers = ["reversed"] } # file picker selected
|
"ui.text.focus" = { modifiers = ["reversed"] } # file picker selected
|
||||||
|
|
||||||
"ui.virtual.whitespace" = "gray"
|
"ui.virtual.whitespace" = "gray"
|
||||||
"ui.virtual.ruler" = { fg = "gray", bg = "white", modifiers = ["reversed"] }
|
"ui.virtual.ruler" = { fg = "white", bg = "gray" }
|
||||||
"ui.virtual.indent-guide" = "white"
|
"ui.virtual.indent-guide" = "white"
|
||||||
|
|
||||||
"ui.statusline" = { fg = "white", bg = "deep_blue" }
|
"ui.statusline" = { fg = "white", bg = "deep_blue" }
|
||||||
"ui.statusline.inactive" = { fg = "gray" }
|
"ui.statusline.inactive" = { fg = "gray", bg = "deep_blue" }
|
||||||
"ui.statusline.normal" = { fg = "black", bg = "aqua" }
|
"ui.statusline.normal" = { fg = "black", bg = "aqua" }
|
||||||
"ui.statusline.insert" = { fg = "black", bg = "orange" }
|
"ui.statusline.insert" = { fg = "black", bg = "orange" }
|
||||||
"ui.statusline.select" = { fg = "black", bg = "purple" }
|
"ui.statusline.select" = { fg = "black", bg = "purple" }
|
||||||
# "ui.statusline.separator" = { fg = "aqua", bg = "white" }
|
"ui.statusline.separator" = { fg = "aqua", bg = "white" }
|
||||||
|
|
||||||
"ui.cursor" = { fg = "black", bg = "white" }
|
"ui.cursor" = { fg = "black", bg = "white" }
|
||||||
"ui.cursor.insert" = { fg = "black", bg = "white" }
|
"ui.cursor.insert" = { fg = "black", bg = "white" }
|
||||||
"ui.cursor.select" = { fg = "black", bg = "white" }
|
"ui.cursor.select" = { fg = "black", bg = "white" }
|
||||||
"ui.cursor.match" = { bg = "white", modifiers = ["dim"] }
|
"ui.cursor.match" = { bg = "white", modifiers = ["dim"] }
|
||||||
"ui.cursor.primary" = { fg = "black", bg = "white", modifiers = ["slow_blink"] }
|
"ui.cursor.primary" = { fg = "black", bg = "white", modifiers = ["slow_blink"] }
|
||||||
|
|
||||||
"ui.cursor.secondary" = "white"
|
"ui.cursor.secondary" = "white"
|
||||||
"ui.cursorline.primary" = { fg = "orange", modifiers = ["underlined"] }
|
"ui.cursorline.primary" = { bg = "deep_blue", underline = { color = "orange", style = "double_line" } }
|
||||||
"ui.cursorline.secondary" = { fg = "orange", modifiers = ["underlined"] }
|
"ui.cursorline.secondary" = { bg = "dark_blue", underline = { color = "white", style = "line" } }
|
||||||
"ui.selection" = { fg = "deep_blue", bg = "white" }
|
"ui.selection" = { fg = "dark_blue", bg = "white" }
|
||||||
|
"ui.selection.primary" = { fg = "deep_blue", bg = "white" }
|
||||||
|
|
||||||
"ui.menu" = { fg = "white", bg = "deep_blue" }
|
"ui.menu" = { fg = "white", bg = "deep_blue" }
|
||||||
"ui.menu.selected" = { fg = "orange", modifiers = ["underlined"] }
|
"ui.menu.selected" = { fg = "orange", underline = { style = "line" } }
|
||||||
"ui.menu.scroll" = { fg = "aqua", bg = "black" }
|
"ui.menu.scroll" = { fg = "aqua", bg = "black" }
|
||||||
"ui.help" = { fg = "white", bg = "deep_blue" }
|
"ui.help" = { fg = "white", bg = "deep_blue" }
|
||||||
|
|
||||||
|
@ -39,15 +39,16 @@
|
||||||
"ui.popup.info" = { fg = "white", bg = "deep_blue" }
|
"ui.popup.info" = { fg = "white", bg = "deep_blue" }
|
||||||
|
|
||||||
"ui.gutter" = { bg = "black" }
|
"ui.gutter" = { bg = "black" }
|
||||||
|
"ui.gutter.selected" = { bg = "black" }
|
||||||
"ui.linenr" = { fg = "white", bg = "black" }
|
"ui.linenr" = { fg = "white", bg = "black" }
|
||||||
"ui.linenr.selected" = { fg = "orange", bg = "black", modifiers = ["bold"] }
|
"ui.linenr.selected" = { fg = "orange", bg = "black", modifiers = ["bold"] }
|
||||||
|
|
||||||
# Diagnostic
|
# Diagnostic
|
||||||
"diagnostic" = "white"
|
"diagnostic" = { fg = "white" }
|
||||||
"diagnostic.info" = { bg = "white", modifiers = ["underlined"] }
|
"diagnostic.info" = { underline = { color = "white", style = "dotted" } }
|
||||||
"diagnostic.hint" = { fg = "yellow", modifiers = ["underlined"] }
|
"diagnostic.hint" = { underline = { color = "yellow", style = "dashed" } }
|
||||||
"diagnostic.warning" = { fg = "orange", modifiers = ["underlined"] }
|
"diagnostic.warning" = { underline = { color = "orange", style = "curl" } }
|
||||||
"diagnostic.error" = { fg = "red", modifiers = ["underlined"] }
|
"diagnostic.error" = { underline = { color = "red", style = "curl" } }
|
||||||
"info" = "white"
|
"info" = "white"
|
||||||
"hint" = "yellow"
|
"hint" = "yellow"
|
||||||
"warning" = "orange"
|
"warning" = "orange"
|
||||||
|
@ -59,31 +60,31 @@
|
||||||
"diff.minus" = "pink"
|
"diff.minus" = "pink"
|
||||||
|
|
||||||
# Syntax high light
|
# Syntax high light
|
||||||
"type" = { fg = "emerald_green" }
|
"type" = "emerald_green"
|
||||||
"type.buildin" = "emerald_green"
|
"type.buildin" = "emerald_green"
|
||||||
"comment" = { fg = "white" }
|
"comment" = "white"
|
||||||
"operator" = "white"
|
"operator" = "white"
|
||||||
"variable" = { fg = "aqua" }
|
"variable" = "aqua"
|
||||||
"variable.other.member" = "brown"
|
"variable.other.member" = "brown"
|
||||||
"constant" = "aqua"
|
"constant" = "aqua"
|
||||||
"constant.numeric" = "emerald_green"
|
"constant.numeric" = "emerald_green"
|
||||||
"attributes" = { fg = "blue" }
|
"attributes" = "blue"
|
||||||
"namespace" = "blue"
|
"namespace" = "blue"
|
||||||
"string" = "brown"
|
"string" = "brown"
|
||||||
"string.special.url" = { fg = "brown", modifiers =["underlined"]}
|
"string.special.url" = "brown"
|
||||||
"constant.character.escape" = "yellow"
|
"constant.character.escape" = "yellow"
|
||||||
"constructor" = "aqua"
|
"constructor" = "aqua"
|
||||||
"keyword" = { fg = "blue", modifiers = ["underlined"] }
|
"keyword" = "blue"
|
||||||
"keyword.control" = "purple"
|
"keyword.control" = "purple"
|
||||||
"function" = "yellow"
|
"function" = "yellow"
|
||||||
"label" = "blue"
|
"label" = "blue"
|
||||||
|
|
||||||
# Markup
|
# Markup
|
||||||
"markup.heading" = { fg = "yellow", modifiers = ["bold", "underlined"] }
|
"markup.heading" = { fg = "yellow", modifiers = ["bold"], underline = { color = "yellow", style = "double_line"} }
|
||||||
"markup.list" = { fg = "pink" }
|
"markup.list" = "pink"
|
||||||
"markup.bold" = { fg = "emerald_green", modifiers = ["bold"] }
|
"markup.bold" = { fg = "emerald_green", modifiers = ["bold"] }
|
||||||
"markup.italic" = { fg = "blue", modifiers = ["italic"] }
|
"markup.italic" = { fg = "blue", modifiers = ["italic"] }
|
||||||
"markup.link.url" = { fg = "blue", modifiers = ["underlined"] }
|
"markup.link.url" = { fg = "blue", underline = { color = "blue", style = "line" } }
|
||||||
"markup.link.text" = "pink"
|
"markup.link.text" = "pink"
|
||||||
"markup.quote" = "yellow"
|
"markup.quote" = "yellow"
|
||||||
"markup.raw" = "brown"
|
"markup.raw" = "brown"
|
||||||
|
@ -94,6 +95,7 @@ gray = "#585858"
|
||||||
white = "#ffffff"
|
white = "#ffffff"
|
||||||
blue = "#66a4ff"
|
blue = "#66a4ff"
|
||||||
deep_blue = "#142743"
|
deep_blue = "#142743"
|
||||||
|
dark_blue = "#0d1a2d"
|
||||||
aqua = "#6fc3df"
|
aqua = "#6fc3df"
|
||||||
purple = "#c586c0"
|
purple = "#c586c0"
|
||||||
red = "#b65f5f"
|
red = "#b65f5f"
|
||||||
|
|
Loading…
Reference in New Issue