Too much for a commit message

This commit is contained in:
lelgenio 2020-11-11 03:06:05 -03:00
parent c30d04b096
commit 576565e4d1
1 changed files with 86 additions and 35 deletions

View File

@ -2,6 +2,20 @@
source "%val{config}/plugins/plug.kak/rc/plug.kak"
{%@@ for p in [ 'prelude', 'auto-pairs', 'manual-indent' ] @@%}
plug 'alexherbo2/{{@@ p @@}}.kak'
require-module '{{@@ p @@}}'
{%@@ endfor @@%}
auto-pairs-enable
# Manual indent
hook global WinCreate .* %{
manual-indent-enable
}
plug 'h-youhei/kakoune-surround'
plug 'insipx/kak-crosshairs'
plug 'delapouite/kakoune-palette'
plug "andreyorst/fzf.kak"
@ -10,28 +24,34 @@
}
lsp-enable
lsp-inlay-diagnostics-enable global
#syntax
set global tabstop 4
#keys
{%@@ for old, new in {
"h": key.left,
"j": key.down,
"k": key.up,
"l": key.right,
"i": key.insertMode,
"n": key.next,
}.items() @@%}
map global normal {{@@ new @@}} {{@@ old @@}}
map global normal {{@@ new.upper() @@}} {{@@ old.upper() @@}}
{%@@ for old, new, gdoc, vdoc in [
[ "h", key.left, "line begin", "scroll left" ],
[ "l", key.right, "line right", "scroll right" ],
[ "k", key.up, "buffer begin", "scroll up" ],
[ "j", key.down, "buffer end", "scroll down" ],
[ "i", key.insertMode, "first non blank", "" ],
[ "n", key.next, "", "" ],
[ "o", "h", "", "" ],
] @@%}
{%@@ set NEW, OLD = new.upper(), old.upper()@@%}
{%@@ if vdoc @@%}
map global view {{@@ old @@}} ''
map global view {{@@ new @@}} {{@@ old @@}} -docstring "{{@@ vdoc @@}}"
{%@@ endif @@%}
{%@@ if gdoc @@%}
map global goto {{@@ old @@}} ''
map global goto {{@@ new @@}} {{@@ old @@}} -docstring "{{@@ gdoc @@}}"
{%@@ endif @@%}
map global normal {{@@ new @@}} {{@@ old @@}}
map global normal {{@@ NEW @@}} {{@@ OLD @@}}
map global normal <a-{{@@ new @@}}> <a-{{@@ old @@}}>
map global normal <a-{{@@ new.upper() @@}}> <a-{{@@ old.upper() @@}}>
map global goto {{@@ new @@}} {{@@ old @@}}
map global normal <a-{{@@ NEW @@}}> <a-{{@@ OLD @@}}>
{%@@ endfor @@%}
{%@@ for old, new in {
@ -43,22 +63,42 @@
{%@@ endfor @@%}
{%@@ if key.layout == 'colemak' @@%}
map global normal h o
map global normal H O
map global normal k s
map global normal K S
map global normal <c-k> <a-s>
map global normal t e
map global normal <C-n> ': fzf-mode<ret>'
map global normal <C-e> ': enter-user-mode lsp<ret>'
{%@@ endif @@%}
map global normal '#' :comment-line<ret>
#usermode
map global user 'f' ': fzf-mode<ret>' -docstring 'fzf mode'
map global user 'g' ': enter-user-mode lsp<ret>' -docstring 'lsp mode'
map global insert <s-tab> '<a-;><lt>'
map global user 'c' ': comment-line<ret>' -docstring 'comment line'
map global user 'C' ': comment-block<ret>' -docstring 'comment block'
map global user 'p' '<a-!> wl-paste -n <ret>' -docstring 'clipboard paste'
map global user 'P' '! wl-paste -n <ret>' -docstring 'clipboard paste before'
declare-user-mode surround
map global surround 's' ': surround<ret>' -docstring 'surround'
map global surround 'c' ': change-surround<ret>' -docstring 'change'
map global surround 'd' ': delete-surround<ret>' -docstring 'delete'
map global surround 't' ': select-surrounding-tag<ret>' -docstring 'select tag'
map global user 's' ': enter-user-mode surround<ret>' -docstring 'surround mode'
declare-user-mode git
map global git 's' ': git status<ret>' -docstring 'status'
map global git 'a' ': git add<ret>' -docstring 'add current'
map global git 'A' ': git add .<ret>' -docstring 'add'
map global git 'd' ': git diff %reg{%}<ret>' -docstring 'diff current'
map global git 'D' ': git diff<ret>' -docstring 'diff'
map global git 'c' ': git commit -v<ret>' -docstring 'commit'
map global user 'v' ': enter-user-mode git<ret>' -docstring 'git vcs mode'
# map global insert <s-tab> '<a-;><lt>'
#hooks
@ -96,6 +136,7 @@
{%@@ set accent = "rgb:%s" % accent_color.replace('#','') @@%}
{%@@ set bg_light = "rgb:%s" % color.bg_light.replace('#','') @@%}
{%@@ set bg_dark = "rgb:%s" % color.bg_dark.replace('#','') @@%}
{%@@ set nontxt = "rgb:%s" % color.nontxt.replace('#','') @@%}
# For Code
@ -107,7 +148,7 @@
face global string green
face global keyword {{@@ accent @@}}
face global operator yellow
face global attribute yellow+b
face global attribute green+b
face global comment {{@@ bg_light @@}}
face global documentation comment
face global meta magenta
@ -125,27 +166,32 @@
# builtin faces
face global Default default,default
face global PrimarySelection white,black+fg
face global SecondarySelection white,black+fg
cursorline
face global crosshairs_line default,{{@@ bg_dark @@}}
face global PrimaryCursor default,{{@@ accent @@}}+fg
face global SecondaryCursor black,white+fg
face global PrimaryCursorEol black,cyan+fg
face global SecondaryCursorEol PrimaryCursorEol
face global PrimaryCursorEol PrimaryCursor
face global PrimarySelection white,black+fg
face global SecondaryCursor default,default+rfg
face global SecondaryCursorEol SecondaryCursor
face global SecondarySelection white,black+fg
face global LineNumbers {{@@ bg_light @@}},default
face global LineNumberCursor white,default
face global LineNumberCursor white,{{@@ bg_dark @@}}
face global MenuForeground white,{{@@ accent @@}}
face global MenuBackground white,{{@@ bg_light @@}}
face global MenuBackground white,{{@@ bg_dark @@}}
face global MenuInfo cyan
face global Information yellow,default
face global Information default,{{@@ bg_dark @@}}
face global Error white,default
face global StatusLine default,default
face global StatusLineMode green,default
face global StatusLineInfo default,default
face global StatusLineValue default,default
face global StatusLine default,{{@@ nontxt @@}}
face global StatusLineMode green,{{@@ nontxt @@}}
face global StatusLineInfo default,{{@@ nontxt @@}}
face global StatusLineValue default,{{@@ nontxt @@}}
face global StatusCursor default,{{@@ accent @@}}
face global Prompt yellow,default
@ -153,6 +199,8 @@
face global Whitespace {{@@ nontxt @@}},default+f
face global BufferPadding blue,default
# highlight trailing whitespace
add-highlighter global/ regex '\h*$' 0:red,red
#lsp
{%@@ set cols = {
@ -167,4 +215,7 @@
face global InlayDiagnostic{{@@ obj @@}} {{@@ col @@}},default+bu
#{%@@ endfor @@%}#
lsp-enable
lsp-inlay-diagnostics-enable global
face global Reference yellow,default+b