Much fun stuff
- Add aerc, a terminal email client - Switch to gruvbox colorschemes - Improve base16 Support in kakoune - Add buffer switch binding in kakoune - Correct quick file openers to real files in kakoune - Add proper tab indentation and quick selection to kakoune - Add markdown support and harper spellcheck in kakoune - Import shellpath into a kakoune variable so it can be used in kakscripts - Add render markdown on toggle to kakoune to see approximate of final output - Add lazygit with config for visual git grepping - Add gdb debugger to C language - Add CLI tools: pv, mtr, shellcheck, wiki-tui and ddgr - Add tree as an alias to eza - Bash source .profile - Theme yazi with base16 - Add zk zettelkasten for note taking - Make home.nix imports look nicer
This commit is contained in:
1 parent
f60301981c
commit
da6f89df0d
15 files changed
+529
-123
No files matched your search
+51
-79
@@ -1,89 +1,61 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{ config, ... }:
|
||||
let
|
||||
c = config.colorScheme.palette;
|
||||
rgb = hex: "rgb:${lib.toLower hex}";
|
||||
rgb = hex: "rgb:${hex}";
|
||||
in
|
||||
{
|
||||
xdg.configFile."kak/colors/nix-colorscheme.kak".text = ''
|
||||
declare-option str bg_main '${rgb c.base00}'
|
||||
declare-option str fg_main '${rgb c.base05}'
|
||||
declare-option str bg_dim '${rgb c.base01}'
|
||||
declare-option str fg_dim '${rgb c.base03}'
|
||||
declare-option str bg_alt '${rgb c.base02}'
|
||||
declare-option str fg_alt '${rgb c.base04}'
|
||||
declare-option str bg_active '${rgb c.base02}'
|
||||
declare-option str bg_inactive '${rgb c.base01}'
|
||||
declare-option str red '${rgb c.base08}'
|
||||
declare-option str red_bright '${rgb c.base08}'
|
||||
declare-option str green '${rgb c.base0B}'
|
||||
declare-option str green_bright '${rgb c.base0B}'
|
||||
declare-option str yellow '${rgb c.base0A}'
|
||||
declare-option str yellow_bright '${rgb c.base0A}'
|
||||
declare-option str blue '${rgb c.base0D}'
|
||||
declare-option str blue_bright '${rgb c.base0D}'
|
||||
declare-option str purple '${rgb c.base0E}'
|
||||
declare-option str purple_bright '${rgb c.base0E}'
|
||||
declare-option str bg_mode_line '${rgb c.base07}'
|
||||
declare-option str fg_mode_line '${rgb c.base06}'
|
||||
declare-option str cursor '${rgb c.base0B}'
|
||||
declare-option str bg_hl_line '${rgb c.base01}'
|
||||
declare-option str fg_space '${rgb c.base03}'
|
||||
declare-option str psel '${rgb c.base02}'
|
||||
declare-option str ssel '${rgb c.base01}'
|
||||
## base16.kak — driven by nix-colors palette (${config.colorScheme.name})
|
||||
|
||||
# For code
|
||||
set-face global value '${rgb c.base05}'
|
||||
set-face global type '${rgb c.base0D}'
|
||||
set-face global variable '${rgb c.base0C}'
|
||||
set-face global keyword '${rgb c.base0B}'
|
||||
set-face global module '${rgb c.base05}'
|
||||
set-face global function '${rgb c.base0A}'
|
||||
set-face global string '${rgb c.base08}'
|
||||
set-face global builtin '${rgb c.base0B}'
|
||||
set-face global constant '${rgb c.base0B}'
|
||||
set-face global comment '${rgb c.base0F}'
|
||||
set-face global meta '${rgb c.base08}'
|
||||
set-face global operator '${rgb c.base05}'
|
||||
set-face global comma '${rgb c.base05}'
|
||||
set-face global bracket '${rgb c.base0C}'
|
||||
## code
|
||||
face global value ${rgb c.base09}+b
|
||||
face global type ${rgb c.base0A}
|
||||
face global variable ${rgb c.base08}
|
||||
face global module ${rgb c.base0B}
|
||||
face global function ${rgb c.base0D}
|
||||
face global string ${rgb c.base0B}
|
||||
face global keyword ${rgb c.base0E}+b
|
||||
face global operator ${rgb c.base0C}
|
||||
face global attribute ${rgb c.base09}
|
||||
face global comment ${rgb c.base03}
|
||||
face global documentation comment
|
||||
face global meta ${rgb c.base0A}
|
||||
face global builtin default+b
|
||||
|
||||
# For markup
|
||||
set-face global title "%opt{purple}"
|
||||
set-face global header "%opt{yellow_bright}"
|
||||
set-face global bold "%opt{purple}"
|
||||
set-face global italic "%opt{purple_bright}"
|
||||
set-face global mono "%opt{green}"
|
||||
set-face global block "%opt{blue_bright}"
|
||||
set-face global link "%opt{green}"
|
||||
set-face global bullet "%opt{green}"
|
||||
set-face global list "%opt{fg_main}"
|
||||
## markup
|
||||
face global title ${rgb c.base0D}
|
||||
face global header ${rgb c.base0D}
|
||||
face global mono ${rgb c.base0B}
|
||||
face global block ${rgb c.base09}
|
||||
face global link ${rgb c.base0D}
|
||||
face global bullet ${rgb c.base0F}
|
||||
face global list ${rgb c.base08}
|
||||
|
||||
# Builtin faces
|
||||
set-face global Default "%opt{fg_main},%opt{bg_main}"
|
||||
set-face global PrimarySelection "default,%opt{psel}"
|
||||
set-face global SecondarySelection "default,%opt{ssel}"
|
||||
set-face global PrimaryCursor "%opt{bg_main},%opt{cursor}"
|
||||
set-face global SecondaryCursor "%opt{bg_main},%opt{fg_alt}"
|
||||
set-face global PrimaryCursorEol "%opt{bg_main},%opt{red_bright}"
|
||||
set-face global SecondaryCursorEol "%opt{bg_main},%opt{blue}"
|
||||
set-face global LineNumbers "%opt{fg_dim},%opt{bg_main}"
|
||||
set-face global LineNumberCursor "%opt{fg_alt},%opt{bg_main}+b"
|
||||
set-face global LineNumbersWrapped "%opt{bg_dim},%opt{bg_main}+i"
|
||||
set-face global MenuForeground "%opt{bg_main},%opt{fg_main}+b"
|
||||
set-face global MenuBackground "%opt{fg_main},%opt{bg_alt}"
|
||||
set-face global MenuInfo "%opt{fg_alt},%opt{bg_alt}"
|
||||
set-face global Information "%opt{fg_mode_line},%opt{bg_mode_line}"
|
||||
set-face global Error "%opt{red},%opt{bg_mode_line}"
|
||||
set-face global StatusLine "%opt{fg_mode_line},%opt{bg_mode_line}"
|
||||
set-face global StatusLineMode "%opt{fg_mode_line},%opt{bg_mode_line}"
|
||||
set-face global StatusLineInfo "%opt{fg_mode_line},%opt{bg_mode_line}"
|
||||
set-face global StatusLineValue "%opt{fg_mode_line},%opt{bg_mode_line}"
|
||||
set-face global StatusCursor "%opt{fg_main},%opt{blue}"
|
||||
set-face global Prompt "%opt{fg_mode_line},%opt{bg_mode_line}"
|
||||
set-face global MatchingChar "%opt{blue},%opt{bg_main}"
|
||||
set-face global Whitespace "%opt{fg_space},%opt{bg_main}+f"
|
||||
set-face global WrapMarker Whitespace
|
||||
set-face global BufferPadding "%opt{bg_main},%opt{bg_main}"
|
||||
## builtin
|
||||
face global Default ${rgb c.base05},${rgb c.base00}
|
||||
face global PrimarySelection ${rgb c.base00},${rgb c.base0D}+fg
|
||||
face global SecondarySelection ${rgb c.base00},${rgb c.base03}+fg
|
||||
face global PrimaryCursor ${rgb c.base00},${rgb c.base05}+fg
|
||||
face global SecondaryCursor ${rgb c.base00},${rgb c.base05}+fg
|
||||
face global PrimaryCursorEol ${rgb c.base00},${rgb c.base0C}+fg
|
||||
face global SecondaryCursorEol ${rgb c.base00},${rgb c.base0C}+fg
|
||||
face global LineNumbers ${rgb c.base03},${rgb c.base00}
|
||||
face global LineNumberCursor ${rgb c.base05},${rgb c.base01}+b
|
||||
face global MenuForeground ${rgb c.base00},${rgb c.base0D}
|
||||
face global MenuBackground ${rgb c.base05},${rgb c.base01}
|
||||
face global MenuInfo ${rgb c.base0C}
|
||||
face global Information ${rgb c.base00},${rgb c.base0C}
|
||||
face global Error ${rgb c.base00},${rgb c.base08}
|
||||
face global DiagnosticError ${rgb c.base08}
|
||||
face global DiagnosticWarning ${rgb c.base0A}
|
||||
face global StatusLine ${rgb c.base05},${rgb c.base01}
|
||||
face global StatusLineMode ${rgb c.base09}
|
||||
face global StatusLineInfo ${rgb c.base0C}
|
||||
face global StatusLineValue ${rgb c.base0B}
|
||||
face global StatusCursor ${rgb c.base01},${rgb c.base0C}
|
||||
face global Prompt ${rgb c.base00},${rgb c.base0C}
|
||||
face global MatchingChar ${rgb c.base0C},${rgb c.base01}+b
|
||||
face global BufferPadding ${rgb c.base03},${rgb c.base00}
|
||||
face global Whitespace ${rgb c.base03}+f
|
||||
'';
|
||||
}
|
||||
@@ -46,17 +46,21 @@ map global buffer-mode d ':delete-buffer<ret>' -docstring 'delete buffer'
|
||||
map global buffer-mode k ':delete-buffer!<ret>' -docstring 'kill buffer'
|
||||
map global buffer-mode n ':buffer-next<ret>' -docstring 'next buffer'
|
||||
map global buffer-mode p ':buffer-previous<ret>' -docstring 'previous buffer'
|
||||
map global buffer-mode b ':buffer ' -docstring 'buffer switch'
|
||||
|
||||
# Comment Line
|
||||
map global normal '#' ':comment-line<ret>'
|
||||
|
||||
# File Keybinds
|
||||
declare-user-mode file-mode
|
||||
map global user f ':enter-user-mode file-mode<ret>' -docstring 'file...'
|
||||
map global user f ':enter-user-mode file-mode<ret>' -docstring 'file...'
|
||||
map global file-mode f '<esc>:prompt -shell-script-candidates %{ fd --type f } file: %{ edit %val{text} }<ret>' -docstring 'find file'
|
||||
map global file-mode c ':e ~/.config/kak/kakrc<ret>' -docstring 'open config'
|
||||
map global file-mode t ':e ~/Documents/Notes/TODO.md<ret>' -docstring 'open todo'
|
||||
map global file-mode a ':e ~/.config/almoxarife.yaml' -docstring 'open alconf'
|
||||
map global file-mode p '<esc>:prompt -shell-script-candidates %{ fd --type f . "$(dirname "$kak_buffile")" } file: %{ edit %val{text} }<ret>' -docstring 'find file from buffer'
|
||||
map global file-mode g ':grep -i ' -docstring 'grep files'
|
||||
|
||||
map global file-mode c ':e ~/.config/home-manager/config/kakoune/config.kak<ret>' -docstring 'open config'
|
||||
map global file-mode t ':e ~/Documents/Notes/TODO.md<ret>' -docstring 'open todo'
|
||||
map global file-mode n ':e ~/.config/home-manager/home.nix' -docstring 'open nix'
|
||||
|
||||
# Search case-insensitive by default
|
||||
map global normal '/' '/(?Si)'
|
||||
@@ -107,6 +111,7 @@ hook global InsertCompletionShow .* %{
|
||||
map global normal <tab> '>'
|
||||
map global normal <s-tab> '<'
|
||||
|
||||
# Go to start of line intelligently based on indentation
|
||||
define-command smart-gh -docstring 'smart goto line start' \
|
||||
%{
|
||||
set-register c %val{cursor_column}
|
||||
@@ -126,6 +131,19 @@ map global goto h '<esc>:smart-gh<ret>' -docstring 'line begin (smart)'
|
||||
declare-user-mode window-mode
|
||||
map global user w ':enter-user-mode window-mode<ret>' -docstring 'window...'
|
||||
map global window-mode c ':kitty-terminal-window kak -c %val{session}<ret>' -docstring 'create new window'
|
||||
map global window-mode t ':kitty-terminal-window %opt{shellpath}<ret>' -docstring 'create terminal window'
|
||||
|
||||
# Selection binds
|
||||
declare-user-mode select-mode
|
||||
map global user s ':enter-user-mode select-mode<ret>' -docstring 'select...'
|
||||
map global select-mode i '<a-i>' -docstring 'select inside object'
|
||||
map global select-mode a '<a-a>' -docstring 'select around object'
|
||||
|
||||
# Tab Indenting
|
||||
hook global WinSetOption filetype=(?!makefile).* %{
|
||||
map buffer insert <tab> '<a-;><a-gt>'
|
||||
map buffer insert <s-tab> '<a-;><a-lt>'
|
||||
}
|
||||
|
||||
# ~~~
|
||||
# LSP
|
||||
@@ -141,7 +159,7 @@ map global goto d <esc>:lsp-definition<ret> -docstring 'LSP definition'
|
||||
map global goto r <esc>:lsp-references<ret> -docstring 'LSP references'
|
||||
map global goto y <esc>:lsp-type-definition<ret> -docstring 'LSP type definition'
|
||||
|
||||
map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
|
||||
# map global insert <tab> '<a-;>:try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks <lt>tab> }<ret>' -docstring 'Select next snippet placeholder'
|
||||
|
||||
map global object a '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
|
||||
map global object <a-a> '<a-semicolon>lsp-object<ret>' -docstring 'LSP any symbol'
|
||||
@@ -174,8 +192,6 @@ define-command W %{
|
||||
|
||||
# LSP language configs
|
||||
# Lua
|
||||
#
|
||||
#
|
||||
hook global BufSetOption filetype=lua %{
|
||||
set-option buffer lsp_servers %exp{
|
||||
# Minimal setup for luals (Lua doesn't really work with LSP, I've tried)
|
||||
@@ -235,6 +251,37 @@ hook global BufSetOption filetype=typst %{
|
||||
[tinymist.settings]
|
||||
exportPdf = "onType"
|
||||
outputPath = "$root/target/$dir/$name"
|
||||
[harper]
|
||||
filetypes = ["typst"]
|
||||
root_globs = ["*.typst"]
|
||||
command = "harper-ls"
|
||||
args = ["--stdio"]
|
||||
settings_section = "_"
|
||||
[harper.settings._.harper-ls]
|
||||
#isolateEnglish = true # Currently very buggy
|
||||
dialect = "British"
|
||||
}
|
||||
}
|
||||
|
||||
# Markdown
|
||||
hook global BufSetOption filetype=markdown %{
|
||||
set-option buffer lsp_servers %exp{
|
||||
[zk_lsp]
|
||||
filetypes = ["markdown"]
|
||||
root_globs = [".git/", ".zk/", ".kakrc"]
|
||||
command = "zk"
|
||||
args = ["lsp"]
|
||||
[harper]
|
||||
filetypes = ["markdown"]
|
||||
root_globs = [".git/", ".zk/", ".kakrc"]
|
||||
command = "harper-ls"
|
||||
args = ["--stdio"]
|
||||
settings_section = "_"
|
||||
[harper.settings._.harper-ls]
|
||||
#isolateEnglish = true # Currently very buggy
|
||||
dialect = "British"
|
||||
[harper.settings._.harper-ls.markdown]
|
||||
IgnoreLinkTitle = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
ripgrep
|
||||
fd
|
||||
kakoune-lsp
|
||||
harper
|
||||
];
|
||||
|
||||
programs.kakoune = {
|
||||
@@ -16,10 +17,10 @@
|
||||
|
||||
extraConfig = lib.concatStringsSep "\n" [
|
||||
"# Venomade's kakrc - my quest for a faster editor"
|
||||
"declare-option str shellpath \"${config.shellpath}\""
|
||||
(builtins.readFile ./colemak.kak)
|
||||
(builtins.readFile ./config.kak)
|
||||
(builtins.readFile ./plugins.kak)
|
||||
"map global window-mode t ':kitty-terminal-window ${config.shellpath}<ret>' -docstring 'create terminal window'"
|
||||
];
|
||||
|
||||
plugins = import ./plugins.nix { inherit pkgs lib; };
|
||||
|
||||
@@ -21,7 +21,7 @@ harpoon-add-bindings
|
||||
|
||||
# focus:
|
||||
# location: https://github.com/caksoylar/kakoune-focus
|
||||
map global user s ':focus-toggle<ret>' -docstring "toggle selections focus"
|
||||
map global select-mode s ':focus-toggle<ret>' -docstring "selections focus"
|
||||
define-command focus-live-enable %{
|
||||
focus-selections
|
||||
hook -group focus window NormalIdle .* %{ focus-extend }
|
||||
@@ -35,3 +35,15 @@ define-command focus-live-disable %{
|
||||
# location: https://github.com/andreyorst/fzf.kak
|
||||
require-module fzf
|
||||
# map global file-mode f ':fzf-mode<ret>' -docstring 'fzf'
|
||||
|
||||
# render-markdown:
|
||||
# location: https://github.com/kmafeni04/render-markdown.kak
|
||||
hook global WinSetOption filetype=markdown %{
|
||||
map buffer user t ':render-markdown-toggle<ret>' -docstring 'toggle rendering'
|
||||
}
|
||||
declare-option str render_markdown_heading_1 "{blue+fb}"
|
||||
declare-option str render_markdown_heading_2 "{green+fb}"
|
||||
declare-option str render_markdown_heading_3 "{yellow+fb}"
|
||||
declare-option str render_markdown_heading_4 "{cyan+fb}"
|
||||
declare-option str render_markdown_heading_5 "{magenta+fb}"
|
||||
declare-option str render_markdown_heading_6 "{red+fb}"
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
[
|
||||
(pkgs.kakouneUtils.buildKakounePluginFrom2Nix {
|
||||
@@ -76,4 +76,15 @@
|
||||
sha256 = "sha256-3aj39UW5wsDpjpDJm7HDFkCGjx6+VHrBTkEC0sjyKkI=";
|
||||
};
|
||||
})
|
||||
|
||||
(pkgs.kakouneUtils.buildKakounePluginFrom2Nix {
|
||||
pname = "render-markdown";
|
||||
version = "master";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kmafeni04";
|
||||
repo = "render-markdown.kak";
|
||||
rev = "master";
|
||||
sha256 = "sha256-6a+pIO9viXU7KCFG8rkzwvUNak1Rqm3Jty1FxUffXJo=";
|
||||
};
|
||||
})
|
||||
]
|
||||
Reference in new issue
Block a user