Big tweaks for kakoune
Adds kak-tree-sitter, and catppuccin theme. Make them work together.
This commit is contained in:
parent
5a9dbf660b
commit
da7cb27c04
7 changed files with 220 additions and 59 deletions
|
@ -42,8 +42,14 @@ in
|
|||
{
|
||||
imports = [ ../modules/programs/my-kakoune ./kaktex.nix ];
|
||||
|
||||
# ctags for peneira
|
||||
home.packages = [ pkgs.universal-ctags ];
|
||||
home.packages = with pkgs; [
|
||||
# ctags for peneira
|
||||
universal-ctags
|
||||
# tree-sitter for kak
|
||||
kak-tree-sitter
|
||||
];
|
||||
|
||||
# xdg.configFile."kak-tree-sitter/config.toml".source = ./kak-tree-sitter.toml;
|
||||
|
||||
# Enable the kakoune package.
|
||||
programs.my-kakoune.enable = true;
|
||||
|
@ -92,7 +98,8 @@ in
|
|||
|
||||
programs.my-kakoune.package = kakounePkg;
|
||||
programs.my-kakoune.rc =
|
||||
builtins.readFile ./kakrc + ''
|
||||
builtins.readFile ./kakrc +
|
||||
builtins.readFile ./reload-faces.kak + ''
|
||||
|
||||
# Source any settings in the current working directory,
|
||||
# recursive upwards
|
||||
|
@ -269,5 +276,11 @@ in
|
|||
'';
|
||||
}
|
||||
];
|
||||
programs.my-kakoune.themes = {
|
||||
catppuccin-latte = builtins.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/catppuccin/kakoune/f6d43770609433c45046632f1bb68d1395305dbb/colors/catppuccin_latte.kak";
|
||||
sha256 = "sha256:0ycvxs8hmsvd0zrpxiby16wzmapvmz6p34b6j343pc1girw6fi4i";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,30 +1,8 @@
|
|||
# Enable kak-tree-sitter
|
||||
eval %sh{ kak-tree-sitter --kakoune -d }
|
||||
# Color scheme
|
||||
colorscheme github
|
||||
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
|
||||
colorscheme catppuccin-latte
|
||||
set global background default
|
||||
|
||||
# Assistant
|
||||
set global ui_options terminal_assistant=cat
|
||||
|
@ -131,7 +109,7 @@ hook global WinSetOption filetype=(rust) %{
|
|||
lsp-inlay-hints-enable window
|
||||
}
|
||||
|
||||
hook global WinSetOption filetype=(rust|go|fsharp|scala) %{
|
||||
hook global WinSetOption filetype=(rust|go|fsharp) %{
|
||||
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
|
||||
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
|
||||
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens
|
||||
|
|
130
home/kakoune/reload-faces.kak
Normal file
130
home/kakoune/reload-faces.kak
Normal file
|
@ -0,0 +1,130 @@
|
|||
# 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