updated config

pull/1/head
koehr 6 years ago
parent 53fc73dc50
commit c447de940c

@ -1 +1 @@
/home/nk/.local/share/kak/autoload/
/home/nk/.local/share/kak/autoload

@ -0,0 +1 @@
/home/nk/src/pkg/kakoune-buffers/buffers.kak

@ -1,83 +0,0 @@
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*[.](js) %{
set buffer filetype javascript
}
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter -group / regions -default code javascript \
double_string '"' (?<!\\)(\\\\)*" '' \
single_string "'" (?<!\\)(\\\\)*' '' \
literal "`" (?<!\\)(\\\\)*` '' \
comment // '$' '' \
comment /\* \*/ ''
add-highlighter -group /javascript/double_string fill string
add-highlighter -group /javascript/single_string fill string
add-highlighter -group /javascript/comment fill comment
add-highlighter -group /javascript/literal fill string
add-highlighter -group /javascript/literal regex \${.*?} 0:value
add-highlighter -group /javascript/code regex \b(Infinity|NaN|false|null|this|true|undefined)\b 0:value
add-highlighter -group /javascript/code regex "-?[0-9]*\.?[0-9]+" 0:value
add-highlighter -group /javascript/code regex \b(Array|Boolean|Date|Function|JSON|Map|Math|Number|Object|Promise|Proxy|Reflect|RegExp|Set|String|Symbol|WeakMap|WeakSet)\b 0:type
add-highlighter -group /javascript/code regex \b(Error|EvalError|InternalError|RangeError|ReferenceError|SyntaxError|TypeError|URIError)\b 0:type
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords
add-highlighter -group /javascript/code regex \b(async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|from|for|function|if|import|in|instanceof|let|new|of|return|super|switch|throw|try|typeof|var|void|while|with|yield)\b 0:keyword
add-highlighter -group /javascript/code regex => 0:keyword
# Commands
# ‾‾‾‾‾‾‾‾
def -hidden javascript-filter-around-selections %{
# remove trailing white spaces
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
}
def -hidden javascript-indent-on-char %<
eval -draft -itersel %<
# align closer token to its opener when alone on a line
try %/ exec -draft <a-h> <a-k> ^\h+[]}]$ <ret> m s \`|.\' <ret> 1<a-&> /
>
>
def -hidden javascript-indent-on-new-line %<
eval -draft -itersel %<
# copy // comments prefix and following white spaces
try %{ exec -draft k <a-x> s ^\h*\K#\h* <ret> y gh j P }
# preserve previous line indent
try %{ exec -draft \; K <a-&> }
# filter previous line
try %{ exec -draft k : javascript-filter-around-selections <ret> }
# indent after lines beginning / ending with opener token
try %_ exec -draft k <a-x> <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _
>
>
# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
hook -group javascript-highlight global WinSetOption filetype=javascript %{ add-highlighter ref javascript }
hook global WinSetOption filetype=javascript %{
hook window InsertEnd .* -group javascript-hooks javascript-filter-around-selections
hook window InsertChar .* -group javascript-indent javascript-indent-on-char
hook window InsertChar \n -group javascript-indent javascript-indent-on-new-line
}
hook -group javascript-highlight global WinSetOption filetype=(?!javascript).* %{ remove-highlighter javascript }
hook global WinSetOption filetype=(?!javascript).* %{
remove-hooks window javascript-indent
remove-hooks window javascript-hooks
}
# suggested hook
#hook global WinSetOption filetype=javascript %{
#set window formatcmd 'prettier --stdin --semi false --single-quote --jsx-bracket-same-line --trailing-comma all'
#}

@ -1,15 +1,18 @@
face Whitespace rgb:555555+b
# hooks to show line numbers, whitespaces and matching brackets
hook -group DefaultHighlights global WinCreate .* %{
addhl number_lines -hlcursor -separator ' '
addhl show_whitespaces
addhl show_matching
addhl regex '\h+$' 0:default,red # show all trailing whispaces red
addhl dynregex '%reg{/}' 0:+u 1:+b
add-highlighter window/ show_whitespaces
add-highlighter window/ show_matching
add-highlighter window/ regex '\h+$' 0:default,red # show all trailing whispaces red
add-highlighter window/ dynregex '%reg{/}' 0:+u 1:+b
set-face window Whitespace rgb:555555+b
}
hook -group markdown-highlight global WinSetOption filetype=markdown %{
add-highlighter window/ wrap -word -width 80
add-highlighter window/ number_lines -hlcursor -separator ' '
}
hook -group MarkdownHighlights global WinCreate .*[.](md) %{
addhl wrap -word -width 80
hook global WinSetOption filetype=(?!markdown).* %{
add-highlighter window/ number_lines -hlcursor -separator ' '
}
# map tmux split and window commands in vim style

@ -0,0 +1 @@
/home/nk/src/pkg/kakoune-wiki/wiki.kak

@ -1,12 +1,12 @@
colorscheme desertex
set global scrolloff 5,5
set global incsearch true
set global aligntab true
set global ui_options ncurses_assistant=none:ncurses_change_colors=true
# set global autoinfo normal|command|onkey ## always show info box for every command key
set global grepcmd 'rg --column'
set-option global scrolloff 5,5
set-option global incsearch true
set-option global aligntab true
set-option global ui_options ncurses_assistant=dilbert
set-option -add global ui_options ncurses_change_colors=true
set-option global grepcmd 'rg --column'
map global insert <tab> ' '
wiki_setup "/home/nk/Wiki"
# with inspiration from
# https://github.com/Delapouite/dotfiles/blob/master/link/kak/kakrc
@ -16,19 +16,17 @@ set global modelinefmt %{
· {{context_info}} {{mode_info}}
}
addhl -group / group trailing_white_spaces
addhl -group /trailing_white_spaces regex \h+$ 0:Error
hook global InsertBegin .* %{
rmhl trailing_white_spaces
# echo -color Information '— INSERT —'
echo '— INSERT —'
}
hook global InsertEnd .* %{
addhl ref trailing_white_spaces
lint
}
# spaces instead tabs
map global insert <tab> ' '
# ← system clipboard
map global user y '<a-|>xsel --input --clipboard<ret>; :echo -color Information "copied selection to X11 clipboard"<ret>' -docstring 'yank from clipboard'
map global user p '<a-!>xsel --output --clipboard<ret>' -docstring 'replace from clipboard'
@ -41,3 +39,7 @@ hook global NormalKey y|d|c %{ nop %sh{
def -docstring 'ripgrep in current dir' \
find -params 1 -shell-candidates %{ rg --files } %{ edit %arg{1} }
# editorconfig support
hook global BufCreate .* %{editorconfig-load}

@ -2,9 +2,9 @@ source /etc/profile
export EDITOR=kak
export GOPATH=$HOME/src/go
export PATH=$HOME/.local/bin:$GOPATH/bin:$PATH
export ELMPATH=$HOME/src/pkg/Elm-Platform/0.18/.cabal-sandbox/bin
export PATH=$HOME/.local/bin:$GOPATH/bin:$ELMPATH:$PATH
export MANPATH=$HOME/.local/share/man:/usr/share/man:/usr/local/share/man
export QT_SCALE_FACTOR=2
export FREETYPE_PROPERTIES="truetype:interpreter-version=35 cff:darkening-parameters=500,300,1000,200,1500,100,2000,0 autofitter:warping=1"
export INFINALITY_FT_FILTER_PARAMS='10 35 40 35 10'
@ -14,11 +14,11 @@ alias xq="xbps-query -Rs"
alias xqi="xbps-query -RS"
alias xql="xbps-query -s"
alias xqf="xbps-query -f"
alias xqo="xbps-query -o"
alias xqre="xbps-query -R --regex -s"
alias howto="howdoi -c"
if [ `tty` = /dev/tty1 -a $USER != root -a ! -e /tmp/.X0-lock ]
then
tmux new-session -d -s work -c ~/src/fromAtoB
tmux new-session -d -s stuff -c ~
startx && exit
fi

@ -26,13 +26,67 @@ set -g window-active-style 'fg=colour252,bg=colour236'
set-window-option -g xterm-keys on
#pane border
# pane border
set -g pane-border-bg colour235
set -g pane-border-fg colour238
set -g pane-active-border-bg colour236
set -g pane-active-border-fg colour208
#status bar colors
# status bar colors
set-option -g status-bg colour237
set-option -g status-fg colour208
set-option -g status-attr default
# Status position
set-option -g status-position bottom
# Status update interval
set-option -g status-interval 5
# Basic status bar colors
set-option -g status-bg default
set-option -g status-fg white
# Left side of status bar
set-option -g status-left-length 40
set-option -g status-left "#[fg=brightwhite,bg=brightblack] #S #[fg=default,bg=default] "
# Window status
set-option -g window-status-format "#[fg=white,bg=brightblack] #I #[fg=white,bg=black] #W "
set-option -g window-status-current-format "#[fg=brightwhite,bg=green] #I #[fg=brightwhite,bg=blue] #W "
set-option -g window-status-separator " "
set-option -g status-justify left
# Right side of status bar
set-option -g status-right-length 40
set-option -g status-right " #[fg=brightwhite,bg=black] %a, %d %b %H:%M #[fg=brightwhite,bg=brightblack] #(whoami)@#h "
# Pane border
set-option -g pane-border-bg default
set-option -g pane-border-fg brightblack
set-option -g pane-active-border-bg default
set-option -g pane-active-border-fg white
# Pane number indicator
set-option -g display-panes-colour brightblack
set-option -g display-panes-active-colour brightwhite
# Clock mode
set-option -g clock-mode-colour white
set-option -g clock-mode-style 24
# Message
set-option -g message-bg default
set-option -g message-fg default
# Activity
set-option -g monitor-activity on
set-option -g monitor-silence 0
set-option -g monitor-bell on
set-option -g activity-action other
set-option -g visual-activity on
# Window numbering
set-option -g base-index 1
set-option -g pane-base-index 1
set-option -g renumber-windows on

@ -1,7 +0,0 @@
set toolbars=none
set hintchars=hjklasdfgyuiopqwertnmzxcvb
set visualbell=true
set complete=lStf
set defsearch=duckduckgo
set suggestengines=duckduckgo,wikipedia
colorscheme zenburn
Loading…
Cancel
Save