Add tree-sitter kakoune module
This commit is contained in:
parent
da7cb27c04
commit
8774f1afd6
4 changed files with 307 additions and 134 deletions
|
@ -96,10 +96,26 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
programs.my-kakoune.tree-sitter.languages = {
|
||||
scala =
|
||||
let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-scala";
|
||||
rev = "cda0de8a038b0e4ad79a97f7aa281250fcf88560";
|
||||
sha256 = "sha256-3R5aflBeTny56EL6sONWfMWpVnPb6VHL6IsisMdM5bk=";
|
||||
leaveDotGit = true;
|
||||
}; in
|
||||
{
|
||||
grammar.src = src;
|
||||
queries.src = src;
|
||||
queries.path = "queries/scala";
|
||||
};
|
||||
};
|
||||
|
||||
programs.my-kakoune.package = kakounePkg;
|
||||
programs.my-kakoune.rc =
|
||||
builtins.readFile ./kakrc +
|
||||
builtins.readFile ./reload-faces.kak + ''
|
||||
builtins.readFile ./kakrc + ''
|
||||
|
||||
# Source any settings in the current working directory,
|
||||
# recursive upwards
|
||||
|
@ -107,6 +123,34 @@ in
|
|||
${pkgs.writeScript "source-pwd" (builtins.readFile ./source-pwd)}
|
||||
}
|
||||
'';
|
||||
|
||||
programs.my-kakoune.extraFaces = {
|
||||
Default = "%opt{white},%opt{background}";
|
||||
BufferPadding = "%opt{background},%opt{background}";
|
||||
MenuForeground = "blue,white+bF";
|
||||
MenuBackground = "bright-blue,white+F";
|
||||
Information = "bright-blue,white";
|
||||
# Markdown help color scheme
|
||||
InfoDefault = "Information";
|
||||
InfoBlock = "@block";
|
||||
InfoBlockQuote = "+i@block";
|
||||
InfoBullet = "@bullet";
|
||||
InfoHeader = "@header";
|
||||
InfoLink = "@link";
|
||||
InfoLinkMono = "+b@mono";
|
||||
InfoMono = "@mono";
|
||||
InfoRule = "+b@Information";
|
||||
InfoDiagnosticError = "@DiagnosticError";
|
||||
InfoDiagnosticHint = "@DiagnosticHint";
|
||||
InfoDiagnosticInformation = "@Information";
|
||||
InfoDiagnosticWarning = "@DiagnosticWarning";
|
||||
# Extra faces
|
||||
macro = "+b@function";
|
||||
method = "+i@function";
|
||||
format_specifier = "+i@string";
|
||||
mutable_variable = "+u@variable";
|
||||
class = "+b@variable";
|
||||
};
|
||||
programs.my-kakoune.autoload = [
|
||||
# My own scripts
|
||||
{
|
||||
|
|
|
@ -1,130 +0,0 @@
|
|||
# Reload all faces
|
||||
# our faces
|
||||
set-face global Default "%opt{white},%opt{background}"
|
||||
set-face global BufferPadding "%opt{background},%opt{background}"
|
||||
# face global Default rgb:121213,default
|
||||
# face global BufferPadding rgb:A0A0A0,default
|
||||
face global MenuForeground blue,white+bF
|
||||
face global MenuBackground bright-blue,white+F
|
||||
face global Information bright-blue,white
|
||||
# Markdown help color scheme
|
||||
face global InfoDefault Information
|
||||
face global InfoBlock @block
|
||||
face global InfoBlockQuote +i@block
|
||||
face global InfoBullet @bullet
|
||||
face global InfoHeader @header
|
||||
face global InfoLink @link
|
||||
face global InfoLinkMono +b@mono
|
||||
face global InfoMono @mono
|
||||
face global InfoRule +b@Information
|
||||
face global InfoDiagnosticError @DiagnosticError
|
||||
face global InfoDiagnosticHint @DiagnosticHint
|
||||
face global InfoDiagnosticInformation @Information
|
||||
face global InfoDiagnosticWarning @DiagnosticWarning
|
||||
# Extra faces
|
||||
face global macro +b@function
|
||||
face global method +i@function
|
||||
face global format_specifier +i@string
|
||||
face global mutable_variable +u@variable
|
||||
face global class +b@variable
|
||||
|
||||
# tree-sitter
|
||||
#set-face global ts_unknown red+ub
|
||||
set-face global ts_attribute "@attribute"
|
||||
set-face global ts_comment "@comment"
|
||||
set-face global ts_comment_block "@ts_comment"
|
||||
set-face global ts_comment_line "@ts_comment"
|
||||
set-face global ts_conceal "%opt{mauve}+i"
|
||||
set-face global ts_constant "%opt{peach}"
|
||||
set-face global ts_constant_builtin_boolean "%opt{sky}"
|
||||
set-face global ts_constant_character "%opt{yellow}"
|
||||
set-face global ts_constant_character_escape "@ts_constant_character"
|
||||
set-face global ts_constant_macro "%opt{mauve}"
|
||||
set-face global ts_constant_numeric "%opt{peach}"
|
||||
set-face global ts_constant_numeric_float "@ts_constant_numeric"
|
||||
set-face global ts_constant_numeric_integer "@ts_constant_numeric"
|
||||
set-face global ts_constructor "%opt{sapphire}"
|
||||
set-face global ts_diff_plus "%opt{green}"
|
||||
set-face global ts_diff_minus "%opt{red}"
|
||||
set-face global ts_diff_delta "%opt{blue}"
|
||||
set-face global ts_diff_delta_moved "%opt{mauve}"
|
||||
set-face global ts_error "%opt{red}+b"
|
||||
set-face global ts_function "@function"
|
||||
set-face global ts_function_builtin "@builtin"
|
||||
set-face global ts_function_macro "+i@ts_function"
|
||||
set-face global ts_function_method "@ts_function"
|
||||
set-face global ts_function_special "@ts_function"
|
||||
set-face global ts_hint "%opt{blue}+b"
|
||||
set-face global ts_info "%opt{green}+b"
|
||||
set-face global ts_keyword "keyword"
|
||||
set-face global ts_keyword_control "@ts_keyword"
|
||||
set-face global ts_keyword_conditional "+i@ts_keyword"
|
||||
set-face global ts_keyword_control_conditional "+i@ts_keyword"
|
||||
set-face global ts_keyword_control_directive "+i@ts_keyword"
|
||||
set-face global ts_keyword_control_import "+i@ts_keyword"
|
||||
set-face global ts_keyword_control_repeat "@ts_keyword"
|
||||
set-face global ts_keyword_control_return "@ts_keyword"
|
||||
set-face global ts_keyword_control_except "@ts_keyword"
|
||||
set-face global ts_keyword_control_exception "@ts_keyword"
|
||||
set-face global ts_keyword_directive "+i@ts_keyword"
|
||||
set-face global ts_keyword_function "@ts_keyword"
|
||||
set-face global ts_keyword_operator "@ts_keyword"
|
||||
set-face global ts_keyword_special "@ts_keyword"
|
||||
set-face global ts_keyword_storage "@ts_keyword"
|
||||
set-face global ts_keyword_storage_modifier "@ts_keyword"
|
||||
set-face global ts_keyword_storage_modifier_mut "@ts_keyword"
|
||||
set-face global ts_keyword_storage_modifier_ref "@ts_keyword"
|
||||
set-face global ts_keyword_storage_type "@ts_keyword"
|
||||
set-face global ts_label "%opt{sapphire}+i"
|
||||
set-face global ts_markup_bold "%opt{peach}+b"
|
||||
set-face global ts_markup_heading "%opt{red}"
|
||||
set-face global ts_markup_heading_1 "%opt{red}"
|
||||
set-face global ts_markup_heading_2 "%opt{mauve}"
|
||||
set-face global ts_markup_heading_3 "%opt{green}"
|
||||
set-face global ts_markup_heading_4 "%opt{yellow}"
|
||||
set-face global ts_markup_heading_5 "%opt{pink}"
|
||||
set-face global ts_markup_heading_6 "%opt{teal}"
|
||||
set-face global ts_markup_heading_marker "%opt{peach}+b"
|
||||
set-face global ts_markup_italic "%opt{pink}+i"
|
||||
set-face global ts_markup_list_checked "%opt{green}"
|
||||
set-face global ts_markup_list_numbered "%opt{blue}+i"
|
||||
set-face global ts_markup_list_unchecked "%opt{teal}"
|
||||
set-face global ts_markup_list_unnumbered "%opt{mauve}"
|
||||
set-face global ts_markup_link_label "%opt{blue}"
|
||||
set-face global ts_markup_link_url "%opt{teal}+u"
|
||||
set-face global ts_markup_link_uri "%opt{teal}+u"
|
||||
set-face global ts_markup_link_text "%opt{blue}"
|
||||
set-face global ts_markup_quote "%opt{gray1}"
|
||||
set-face global ts_markup_raw "%opt{sky}"
|
||||
set-face global ts_markup_raw_block "%opt{sky}"
|
||||
set-face global ts_markup_raw_inline "%opt{green}"
|
||||
set-face global ts_markup_strikethrough "%opt{gray1}+s"
|
||||
set-face global ts_namespace "@module"
|
||||
set-face global ts_operator "@operator"
|
||||
set-face global ts_property "%opt{sky}"
|
||||
set-face global ts_punctuation "%opt{overlay2}"
|
||||
set-face global ts_punctuation_bracket "@ts_punctuation"
|
||||
set-face global ts_punctuation_delimiter "@ts_punctuation"
|
||||
set-face global ts_punctuation_special "%opt{sky}"
|
||||
set-face global ts_special "%opt{blue}"
|
||||
set-face global ts_spell "%opt{mauve}"
|
||||
set-face global ts_string "%opt{green}"
|
||||
set-face global ts_string_regex "%opt{peach}"
|
||||
set-face global ts_string_regexp "%opt{peach}"
|
||||
set-face global ts_string_escape "%opt{mauve}"
|
||||
set-face global ts_string_special "%opt{blue}"
|
||||
set-face global ts_string_special_path "%opt{green}"
|
||||
set-face global ts_string_special_symbol "%opt{mauve}"
|
||||
set-face global ts_string_symbol "%opt{red}"
|
||||
set-face global ts_tag "%opt{teal}"
|
||||
set-face global ts_tag_error "%opt{red}"
|
||||
set-face global ts_text "@ts_string"
|
||||
set-face global ts_text_title "%opt{mauve}"
|
||||
set-face global ts_type "%opt{yellow}"
|
||||
set-face global ts_type_builtin "@ts_type"
|
||||
set-face global ts_type_enum_variant "%opt{flamingo}"
|
||||
set-face global ts_variable "@variable"
|
||||
set-face global ts_variable_builtin "@builtin"
|
||||
set-face global ts_variable_other_member "%opt{teal}"
|
||||
set-face global ts_variable_parameter "%opt{maroon}+i"
|
||||
set-face global ts_warning "%opt{peach}+b"
|
Loading…
Add table
Add a link
Reference in a new issue