Compare commits
No commits in common. "ae6d51e3bae8877e5924f2e8ba784450417ba7aa" and "20b73e4362209dfea088acc2a8f246ea4015a6e4" have entirely different histories.
ae6d51e3ba
...
20b73e4362
20 changed files with 745 additions and 1 deletions
|
@ -21,4 +21,3 @@ alias gda='gitdf add'
|
||||||
alias gdap='gitdf add -p'
|
alias gdap='gitdf add -p'
|
||||||
alias gds='gitdf status'
|
alias gds='gitdf status'
|
||||||
alias gdp='gitdf push'
|
alias gdp='gitdf push'
|
||||||
alias lazygitdf='lazygit --git-dir=$HOME/.config/dotfiles/ --work-tree=$HOME'
|
|
||||||
|
|
72
.config/kak/colors/grayscale-superiority.kak
Normal file
72
.config/kak/colors/grayscale-superiority.kak
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
evaluate-commands %sh{
|
||||||
|
black="rgb:000000"
|
||||||
|
dark_gray="rgb:333333"
|
||||||
|
gray="rgb:474747"
|
||||||
|
white="rgb:FFFFFF"
|
||||||
|
whiteish="rgb:DDDDDD"
|
||||||
|
|
||||||
|
pale_blue="rgb:BBCCEE"
|
||||||
|
pale_cyan="rgb:CCEEFF"
|
||||||
|
dark_blue="rgb:222255"
|
||||||
|
dark_cyan="rgb:225555"
|
||||||
|
dark_grey="rgb:555555"
|
||||||
|
vibrant_grey="rgb:BBBBBB"
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
# For Code
|
||||||
|
set-face global keyword Default
|
||||||
|
set-face global attribute Default
|
||||||
|
set-face global type Default
|
||||||
|
set-face global string ${gray}
|
||||||
|
set-face global value Default
|
||||||
|
set-face global meta Default
|
||||||
|
set-face global builtin Default
|
||||||
|
set-face global module Default
|
||||||
|
set-face global comment ${gray}+i
|
||||||
|
set-face global documentation comment
|
||||||
|
set-face global function Default
|
||||||
|
set-face global operator Default
|
||||||
|
set-face global variable Default
|
||||||
|
|
||||||
|
# For markup
|
||||||
|
set-face global title +b
|
||||||
|
set-face global header +b
|
||||||
|
set-face global block Default
|
||||||
|
set-face global mono Default
|
||||||
|
set-face global link +u
|
||||||
|
set-face global list Default
|
||||||
|
set-face global bullet +b
|
||||||
|
|
||||||
|
# Built-in faces
|
||||||
|
set-face global Default ${black},${white}
|
||||||
|
set-face global PrimarySelection ${black},${pale_blue}+fg
|
||||||
|
set-face global SecondarySelection ${black},${pale_cyan}+fg
|
||||||
|
set-face global PrimaryCursor ${white},${dark_blue}+fg
|
||||||
|
set-face global SecondaryCursor ${white},${dark_cyan}+fg
|
||||||
|
set-face global PrimaryCursorEol ${white},${dark_grey}+fg
|
||||||
|
set-face global SecondaryCursorEol ${white},${vibrant_grey}+fg
|
||||||
|
|
||||||
|
set-face global StatusLine ${black},${whiteish}
|
||||||
|
set-face global StatusLineMode ${black},${whiteish}
|
||||||
|
set-face global StatusLineInfo ${black},${whiteish}
|
||||||
|
set-face global StatusLineValue ${black},${whiteish}+b
|
||||||
|
set-face global StatusCursor PrimaryCursor
|
||||||
|
set-face global Prompt ${black},${whiteish}
|
||||||
|
set-face global MenuForeground ${whiteish},${black}
|
||||||
|
set-face global MenuBackground ${black},${whiteish}
|
||||||
|
set-face global MenuInfo +i
|
||||||
|
|
||||||
|
set-face global LineNumbers ${black},${whiteish}
|
||||||
|
set-face global LineNumbersWrapped ${black},${whiteish}+i
|
||||||
|
set-face global LineNumberCursor ${black},rgb:CCCCCC+b
|
||||||
|
set-face global MatchingChar ${black},${whiteish}+b
|
||||||
|
set-face global Whitespace Default
|
||||||
|
set-face global WrapMarker ${black},${whiteish}
|
||||||
|
|
||||||
|
set-face global Information ${black},${whiteish}
|
||||||
|
set-face global Error rgb:DD0000,${whiteish}
|
||||||
|
set-face global BufferPadding Default
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
76
.config/kak/colors/rose-pine-dawn.kak
Normal file
76
.config/kak/colors/rose-pine-dawn.kak
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
evaluate-commands %sh{
|
||||||
|
|
||||||
|
base=rgb:faf4ed
|
||||||
|
surface=rgb:fffaf3
|
||||||
|
overlay=rgb:f2e9de
|
||||||
|
inactive=rgb:9893a5
|
||||||
|
subtle=rgb:6e6a86
|
||||||
|
text=rgb:575279
|
||||||
|
love=rgb:b4637a
|
||||||
|
gold=rgb:ea9d34
|
||||||
|
rose=rgb:d7827e
|
||||||
|
pine=rgb:286983
|
||||||
|
foam=rgb:56949f
|
||||||
|
iris=rgb:907aa9
|
||||||
|
highlight=rgb:eee9e6
|
||||||
|
highlightInactive=rgb:f2ede9
|
||||||
|
highlightOverlay=rgb:e4dfde
|
||||||
|
|
||||||
|
|
||||||
|
## code
|
||||||
|
echo "
|
||||||
|
face global value ${iris}
|
||||||
|
face global type ${iris}
|
||||||
|
face global identifier ${subtle}
|
||||||
|
face global string ${gold}
|
||||||
|
face global keyword ${pine}
|
||||||
|
face global operator default
|
||||||
|
face global attribute ${foam}
|
||||||
|
face global comment ${subtle}+i
|
||||||
|
face global meta ${foam}
|
||||||
|
face global builtin ${pine}
|
||||||
|
|
||||||
|
face global variable ${rose}
|
||||||
|
face global module ${foam}
|
||||||
|
face global function ${foam}
|
||||||
|
"
|
||||||
|
|
||||||
|
## markup
|
||||||
|
echo "
|
||||||
|
face global title ${rose}+b
|
||||||
|
face global header ${rose}
|
||||||
|
face global bold default
|
||||||
|
face global italic default
|
||||||
|
face global mono ${rose}
|
||||||
|
face global block ${pine}
|
||||||
|
face global link ${love}
|
||||||
|
face global bullet ${rose}
|
||||||
|
face global list ${rose}
|
||||||
|
"
|
||||||
|
|
||||||
|
## builtin
|
||||||
|
echo "
|
||||||
|
face global Default ${text},${base}
|
||||||
|
face global PrimarySelection default,${highlight}
|
||||||
|
face global SecondarySelection default,${highlightInactive}
|
||||||
|
face global PrimaryCursor ${base},${text}
|
||||||
|
face global SecondaryCursor default,${inactive}
|
||||||
|
face global LineNumbers ${subtle},${base}
|
||||||
|
face global LineNumberCursor ${gold},${base}
|
||||||
|
face global MenuForeground ${text},${overlay}
|
||||||
|
face global MenuBackground ${subtle},${surface}
|
||||||
|
face global MenuInfo ${inactive}
|
||||||
|
face global Information ${text},${overlay}
|
||||||
|
face global Error ${base},${love}
|
||||||
|
face global StatusLine ${text},${surface}
|
||||||
|
face global StatusLineMode ${rose}
|
||||||
|
face global StatusLineInfo ${foam}
|
||||||
|
face global StatusLineValue ${pine}
|
||||||
|
face global StatusCursor ${base},${text}
|
||||||
|
face global Prompt ${foam},${surface}
|
||||||
|
face global MatchingChar default+u
|
||||||
|
face global BufferPadding ${inactive},${base}
|
||||||
|
face global Whitespace ${inactive}+f
|
||||||
|
"
|
||||||
|
|
||||||
|
}
|
76
.config/kak/colors/rose-pine-moon.kak
Normal file
76
.config/kak/colors/rose-pine-moon.kak
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
evaluate-commands %sh{
|
||||||
|
|
||||||
|
base=rgb:232136
|
||||||
|
surface=rgb:2a273f
|
||||||
|
overlay=rgb:393552
|
||||||
|
inactive=rgb:59546d
|
||||||
|
subtle=rgb:817c9c
|
||||||
|
text=rgb:e0def4
|
||||||
|
love=rgb:eb6f92
|
||||||
|
gold=rgb:f6c177
|
||||||
|
rose=rgb:ea9a97
|
||||||
|
pine=rgb:3e8fb0
|
||||||
|
foam=rgb:9ccfd8
|
||||||
|
iris=rgb:c4a7e7
|
||||||
|
highlight=rgb:312f44
|
||||||
|
highlightInactive=rgb:2a283d
|
||||||
|
highlightOverlay=rgb:3f3c53
|
||||||
|
|
||||||
|
|
||||||
|
## code
|
||||||
|
echo "
|
||||||
|
face global value ${iris}
|
||||||
|
face global type ${iris}
|
||||||
|
face global identifier ${subtle}
|
||||||
|
face global string ${gold}
|
||||||
|
face global keyword ${pine}
|
||||||
|
face global operator default
|
||||||
|
face global attribute ${foam}
|
||||||
|
face global comment ${subtle}+i
|
||||||
|
face global meta ${foam}
|
||||||
|
face global builtin ${pine}
|
||||||
|
|
||||||
|
face global variable ${rose}
|
||||||
|
face global module ${foam}
|
||||||
|
face global function ${foam}
|
||||||
|
"
|
||||||
|
|
||||||
|
## markup
|
||||||
|
echo "
|
||||||
|
face global title ${rose}+b
|
||||||
|
face global header ${rose}
|
||||||
|
face global bold default
|
||||||
|
face global italic default
|
||||||
|
face global mono ${rose}
|
||||||
|
face global block ${pine}
|
||||||
|
face global link ${love}
|
||||||
|
face global bullet ${rose}
|
||||||
|
face global list ${rose}
|
||||||
|
"
|
||||||
|
|
||||||
|
## builtin
|
||||||
|
echo "
|
||||||
|
face global Default ${text},${base}
|
||||||
|
face global PrimarySelection default,${highlight}
|
||||||
|
face global SecondarySelection default,${highlightInactive}
|
||||||
|
face global PrimaryCursor ${base},${text}
|
||||||
|
face global SecondaryCursor default,${inactive}
|
||||||
|
face global LineNumbers ${subtle},${base}
|
||||||
|
face global LineNumberCursor ${gold},${base}
|
||||||
|
face global MenuForeground ${text},${overlay}
|
||||||
|
face global MenuBackground ${subtle},${surface}
|
||||||
|
face global MenuInfo ${inactive}
|
||||||
|
face global Information ${text},${overlay}
|
||||||
|
face global Error ${base},${love}
|
||||||
|
face global StatusLine ${text},${surface}
|
||||||
|
face global StatusLineMode ${rose}
|
||||||
|
face global StatusLineInfo ${foam}
|
||||||
|
face global StatusLineValue ${pine}
|
||||||
|
face global StatusCursor ${base},${text}
|
||||||
|
face global Prompt ${foam},${surface}
|
||||||
|
face global MatchingChar default+u
|
||||||
|
face global BufferPadding ${inactive},${base}
|
||||||
|
face global Whitespace ${inactive}+f
|
||||||
|
"
|
||||||
|
|
||||||
|
}
|
76
.config/kak/colors/rose-pine.kak
Normal file
76
.config/kak/colors/rose-pine.kak
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
evaluate-commands %sh{
|
||||||
|
|
||||||
|
base=rgb:191724
|
||||||
|
surface=rgb:1f1d2e
|
||||||
|
overlay=rgb:26233a
|
||||||
|
inactive=rgb:555169
|
||||||
|
subtle=rgb:6e6a86
|
||||||
|
text=rgb:e0def4
|
||||||
|
love=rgb:eb6f92
|
||||||
|
gold=rgb:f6c177
|
||||||
|
rose=rgb:ebbcba
|
||||||
|
pine=rgb:31748f
|
||||||
|
foam=rgb:9ccfd8
|
||||||
|
iris=rgb:c4a7e7
|
||||||
|
highlight=rgb:2a2837
|
||||||
|
highlightInactive=rgb:211f2d
|
||||||
|
highlightOverlay=rgb:3a384a
|
||||||
|
|
||||||
|
|
||||||
|
## code
|
||||||
|
echo "
|
||||||
|
face global value ${iris}
|
||||||
|
face global type ${iris}
|
||||||
|
face global identifier ${subtle}
|
||||||
|
face global string ${gold}
|
||||||
|
face global keyword ${pine}
|
||||||
|
face global operator default
|
||||||
|
face global attribute ${foam}
|
||||||
|
face global comment ${subtle}+i
|
||||||
|
face global meta ${foam}
|
||||||
|
face global builtin ${pine}
|
||||||
|
|
||||||
|
face global variable ${rose}
|
||||||
|
face global module ${foam}
|
||||||
|
face global function ${foam}
|
||||||
|
"
|
||||||
|
|
||||||
|
## markup
|
||||||
|
echo "
|
||||||
|
face global title ${rose}+b
|
||||||
|
face global header ${rose}
|
||||||
|
face global bold default
|
||||||
|
face global italic default
|
||||||
|
face global mono ${rose}
|
||||||
|
face global block ${pine}
|
||||||
|
face global link ${love}
|
||||||
|
face global bullet ${rose}
|
||||||
|
face global list ${rose}
|
||||||
|
"
|
||||||
|
|
||||||
|
## builtin
|
||||||
|
echo "
|
||||||
|
face global Default ${text},${base}
|
||||||
|
face global PrimarySelection default,${highlight}
|
||||||
|
face global SecondarySelection default,${highlightInactive}
|
||||||
|
face global PrimaryCursor ${base},${text}
|
||||||
|
face global SecondaryCursor default,${inactive}
|
||||||
|
face global LineNumbers ${subtle},${base}
|
||||||
|
face global LineNumberCursor ${gold},${base}
|
||||||
|
face global MenuForeground ${text},${overlay}
|
||||||
|
face global MenuBackground ${subtle},${surface}
|
||||||
|
face global MenuInfo ${inactive}
|
||||||
|
face global Information ${text},${overlay}
|
||||||
|
face global Error ${base},${love}
|
||||||
|
face global StatusLine ${text},${surface}
|
||||||
|
face global StatusLineMode ${rose}
|
||||||
|
face global StatusLineInfo ${foam}
|
||||||
|
face global StatusLineValue ${pine}
|
||||||
|
face global StatusCursor ${base},${text}
|
||||||
|
face global Prompt ${foam},${surface}
|
||||||
|
face global MatchingChar default+u
|
||||||
|
face global BufferPadding ${inactive},${base}
|
||||||
|
face global Whitespace ${inactive}+f
|
||||||
|
"
|
||||||
|
|
||||||
|
}
|
166
.config/kak/kakrc
Normal file
166
.config/kak/kakrc
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
add-highlighter global/number number-lines -relative -hlcursor
|
||||||
|
add-highlighter global/ wrap -word
|
||||||
|
add-highlighter global/search dynregex '%reg{/}' 0:MatchingChar
|
||||||
|
add-highlighter global/ show-matching
|
||||||
|
|
||||||
|
set global scrolloff 5,5
|
||||||
|
|
||||||
|
set global ui_options terminal_assistant=off
|
||||||
|
set -add global ui_options terminal_status_on_top=true
|
||||||
|
|
||||||
|
# case insensitive search
|
||||||
|
map global normal / /(?i)
|
||||||
|
|
||||||
|
source ~/.cache/themer.lua/kakoune
|
||||||
|
|
||||||
|
# ------------
|
||||||
|
# Language Server Protocol
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
eval %sh{kak-lsp --kakoune -s $kak_session}
|
||||||
|
set global lsp_cmd "kak-lsp -s %val{session} -vvv --log /tmp/kak-lsp.log"
|
||||||
|
set global lsp_diagnostic_line_error_sign '║'
|
||||||
|
set global lsp_diagnostic_line_warning_sign '┊'
|
||||||
|
set global lsp_hover_anchor true
|
||||||
|
set global lsp_auto_show_code_actions true
|
||||||
|
hook global WinSetOption filetype=(zig|go|typescript|javascript) %{
|
||||||
|
set window lsp_auto_highlight_references true
|
||||||
|
map buffer user r ': lsp-rename-prompt<ret>' -docstring "LSP Rename"
|
||||||
|
map buffer user a ': lsp-code-actions<ret>' -docstring "LSP Code actions"
|
||||||
|
map buffer user , ': lsp-hover<ret>' -docstring "LSP hover"
|
||||||
|
map buffer user l ': enter-user-mode lsp<ret>' -docstring "LSP mode"
|
||||||
|
lsp-enable-window
|
||||||
|
lsp-auto-signature-help-enable
|
||||||
|
}
|
||||||
|
hook global WinSetOption filetype=(svelte) %{
|
||||||
|
map buffer user r ': lsp-rename-prompt<ret>' -docstring "LSP Rename"
|
||||||
|
map buffer user a ': lsp-code-actions<ret>' -docstring "LSP Code actions"
|
||||||
|
map buffer user , ': lsp-hover<ret>' -docstring "LSP hover"
|
||||||
|
map buffer user l ': enter-user-mode lsp<ret>' -docstring "LSP mode"
|
||||||
|
lsp-enable-window
|
||||||
|
lsp-auto-signature-help-enable
|
||||||
|
}
|
||||||
|
hook global KakEnd .* lsp-exit
|
||||||
|
|
||||||
|
# ------------
|
||||||
|
# Formateadores
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
hook global WinSetOption filetype=(javascript|typescript|json|css|svelte|html) %{
|
||||||
|
set-option buffer formatcmd %sh{ echo prettier --stdin-filepath $kak_buffile }
|
||||||
|
hook buffer BufWritePre .* format-buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
hook global WinSetOption filetype=zig %{
|
||||||
|
set-option buffer formatcmd "zig fmt --stdin"
|
||||||
|
hook buffer BufWritePre .* format-buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
hook global WinSetOption filetype=go %{
|
||||||
|
set-option buffer formatcmd "goimports"
|
||||||
|
hook buffer BufWritePre .* format-buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------------
|
||||||
|
# Usar Foot
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
hook global KakBegin .* %{ set-option global termcmd "footclient sh -c" }
|
||||||
|
define-command fzf-terminal -params 1.. -shell-completion %{
|
||||||
|
set-option global termcmd "footclient --app-id=fzf sh -c"
|
||||||
|
wayland-terminal %arg{@}
|
||||||
|
set-option global termcmd "footclient sh -c"
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------------
|
||||||
|
# Keybindings genericas
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
map -docstring "yank the selection into the clipboard" global user y "<a-|> wl-copy<ret>"
|
||||||
|
map -docstring "paste the clipboard" global user p "<a-!> wl-paste --no-newline<ret>"
|
||||||
|
map -docstring "comment" global user c ": comment-line<ret>"
|
||||||
|
map -docstring "stop searching" global user h ": set-register slash ''<ret>"
|
||||||
|
|
||||||
|
map -docstring "write" global user w ": write<ret>"
|
||||||
|
map -docstring "quit" global user q ": quit<ret>"
|
||||||
|
|
||||||
|
map -docstring "show whitespaces" global user s " :add-highlighter global/show-whitespaces show-whitespaces<ret>"
|
||||||
|
map -docstring "hide whitespaces" global user S " :remove-highlighter global/show-whitespaces<ret>"
|
||||||
|
|
||||||
|
map global insert '<c-w>' '<esc>b<a-c>'
|
||||||
|
|
||||||
|
# https://github.com/Gigahawk/nixdots/blob/c98340cc56c998ac52f62d0df49c541bafcaaad7/dotfiles/kakrc
|
||||||
|
# - to select inner object
|
||||||
|
# = to select outer object
|
||||||
|
map global normal -- - <a-i>
|
||||||
|
map global normal -- = <a-a>
|
||||||
|
|
||||||
|
# ------------
|
||||||
|
# Indentación
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
source "%val{config}/plugins/smarttab.kak/rc/smarttab.kak"
|
||||||
|
hook global ModuleLoaded smarttab %{
|
||||||
|
set-option global softtabstop 4
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sleuth es un "plugin" que detecta la identación del archivo y configura el editor para usarlo por defecto.
|
||||||
|
source "%val{config}/sleuth.kak"
|
||||||
|
hook -group sleuth global BufOpenFile .* %{ sleuth }
|
||||||
|
hook -group sleuth global BufWritePost .* %{ sleuth }
|
||||||
|
|
||||||
|
# ------------
|
||||||
|
# FZF
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
source "%val{config}/plugins/fzf.kak/rc/fzf.kak"
|
||||||
|
evaluate-commands %sh{
|
||||||
|
find -L "$kak_config/plugins/fzf.kak/rc/modules/" -type f -name '*.kak' -exec printf 'source "%s"\n' {} \;
|
||||||
|
}
|
||||||
|
hook global ModuleLoaded fzf %{
|
||||||
|
set-option global fzf_terminal_command 'fzf-terminal kak -c %val{session} -e "%arg{@}"'
|
||||||
|
}
|
||||||
|
hook global ModuleLoaded fzf-file %{
|
||||||
|
set-option global fzf_file_command 'rg -L --hidden --files --glob !.git'
|
||||||
|
}
|
||||||
|
hook global ModuleLoaded fzf-grep %{
|
||||||
|
set-option global fzf_grep_command 'rg'
|
||||||
|
}
|
||||||
|
map -docstring 'search files' global user f ': fzf-mode<ret>f'
|
||||||
|
map -docstring 'search buffers' global user b ': fzf-mode<ret>b'
|
||||||
|
map -docstring 'grep files' global user g ': fzf-mode<ret>g'
|
||||||
|
|
||||||
|
# ------------
|
||||||
|
# Buffer switching
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
source "%val{config}/plugins/kakoune-buffers/buffers.kak"
|
||||||
|
|
||||||
|
map global normal ^ q
|
||||||
|
map global normal <a-^> Q
|
||||||
|
|
||||||
|
map global normal q b
|
||||||
|
map global normal Q B
|
||||||
|
map global normal <a-q> <a-b>
|
||||||
|
map global normal <a-Q> <a-B>
|
||||||
|
|
||||||
|
map global normal b ':pick-buffers<ret>' -docstring 'pick buffers'
|
||||||
|
map global normal B ':enter-user-mode -lock buffers<ret>' -docstring 'buffers (lock)…'
|
||||||
|
|
||||||
|
map global normal '<c-p>' '<tab>' -docstring 'jump forward'
|
||||||
|
|
||||||
|
# ------------
|
||||||
|
# Comandos para interactuar con el mundo exterior
|
||||||
|
# ------------
|
||||||
|
|
||||||
|
define-command exportmd %{
|
||||||
|
nop %sh{
|
||||||
|
cd "$(dirname "$kak_buffile")"
|
||||||
|
exportmd pdf "$kak_buffile"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
define-command pcmanfm %{
|
||||||
|
nop %sh{
|
||||||
|
swaymsg exec "pcmanfm --new-win '$(dirname "$kak_buffile")'"
|
||||||
|
}
|
||||||
|
}
|
1
.config/kak/plugins/fzf.kak
Submodule
1
.config/kak/plugins/fzf.kak
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 62a3de575cceeaf9f556b824123a418def8bea7b
|
1
.config/kak/plugins/kakoune-buffers
Submodule
1
.config/kak/plugins/kakoune-buffers
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 6b2081f5b7d58c72de319a5cba7bf628b6802881
|
1
.config/kak/plugins/smarttab.kak
Submodule
1
.config/kak/plugins/smarttab.kak
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 1dd3f33c4f65da5c13aee5d44b2e77399595830f
|
1
.config/kak/plugins/zig.kak
Submodule
1
.config/kak/plugins/zig.kak
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 54e66fcb6adf247e6ea8465ec68fe507eb27f25f
|
22
.config/kak/sleuth.kak
Normal file
22
.config/kak/sleuth.kak
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# https://github.com/mawww/kakoune/issues/2108#issuecomment-721313321
|
||||||
|
define-command sleuth -docstring 'Heuristically set buffer options' %{
|
||||||
|
try %{
|
||||||
|
evaluate-commands -draft %{
|
||||||
|
# Search the first indent level
|
||||||
|
execute-keys 'gg' '/' '^\h+' '<ret>'
|
||||||
|
|
||||||
|
# Tab vs. Space
|
||||||
|
# https://youtu.be/V7PLxL8jIl8
|
||||||
|
try %{
|
||||||
|
execute-keys '<a-k>' '\t' '<ret>'
|
||||||
|
noexpandtab
|
||||||
|
set-option buffer indentwidth 0
|
||||||
|
} catch %{
|
||||||
|
expandtab
|
||||||
|
set-option buffer indentwidth %val{selection_length}
|
||||||
|
set-option buffer softtabstop %val{selection_length}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
1
.config/vis/plugins/commentary
Submodule
1
.config/vis/plugins/commentary
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 26db90cca7b062446a6cf5bc9317baf62bdf9a9b
|
1
.config/vis/plugins/cursors
Submodule
1
.config/vis/plugins/cursors
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit c19a2ceb71607aea6c34491fa325a1de2da8dfaf
|
1
.config/vis/plugins/fzf-mru
Submodule
1
.config/vis/plugins/fzf-mru
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit aafc3d18af1edefc117baffd1e3d0f073b2d3bd2
|
1
.config/vis/plugins/fzf-open
Submodule
1
.config/vis/plugins/fzf-open
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b1666a31e14338ff1bba0b39c729016048ca4b2d
|
50
.config/vis/themes/minimal-light.lua
Normal file
50
.config/vis/themes/minimal-light.lua
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
-- vis-minimal-theme (https://github.com/erf/vis-minimal-theme)
|
||||||
|
-- light by Erlend Lind Madsen
|
||||||
|
-- Modified by Nulo
|
||||||
|
|
||||||
|
local black0 = '#000000'
|
||||||
|
local black1 = '#383838'
|
||||||
|
local black2 = '#686868'
|
||||||
|
|
||||||
|
local white0 = '#ffffff'
|
||||||
|
local white05 = '#e8e8e8'
|
||||||
|
local white1 = '#c8c8c8'
|
||||||
|
local white2 = '#989898'
|
||||||
|
|
||||||
|
local lexers = vis.lexers
|
||||||
|
|
||||||
|
lexers.STYLE_DEFAULT ='back:'..white0..',fore:'..black0
|
||||||
|
lexers.STYLE_NOTHING = 'back:'..white0
|
||||||
|
lexers.STYLE_CLASS = 'fore:'..black0
|
||||||
|
lexers.STYLE_COMMENT = 'fore:'..white2
|
||||||
|
lexers.STYLE_CONSTANT = 'fore:'..black0
|
||||||
|
lexers.STYLE_DEFINITION = 'fore:'..black0
|
||||||
|
lexers.STYLE_ERROR = 'fore:'..black0
|
||||||
|
lexers.STYLE_FUNCTION = 'fore:'..black0
|
||||||
|
lexers.STYLE_KEYWORD = 'fore:'..black2
|
||||||
|
lexers.STYLE_LABEL = 'fore:'..black0
|
||||||
|
lexers.STYLE_NUMBER = 'fore:'..black1
|
||||||
|
lexers.STYLE_OPERATOR = 'fore:'..black0
|
||||||
|
lexers.STYLE_REGEX = 'fore:'..black1
|
||||||
|
lexers.STYLE_STRING = 'fore:'..black1
|
||||||
|
lexers.STYLE_PREPROCESSOR = 'fore:'..black0
|
||||||
|
lexers.STYLE_TAG = 'fore:'..black0
|
||||||
|
lexers.STYLE_TYPE = 'fore:'..black0
|
||||||
|
lexers.STYLE_VARIABLE = 'fore:'..black0
|
||||||
|
lexers.STYLE_WHITESPACE = ''
|
||||||
|
lexers.STYLE_EMBEDDED = 'back:'..white05
|
||||||
|
lexers.STYLE_IDENTIFIER = 'fore:'..black0
|
||||||
|
|
||||||
|
lexers.STYLE_LINENUMBER = 'fore:'..black1
|
||||||
|
lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER
|
||||||
|
lexers.STYLE_CURSOR = 'back:'..white2
|
||||||
|
lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:'..black1
|
||||||
|
lexers.STYLE_CURSOR_LINE = 'underlined'
|
||||||
|
lexers.STYLE_COLOR_COLUMN = 'back:'..white1
|
||||||
|
lexers.STYLE_SELECTION = 'back:'..white1
|
||||||
|
lexers.STYLE_STATUS = 'back:'..white0..',fore:'..black2
|
||||||
|
lexers.STYLE_STATUS_FOCUSED = 'back:'..white1..',fore:'..black1
|
||||||
|
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
|
||||||
|
lexers.STYLE_INFO = 'fore:default,back:default'
|
||||||
|
lexers.STYLE_EOF = ''
|
||||||
|
|
52
.config/vis/themes/rose-pine-dawn-colorless.lua
Normal file
52
.config/vis/themes/rose-pine-dawn-colorless.lua
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
-- vis-minimal-theme (https://github.com/erf/vis-minimal-theme)
|
||||||
|
-- light by Erlend Lind Madsen
|
||||||
|
-- Modified by Nulo
|
||||||
|
|
||||||
|
local text = '#575279'
|
||||||
|
local subtle = '#797593'
|
||||||
|
local muted = '#9893a5'
|
||||||
|
|
||||||
|
local base = '#faf4ed'
|
||||||
|
local surface = '#fffaf3'
|
||||||
|
local overlay = '#f2e9e1'
|
||||||
|
|
||||||
|
local highlight_med = '#dfdad9'
|
||||||
|
local highlight_high = '#cecacd'
|
||||||
|
|
||||||
|
local lexers = vis.lexers
|
||||||
|
|
||||||
|
lexers.STYLE_DEFAULT ='back:'..base..',fore:'..text
|
||||||
|
lexers.STYLE_NOTHING = 'back:'..base
|
||||||
|
lexers.STYLE_CLASS = 'fore:'..text
|
||||||
|
lexers.STYLE_COMMENT = 'fore:'..muted
|
||||||
|
lexers.STYLE_CONSTANT = 'fore:'..text
|
||||||
|
lexers.STYLE_DEFINITION = 'fore:'..text
|
||||||
|
lexers.STYLE_ERROR = 'fore:'..text
|
||||||
|
lexers.STYLE_FUNCTION = 'fore:'..text
|
||||||
|
lexers.STYLE_KEYWORD = 'fore:'..muted
|
||||||
|
lexers.STYLE_LABEL = 'fore:'..text
|
||||||
|
lexers.STYLE_NUMBER = 'fore:'..subtle
|
||||||
|
lexers.STYLE_OPERATOR = 'fore:'..text
|
||||||
|
lexers.STYLE_REGEX = 'fore:'..subtle
|
||||||
|
lexers.STYLE_STRING = 'fore:'..subtle
|
||||||
|
lexers.STYLE_PREPROCESSOR = 'fore:'..text
|
||||||
|
lexers.STYLE_TAG = 'fore:'..text
|
||||||
|
lexers.STYLE_TYPE = 'fore:'..text
|
||||||
|
lexers.STYLE_VARIABLE = 'fore:'..text
|
||||||
|
lexers.STYLE_WHITESPACE = ''
|
||||||
|
lexers.STYLE_EMBEDDED = 'back:'..overlay
|
||||||
|
lexers.STYLE_IDENTIFIER = 'fore:'..text
|
||||||
|
|
||||||
|
lexers.STYLE_LINENUMBER = 'fore:'..subtle
|
||||||
|
lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER
|
||||||
|
lexers.STYLE_CURSOR = 'back:'..highlight_high
|
||||||
|
lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:'..subtle
|
||||||
|
lexers.STYLE_CURSOR_LINE = 'underlined'
|
||||||
|
lexers.STYLE_COLOR_COLUMN = 'back:'..highlight_med
|
||||||
|
lexers.STYLE_SELECTION = 'back:'..highlight_med
|
||||||
|
lexers.STYLE_STATUS = 'back:'..base..',fore:'..muted
|
||||||
|
lexers.STYLE_STATUS_FOCUSED = 'back:'..overlay..',fore:'..text
|
||||||
|
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
|
||||||
|
lexers.STYLE_INFO = 'fore:default,back:default'
|
||||||
|
lexers.STYLE_EOF = ''
|
||||||
|
|
51
.config/vis/themes/rose-pine-moon-colorless.lua
Normal file
51
.config/vis/themes/rose-pine-moon-colorless.lua
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
-- vis-minimal-theme (https://github.com/erf/vis-minimal-theme)
|
||||||
|
-- light by Erlend Lind Madsen
|
||||||
|
-- Modified by Nulo
|
||||||
|
|
||||||
|
local text = '#e0def4'
|
||||||
|
local subtle = '#908caa'
|
||||||
|
local muted = '#6e6a86'
|
||||||
|
|
||||||
|
local base = '#232136'
|
||||||
|
local surface = '#2a273f'
|
||||||
|
local overlay = '#393552'
|
||||||
|
|
||||||
|
local highlight_med = '#44415a'
|
||||||
|
|
||||||
|
local lexers = vis.lexers
|
||||||
|
|
||||||
|
lexers.STYLE_DEFAULT ='back:'..base..',fore:'..text
|
||||||
|
lexers.STYLE_NOTHING = 'back:'..base
|
||||||
|
lexers.STYLE_CLASS = 'fore:'..text
|
||||||
|
lexers.STYLE_COMMENT = 'fore:'..muted
|
||||||
|
lexers.STYLE_CONSTANT = 'fore:'..text
|
||||||
|
lexers.STYLE_DEFINITION = 'fore:'..text
|
||||||
|
lexers.STYLE_ERROR = 'fore:'..text
|
||||||
|
lexers.STYLE_FUNCTION = 'fore:'..text
|
||||||
|
lexers.STYLE_KEYWORD = 'fore:'..muted
|
||||||
|
lexers.STYLE_LABEL = 'fore:'..text
|
||||||
|
lexers.STYLE_NUMBER = 'fore:'..subtle
|
||||||
|
lexers.STYLE_OPERATOR = 'fore:'..text
|
||||||
|
lexers.STYLE_REGEX = 'fore:'..subtle
|
||||||
|
lexers.STYLE_STRING = 'fore:'..subtle
|
||||||
|
lexers.STYLE_PREPROCESSOR = 'fore:'..text
|
||||||
|
lexers.STYLE_TAG = 'fore:'..text
|
||||||
|
lexers.STYLE_TYPE = 'fore:'..text
|
||||||
|
lexers.STYLE_VARIABLE = 'fore:'..text
|
||||||
|
lexers.STYLE_WHITESPACE = ''
|
||||||
|
lexers.STYLE_EMBEDDED = 'back:'..overlay
|
||||||
|
lexers.STYLE_IDENTIFIER = 'fore:'..text
|
||||||
|
|
||||||
|
lexers.STYLE_LINENUMBER = 'fore:'..subtle
|
||||||
|
lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER
|
||||||
|
lexers.STYLE_CURSOR = 'back:'..muted
|
||||||
|
lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:'..subtle
|
||||||
|
lexers.STYLE_CURSOR_LINE = 'underlined'
|
||||||
|
lexers.STYLE_COLOR_COLUMN = 'back:'..highlight_med
|
||||||
|
lexers.STYLE_SELECTION = 'back:'..highlight_med
|
||||||
|
lexers.STYLE_STATUS = 'back:'..base..',fore:'..muted
|
||||||
|
lexers.STYLE_STATUS_FOCUSED = 'back:'..overlay..',fore:'..text
|
||||||
|
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
|
||||||
|
lexers.STYLE_INFO = 'fore:default,back:default'
|
||||||
|
lexers.STYLE_EOF = ''
|
||||||
|
|
72
.config/vis/visrc.lua
Normal file
72
.config/vis/visrc.lua
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
require 'vis'
|
||||||
|
|
||||||
|
plugins = {
|
||||||
|
-- Open files in directory
|
||||||
|
["fzf-open"] = require 'plugins/fzf-open',
|
||||||
|
-- Search recently opened files
|
||||||
|
["fzf-mru"] = require 'plugins/fzf-mru/fzf-mru',
|
||||||
|
-- Saves cursor position
|
||||||
|
["cursors"] = require 'plugins/cursors',
|
||||||
|
}
|
||||||
|
|
||||||
|
local disable_formating = false
|
||||||
|
vis.events.subscribe(vis.events.INIT, function()
|
||||||
|
dofile(os.getenv('HOME')..'/.cache/themer.lua/vis.lua')
|
||||||
|
require 'plugins/commentary'
|
||||||
|
|
||||||
|
vis:map(vis.modes.NORMAL, ',f', ':fzf<Enter>')
|
||||||
|
vis:map(vis.modes.NORMAL, ',b', ':fzfmru<Enter>')
|
||||||
|
vis:map(vis.modes.NORMAL, ',w', ':w<Enter>')
|
||||||
|
vis:map(vis.modes.NORMAL, ',q', ':q<Enter>')
|
||||||
|
vis:map(vis.modes.NORMAL, ',Q', ':q!<Enter>')
|
||||||
|
vis:map(vis.modes.NORMAL, ',,', ':')
|
||||||
|
vis:command_register('W', function(argv)
|
||||||
|
disable_formating = true
|
||||||
|
vis:command('w')
|
||||||
|
disable_formating = false
|
||||||
|
return true
|
||||||
|
end, "Write file without formatting")
|
||||||
|
end)
|
||||||
|
|
||||||
|
vis.events.subscribe(vis.events.WIN_OPEN, function(win)
|
||||||
|
vis:command('set relativenumber')
|
||||||
|
vis:command('set show-tabs on')
|
||||||
|
end)
|
||||||
|
|
||||||
|
local function format(file, path)
|
||||||
|
local win = vis.win
|
||||||
|
local fmt = nil
|
||||||
|
if
|
||||||
|
win.syntax == "javascript"
|
||||||
|
or win.syntax == "typescript"
|
||||||
|
or win.syntax == "json"
|
||||||
|
or win.syntax == "css"
|
||||||
|
then
|
||||||
|
fmt = "prettier --stdin-filepath "..file.path
|
||||||
|
end
|
||||||
|
|
||||||
|
if
|
||||||
|
win.syntax == "go"
|
||||||
|
then
|
||||||
|
fmt = "goimports"
|
||||||
|
end
|
||||||
|
|
||||||
|
if fmt == nil or disable_formating then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local pos = win.selection.pos
|
||||||
|
local status, out, err = vis:pipe(file, { start = 0, finish = file.size }, fmt)
|
||||||
|
if status ~= 0 or not out then
|
||||||
|
if err then vis:info(err) end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
file:delete(0, file.size)
|
||||||
|
file:insert(0, out)
|
||||||
|
win.selection.pos = pos
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
vis.events.subscribe(vis.events.FILE_SAVE_PRE, format)
|
||||||
|
|
24
.gitmodules
vendored
24
.gitmodules
vendored
|
@ -1,3 +1,27 @@
|
||||||
|
[submodule ".config/kak/plugins/smarttab.kak"]
|
||||||
|
path = .config/kak/plugins/smarttab.kak
|
||||||
|
url = https://github.com/andreyorst/smarttab.kak
|
||||||
|
[submodule ".config/kak/plugins/zig.kak"]
|
||||||
|
path = .config/kak/plugins/zig.kak
|
||||||
|
url = https://gitea.nulo.in/Nulo/zig.kak
|
||||||
|
[submodule ".config/kak/plugins/fzf.kak"]
|
||||||
|
path = .config/kak/plugins/fzf.kak
|
||||||
|
url = https://gitea.nulo.in/Nulo/fzf.kak
|
||||||
|
[submodule ".config/kak/plugins/kakoune-buffers"]
|
||||||
|
path = .config/kak/plugins/kakoune-buffers
|
||||||
|
url = https://github.com/Delapouite/kakoune-buffers
|
||||||
|
[submodule ".config/vis/plugins/cursors"]
|
||||||
|
path = .config/vis/plugins/cursors
|
||||||
|
url = https://github.com/erf/vis-cursors
|
||||||
|
[submodule ".config/vis/plugins/commentary"]
|
||||||
|
path = .config/vis/plugins/commentary
|
||||||
|
url = https://github.com/lutobler/vis-commentary
|
||||||
|
[submodule ".config/vis/plugins/fzf-open"]
|
||||||
|
path = .config/vis/plugins/fzf-open
|
||||||
|
url = https://git.sr.ht/~mcepl/vis-fzf-open
|
||||||
|
[submodule ".config/vis/plugins/fzf-mru"]
|
||||||
|
path = .config/vis/plugins/fzf-mru
|
||||||
|
url = https://github.com/peaceant/vis-fzf-mru
|
||||||
[submodule ".config/themer.lua"]
|
[submodule ".config/themer.lua"]
|
||||||
path = .config/themer.lua
|
path = .config/themer.lua
|
||||||
url = https://gitea.nulo.in/Nulo/themer.lua
|
url = https://gitea.nulo.in/Nulo/themer.lua
|
||||||
|
|
Loading…
Reference in a new issue