update kak, dunst, gitconfig
This commit is contained in:
parent
6f4cedc190
commit
5fa0958f78
5 changed files with 476 additions and 7 deletions
27
.bashrc
27
.bashrc
|
|
@ -51,6 +51,7 @@ alias rcp='rsync -avz --ignore-existing --progress --rsh "ssh" '
|
||||||
alias rcp_443='rsync -avz --ignore-existing --progress --rsh "ssh -p 443" '
|
alias rcp_443='rsync -avz --ignore-existing --progress --rsh "ssh -p 443" '
|
||||||
alias rcp_80='rsync -avz --ignore-existing --progress --rsh "ssh -p 80" '
|
alias rcp_80='rsync -avz --ignore-existing --progress --rsh "ssh -p 80" '
|
||||||
|
|
||||||
|
alias dpkg_sorted="dpkg-query -W --showformat='${Installed-Size} ${Package}\n'|sort -rn"
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# File management #
|
# File management #
|
||||||
|
|
@ -164,8 +165,6 @@ export LESSOPEN='|~/code/dotfiles/lessfilter.sh %s'
|
||||||
# nautilus file manager in browser mode without destkop management
|
# nautilus file manager in browser mode without destkop management
|
||||||
alias Ex='nautilus --no-desktop --browser .'
|
alias Ex='nautilus --no-desktop --browser .'
|
||||||
|
|
||||||
alias k="kanban"
|
|
||||||
|
|
||||||
# Make a directory and move to it
|
# Make a directory and move to it
|
||||||
function md() {
|
function md() {
|
||||||
mkdir $1
|
mkdir $1
|
||||||
|
|
@ -275,6 +274,7 @@ export EDITOR='kak'
|
||||||
alias latexed="gvim --servername LATEX "
|
alias latexed="gvim --servername LATEX "
|
||||||
# alias ide="gvim --servername IDE "
|
# alias ide="gvim --servername IDE "
|
||||||
alias ide="kak -s ide -e 'rename-client main'"
|
alias ide="kak -s ide -e 'rename-client main'"
|
||||||
|
alias ke="kak -c ide"
|
||||||
|
|
||||||
# print a vim fortune at startup
|
# print a vim fortune at startup
|
||||||
#/usr/games/fortune vimtips
|
#/usr/games/fortune vimtips
|
||||||
|
|
@ -493,10 +493,12 @@ alias task="TASKDATA=.task task"
|
||||||
export PATH="$PATH:/home/nojhan/apps/neo4j/packaging/standalone/target/neo4j-community-5.13.0-SNAPSHOT/bin/"
|
export PATH="$PATH:/home/nojhan/apps/neo4j/packaging/standalone/target/neo4j-community-5.13.0-SNAPSHOT/bin/"
|
||||||
export NEO4J_HOME="/home/nojhan/apps/neo4j/packaging/standalone/target/neo4j-community-5.13.0-SNAPSHOT/"
|
export NEO4J_HOME="/home/nojhan/apps/neo4j/packaging/standalone/target/neo4j-community-5.13.0-SNAPSHOT/"
|
||||||
|
|
||||||
export PATH="$PATH:/usr/local/bin/"
|
export PATH="$PATH:/usr/local/bin/:/home/nojhan/travail/code/ontoweaver/bin"
|
||||||
|
|
||||||
# export PYTHONPATH="$PYTHONPATH:/home/nojhan/code/terminator/"
|
# export PYTHONPATH="$PYTHONPATH:/home/nojhan/code/terminator/"
|
||||||
export PYTHONPATH="$PYTHONPATH:/opt/pyAgrum/lib/python3.8/site-packages/:/home/nojhan/travail/code/biocypher:/home/nojhan/travail/code/ontoweaver/src/"
|
export PYTHONPATH="$PYTHONPATH:/home/nojhan/travail/code/biocypher:/home/nojhan/travail/code/ontoweaver/src/:/home/nojhan/travail/code/ontoweaver/bin/"
|
||||||
|
|
||||||
|
export PYTHONPATH="$PYTHONPATH:/home/nojhan/code/Mastodon.py"
|
||||||
|
|
||||||
# export TERMINAL="/usr/local/bin/terminator"
|
# export TERMINAL="/usr/local/bin/terminator"
|
||||||
export TERMINAL="terminator"
|
export TERMINAL="terminator"
|
||||||
|
|
@ -531,4 +533,19 @@ pdfcompress ()
|
||||||
echo "Final size: ${sh} / ${sko}Kb" 2>&1
|
echo "Final size: ${sh} / ${sko}Kb" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
fortune anarchism
|
if [[ $- == *i* ]] ; then
|
||||||
|
fortune anarchism
|
||||||
|
fi
|
||||||
|
alias sonarless='/home/nojhan/.sonarless/makefile.sh'
|
||||||
|
export PATH=/opt/swift/usr/bin:$PATH
|
||||||
|
|
||||||
|
ugetmake() {
|
||||||
|
perl -Mcharnames=full -C -e '
|
||||||
|
for $i (0xa0 .. 0xd7ff, 0xe000 .. 0x10ffff) {
|
||||||
|
printf "%c U+%04X %s\n", $i, $i, lc charnames::viacode $i
|
||||||
|
}' | zstd > ~/.cache/all-chars.zst
|
||||||
|
}
|
||||||
|
utfget() {
|
||||||
|
zstdcat ~/.cache/all-chars.zst | fzf | awk '{ printf "%s",substr($0,1,1) }'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
origin = top-left
|
origin = top-left
|
||||||
|
|
||||||
# Offset from the origin
|
# Offset from the origin
|
||||||
offset = 1750x1000
|
offset = 3000x200
|
||||||
|
|
||||||
# Scale factor. It is auto-detected if value is 0.
|
# Scale factor. It is auto-detected if value is 0.
|
||||||
scale = 0
|
scale = 0
|
||||||
|
|
|
||||||
84
.config/kak/autoload/ttl.kak
Normal file
84
.config/kak/autoload/ttl.kak
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
# Terse RDF Triple Language (Turtle)
|
||||||
|
# of the W3C's Resource Description Framework (RDF):
|
||||||
|
# https://www.w3.org/TR/turtle/
|
||||||
|
|
||||||
|
# Detection
|
||||||
|
# ‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
|
hook global BufCreate .*\.(ttl) %{
|
||||||
|
set-option buffer filetype ttl
|
||||||
|
}
|
||||||
|
|
||||||
|
# Initialization
|
||||||
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
|
hook global WinSetOption filetype=ttl %{
|
||||||
|
require-module ttl
|
||||||
|
|
||||||
|
hook window ModeChange pop:insert:.* -group ttl-trim-indent ttl-trim-indent
|
||||||
|
hook window InsertChar \n -group ttl-insert ttl-insert-on-new-line
|
||||||
|
hook window InsertChar \n -group ttl-indent ttl-indent-on-new-line
|
||||||
|
|
||||||
|
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window ttl-.+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
hook -group ttl-highlight global WinSetOption filetype=ttl %{
|
||||||
|
add-highlighter window/ttl ref ttl
|
||||||
|
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/ttl }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
provide-module ttl %{
|
||||||
|
|
||||||
|
# Highlighters
|
||||||
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
|
add-highlighter shared/ttl regions
|
||||||
|
add-highlighter shared/ttl/code default-region group
|
||||||
|
|
||||||
|
add-highlighter shared/ttl/comment region '#+\h' $ fill comment
|
||||||
|
add-highlighter shared/ttl/string1 region '"""' (?<!\\)(\\\\)*"""(?!") fill string
|
||||||
|
add-highlighter shared/ttl/string2 region "'''" "'''(?!')" fill string
|
||||||
|
add-highlighter shared/ttl/string3 region '"' (?<!\\)(\\\\)*" fill string
|
||||||
|
add-highlighter shared/ttl/string4 region "'" "'" fill string
|
||||||
|
|
||||||
|
add-highlighter shared/ttl/code/comment2 regex '^\h*(#+)$' 1:comment
|
||||||
|
add-highlighter shared/ttl/code/colon regex (:) 1:operator
|
||||||
|
add-highlighter shared/ttl/code/separator regex ([\;\.,<>\[\]\(\)]) 1:delimiter
|
||||||
|
add-highlighter shared/ttl/code/term regex :(w+)\b 1:variable
|
||||||
|
add-highlighter shared/ttl/code/prefix regex \b([-.\w]+): 1:module
|
||||||
|
add-highlighter shared/ttl/code/def regex (@\w+)\b 1:attribute
|
||||||
|
add-highlighter shared/ttl/code/cdef regex \b(BASE|PREFIX)\b 1:attribute
|
||||||
|
add-highlighter shared/ttl/code/type regex (\^\^) 1:type
|
||||||
|
add-highlighter shared/ttl/code/bool regex \b(true|false)\b 1:value
|
||||||
|
add-highlighter shared/ttl/code/num regex \b([+-]?[0-9]+\.*[0-9]*)\b 1:value
|
||||||
|
add-highlighter shared/ttl/code/keyword regex \b(_|a)\b 1:keyword
|
||||||
|
# Last position, to override single characters.
|
||||||
|
add-highlighter shared/ttl/code/IRI regex <(\H*)> 1:identifier
|
||||||
|
|
||||||
|
|
||||||
|
# Commands
|
||||||
|
# ‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
|
define-command -hidden ttl-trim-indent %{
|
||||||
|
# remove trailing white spaces
|
||||||
|
try %{ execute-keys -draft -itersel x s \h+$ <ret> d }
|
||||||
|
}
|
||||||
|
|
||||||
|
define-command -hidden ttl-insert-on-new-line %{
|
||||||
|
evaluate-commands -draft -itersel %{
|
||||||
|
# copy # comments prefix and following white spaces
|
||||||
|
try %{ execute-keys -draft k x s ^\h*\K#\h* <ret> y gh j P }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
define-command -hidden ttl-indent-on-new-line %{
|
||||||
|
evaluate-commands -draft -itersel %{
|
||||||
|
# preserve previous line indent
|
||||||
|
try %{ execute-keys -draft <semicolon> K <a-&> }
|
||||||
|
# filter previous line
|
||||||
|
try %{ execute-keys -draft k : ttl-trim-indent <ret> }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
368
.config/kak/kakrc
Normal file
368
.config/kak/kakrc
Normal file
|
|
@ -0,0 +1,368 @@
|
||||||
|
#################################
|
||||||
|
# Convenience functions
|
||||||
|
#################################
|
||||||
|
|
||||||
|
define-command filetype-hook -params 2 %{
|
||||||
|
hook global WinSetOption "filetype=(%arg{1})" "%arg(2)"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Generic mappings
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Comments
|
||||||
|
map global normal '$' -docstring 'Comment the selected lines' ': comment-line<ret>'
|
||||||
|
map global normal '<a-$>' -docstring 'Comment the selected block with begin/end characters' ': comment-block<ret>'
|
||||||
|
map global normal '#' -docstring 'duplicate and comment line' 'xyP: comment-line<ret>j'
|
||||||
|
map global normal '–' -docstring 'comment selection with /*…*/' '<a-:><a-;>i/*<esc><a-;>a*/<esc>'
|
||||||
|
|
||||||
|
map global normal '*' -docstring 'select all occurrences of the word under cursor' 'be*n<ret>vv'
|
||||||
|
|
||||||
|
map global normal '=' -docstring 'indent like the line above' '<a-C>gi<a-&><space>jgi'
|
||||||
|
|
||||||
|
map global normal '<c-up>' -docstring 'move line down' 'xdkP'
|
||||||
|
map global normal '<c-down>' -docstring 'move line down' 'xdp'
|
||||||
|
map global insert '<c-up>' -docstring 'move line down' '<esc>xdkPi'
|
||||||
|
map global insert '<c-down>' -docstring 'move line down' '<esc>xdpi'
|
||||||
|
|
||||||
|
map global insert '<c-right>' -docstring 'one word right in insert mode' '<esc>eli'
|
||||||
|
map global insert '<c-left>' -docstring 'one word left in insert mode' '<esc>bi'
|
||||||
|
map global insert '<c-u>' -docstring 'kill line in insert mode' '<esc>GIc'
|
||||||
|
|
||||||
|
map global normal 'è' -docstring 'select the inner sequence enclosed by matching characters' 'mL<a-;>H'
|
||||||
|
|
||||||
|
define-command select_whole_lines_or_extend_lines_down %{
|
||||||
|
try %{
|
||||||
|
# At least one selection is not full, so select whole lines.
|
||||||
|
execute-keys -draft '<a-K>\A^.*\n\z<ret>'
|
||||||
|
execute-keys '<a-:>x'
|
||||||
|
} catch %{
|
||||||
|
execute-keys '<a-:>Jx'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
map -docstring 'select whole lines or extend lines down' global normal X ':select_whole_lines_or_extend_lines_down<ret>'
|
||||||
|
|
||||||
|
alias global bd delete-buffer
|
||||||
|
|
||||||
|
def -params 1 extend-line-up %{
|
||||||
|
exec "<a-:><a-;>%arg{1}K<a-;>"
|
||||||
|
try %{
|
||||||
|
exec -draft ';<a-K>\n<ret>'
|
||||||
|
exec X
|
||||||
|
}
|
||||||
|
exec '<a-;><a-X>'
|
||||||
|
}
|
||||||
|
map global normal Y -docstring 'Extend selection to the previous line' ':extend-line-up %val{count}<ret>'
|
||||||
|
|
||||||
|
define-command cq -docstring 'Quit with an (arbitrary) error code' %{q! 666}
|
||||||
|
|
||||||
|
# Use Tab and Shift-Tab to navigate completion in insert mode.
|
||||||
|
hook global InsertCompletionShow .* %{
|
||||||
|
try %{
|
||||||
|
execute-keys -draft 'h<a-K>\h<ret>'
|
||||||
|
map window insert <tab> <c-n>
|
||||||
|
map window insert <s-tab> <c-p>
|
||||||
|
hook -once -always window InsertCompletionHide .* %{
|
||||||
|
map window insert <tab> <tab>
|
||||||
|
map window insert <s-tab> <s-tab>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cursor switch.
|
||||||
|
map global normal <tab> -docstring 'Swap selections cursor and anchor' '<a-;>'
|
||||||
|
map global normal <s-tab> -docstring 'Ensure selection cursor is after anchor' '<a-:>'
|
||||||
|
|
||||||
|
# Go to paragraph/indents.
|
||||||
|
map global goto 'p' -docstring 'select to next paragraph' '<esc>]p'
|
||||||
|
map global goto 'P' -docstring 'extend to next paragraph' '<esc>}p'
|
||||||
|
map global goto 'o' -docstring 'select to prev paragraph' '<esc>[p'
|
||||||
|
map global goto 'O' -docstring 'extend to prev paragraph' '<esc>{p'
|
||||||
|
map global goto 't' -docstring 'select to indent end' '<esc>]i'
|
||||||
|
map global goto 'T' -docstring 'select to indent beginning' '<esc>[i'
|
||||||
|
|
||||||
|
# Paths.
|
||||||
|
map global prompt <a-?> -docstring 'Current buffer name' '<c-r>%'
|
||||||
|
map global prompt <a-/> -docstring 'Current buffer directory' '%sh(dirname "$kak_bufname")<a-!>/'
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Generic config
|
||||||
|
#################################
|
||||||
|
|
||||||
|
set-option -add global ui_options ncurses_assistant=none
|
||||||
|
set-option -add global ui_options ncurses_set_title=yes
|
||||||
|
set-option -add global ui_options ncurses_padding_fill=yes
|
||||||
|
|
||||||
|
# Indent with 2 spaces and make tabs appear as 2 spaces.
|
||||||
|
set-option global tabstop 4
|
||||||
|
set-option global indentwidth 4
|
||||||
|
|
||||||
|
# tabs to spaces
|
||||||
|
hook global InsertChar \t %{
|
||||||
|
exec -draft h@
|
||||||
|
}
|
||||||
|
|
||||||
|
# Keep space around cursor when scrolling.
|
||||||
|
set-option global scrolloff 3,3
|
||||||
|
|
||||||
|
# Add characters as matching pairs.
|
||||||
|
set-option -add global matching_pairs ‹ › « » “ ” ‘ ’
|
||||||
|
|
||||||
|
hook global ModuleLoaded x11 %{
|
||||||
|
set global termcmd 'terminator -e '
|
||||||
|
alias global terminal x11-terminal
|
||||||
|
}
|
||||||
|
|
||||||
|
# Persistent history across sessions.
|
||||||
|
hook global KakEnd .* %{ echo -to-file ~/.kak_history -quoting kakoune reg : %reg{:} }
|
||||||
|
hook global KakBegin .* %{ try %{ source ~/.kak_history } }
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Highlighting
|
||||||
|
#################################
|
||||||
|
|
||||||
|
add-highlighter global/matching show-matching
|
||||||
|
add-highlighter global/wrap wrap -word -indent -marker ⤷
|
||||||
|
add-highlighter global/suspicicous-whitespaces show-whitespaces -tab ⭲ -nbsp · -spc " " -lf " "
|
||||||
|
#add-highlighter global/trailing-whitespaces regex '\h+$' 0:error
|
||||||
|
|
||||||
|
define-command -hidden show-trailing-whitespaces %{ try %{ add-highlighter global/trailing-whitespaces regex '\h+$' 0:default,red } }
|
||||||
|
define-command -hidden hide-trailing-whitespaces %{ try %{ remove-highlighter global/trailing-whitespaces } }
|
||||||
|
hook global WinDisplay .* show-trailing-whitespaces
|
||||||
|
hook global ModeChange 'insert:normal' show-trailing-whitespaces
|
||||||
|
hook global ModeChange 'normal:insert' hide-trailing-whitespaces
|
||||||
|
|
||||||
|
|
||||||
|
colorscheme kalolo
|
||||||
|
|
||||||
|
# Highlight generic tags
|
||||||
|
hook global WinSetOption comment_line=(.+) %{
|
||||||
|
add-highlighter -override window/here regex "\b(HERE)\b" 1:rgb:ffff00,rgb:ff0000+FB # WHERE
|
||||||
|
add-highlighter -override window/fixme regex "\b(FIXME)\b" 1:rgb:ffff00,rgb:ff0000+Fb
|
||||||
|
add-highlighter -override window/todo regex "\b(TODO)\b" 1:rgb:000000,rgb:ff00ff+Fb
|
||||||
|
add-highlighter -override window/note regex "\b(NOTE)\b" 1:rgb:000000,rgb:a5c261+Fb
|
||||||
|
add-highlighter -override window/git regex "^[><=\|]{7}\s" 0:rgb:ffff00,rgb:ff0000+FB # Git conflicts markers, like a HERE: >>>>>>> <<<<<<< ======= |||||||
|
||||||
|
}
|
||||||
|
|
||||||
|
# Git conflict markers search
|
||||||
|
map global user g '/[<lt><gt>=\|]{7}<ret>vv' -docstring 'Search for Git conflict markers'
|
||||||
|
|
||||||
|
# Show line numbers (and highlight current cursor line)
|
||||||
|
hook global WinCreate ^[^*]+$ %{
|
||||||
|
add-highlighter window/ number-lines -hlcursor -min-digits 3
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Language specifics
|
||||||
|
#################################
|
||||||
|
|
||||||
|
filetype-hook makefile %{
|
||||||
|
set-option window indentwidth 0
|
||||||
|
}
|
||||||
|
|
||||||
|
filetype-hook latex %{
|
||||||
|
set-option buffer autowrap_column 160
|
||||||
|
autowrap-enable
|
||||||
|
addhl buffer/ column 160 white,black
|
||||||
|
}
|
||||||
|
|
||||||
|
filetype-hook markdown %{
|
||||||
|
# set-option buffer autowrap_column 80
|
||||||
|
# autowrap-enable
|
||||||
|
addhl buffer/ column 80 white,black
|
||||||
|
}
|
||||||
|
|
||||||
|
filetype-hook restructuredtext %{
|
||||||
|
# set-option buffer autowrap_column 80
|
||||||
|
# autowrap-enable
|
||||||
|
addhl buffer/ column 80 white,black
|
||||||
|
}
|
||||||
|
|
||||||
|
filetype-hook c|cpp %{
|
||||||
|
clang-enable-autocomplete
|
||||||
|
clang-enable-diagnostics
|
||||||
|
alias window lint clang-parse
|
||||||
|
alias window lint-next-error clang-diagnostics-next
|
||||||
|
set-option buffer formatcmd "clang-format -style='WebKit'"
|
||||||
|
map global normal A ': c-family-alternative-file'
|
||||||
|
}
|
||||||
|
|
||||||
|
filetype-hook python %{
|
||||||
|
jedi-enable-autocomplete
|
||||||
|
lint-enable
|
||||||
|
set-option global lintcmd 'flake8'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Plugins
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Autoinstall plug.kak if necessary.
|
||||||
|
evaluate-commands %sh{
|
||||||
|
plugins="$HOME/.config/kak/plugins"
|
||||||
|
mkdir -p $plugins
|
||||||
|
[ ! -e "$plugins/plug.kak" ] && \
|
||||||
|
git clone -q https://github.com/andreyorst/plug.kak "$plugins/plug.kak"
|
||||||
|
printf "%s\n" "source '$plugins/plug.kak/rc/plug.kak'"
|
||||||
|
}
|
||||||
|
# Load the plugin manager.
|
||||||
|
plug "andreyorst/plug.kak" noload
|
||||||
|
|
||||||
|
# Buffers list.
|
||||||
|
plug 'delapouite/kakoune-buffers' %{
|
||||||
|
hook global WinDisplay .* info-buffers
|
||||||
|
map global normal à ': enter-buffers-mode<ret>' -docstring 'buffers'
|
||||||
|
map global normal À ': enter-user-mode -lock buffers<ret>' -docstring 'buffers (lock)'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Multi-select all identical characters in the column.
|
||||||
|
plug 'occivink/kakoune-vertical-selection' %{
|
||||||
|
map global user <down> -docstring "Select all identical characters in the column downward" ': vertical-selection-down<ret>'
|
||||||
|
map global user <up> -docstring "Select all identical characters in the column upward" ': vertical-selection-up<ret>'
|
||||||
|
}
|
||||||
|
|
||||||
|
# System clipboard integration.
|
||||||
|
# FIXME bug: does not allow correct multi-cursors paste.
|
||||||
|
#plug "lePerdu/kakboard" %{
|
||||||
|
# hook global WinCreate .* %{ kakboard-enable }
|
||||||
|
#}
|
||||||
|
# Keep the 1 register in sync with the system clipboard .
|
||||||
|
# FIXME: does not work either.
|
||||||
|
# hook global RegisterModified '1' %{ nop %sh{
|
||||||
|
# printf %s "$kak_main_reg_dquote" | xsel --input --clipboard
|
||||||
|
# }}
|
||||||
|
|
||||||
|
# Fuzzy search
|
||||||
|
plug "andreyorst/fzf.kak" %{
|
||||||
|
map global normal <c-p> ': fzf-mode<ret>'
|
||||||
|
}
|
||||||
|
|
||||||
|
plug "andreyorst/tagbar.kak" defer "tagbar" %{
|
||||||
|
set-option global tagbar_sort false
|
||||||
|
set-option global tagbar_size 40
|
||||||
|
set-option global tagbar_display_anon false
|
||||||
|
set-option global tagbar_show_details false
|
||||||
|
} config %{
|
||||||
|
# if you have wrap highlighter enamled in you configuration
|
||||||
|
# files it's better to turn it off for tagbar, using this hook:
|
||||||
|
hook global WinSetOption filetype=tagbar %{
|
||||||
|
remove-highlighter window/wrap
|
||||||
|
# you can also disable rendering whitespaces here, line numbers, and
|
||||||
|
# matching characters
|
||||||
|
}
|
||||||
|
# To see what filetypes are supported use `ctags --list-kinds | awk '/^\w+/'
|
||||||
|
hook global WinSetOption filetype=(c|cpp|rust) %{
|
||||||
|
tagbar-enable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#plug 'delapouite/kakoune-cd' %{
|
||||||
|
# # Suggested mapping
|
||||||
|
# map global user c ': enter-user-mode cd<ret>' -docstring 'cd'
|
||||||
|
# # Suggested aliases
|
||||||
|
# alias global cdb change-directory-current-buffer
|
||||||
|
# alias global cdr change-directory-project-root
|
||||||
|
# alias global ecd edit-current-buffer-directory
|
||||||
|
# alias global pwd print-working-directory
|
||||||
|
#}
|
||||||
|
# Automatically change working directory to be the buffer's one.
|
||||||
|
#hook global WinDisplay .* %{
|
||||||
|
# # require delapouite/kakoune-cd
|
||||||
|
# change-directory-current-buffer
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Like alexherbo2/search-highlighter.kak, but which actually works.
|
||||||
|
# face global Search white,yellow
|
||||||
|
def search-highlight-enable %{
|
||||||
|
hook window -group search-highlight NormalKey [/?*nN]|<a-[/?*nN]> %{ try %{
|
||||||
|
addhl window/search dynregex '%reg{/}' 0:Search
|
||||||
|
}}
|
||||||
|
hook window -group search-highlight NormalKey <esc> %{ rmhl window/search}
|
||||||
|
}
|
||||||
|
def search-highlight-disable %{
|
||||||
|
rmhl window/search
|
||||||
|
rmhooks window search-highlight
|
||||||
|
}
|
||||||
|
# Always highlight search.
|
||||||
|
hook global WinDisplay .* %{
|
||||||
|
search-highlight-enable
|
||||||
|
}
|
||||||
|
|
||||||
|
plug "kak-lsp/kak-lsp" do %{
|
||||||
|
cargo install --locked --force --path .
|
||||||
|
} config %{
|
||||||
|
|
||||||
|
# uncomment to enable debugging
|
||||||
|
# eval %sh{echo ${kak_opt_lsp_cmd} >> /tmp/kak-lsp.log}
|
||||||
|
# set global lsp_cmd "kak-lsp -s %val{session} -vvv --log /tmp/kak-lsp.log"
|
||||||
|
|
||||||
|
# ,l will display a specific menu for LSP
|
||||||
|
map global user l %{: enter-user-mode lsp<ret>} -docstring "LSP mode"
|
||||||
|
|
||||||
|
# lsp-enable
|
||||||
|
set-option global lsp_server_configuration pyls.configurationSources=["flake8"]
|
||||||
|
|
||||||
|
set global lsp_diagnostic_line_error_sign '║'
|
||||||
|
set global lsp_diagnostic_line_warning_sign '┊'
|
||||||
|
|
||||||
|
# define-command ne -docstring 'go to next error/warning from lsp' %{ lsp-find-error --include-warnings }
|
||||||
|
# define-command pe -docstring 'go to previous error/warning from lsp' %{ lsp-find-error --previous --include-warnings }
|
||||||
|
# define-command ee -docstring 'go to current error/warning from lsp' %{ lsp-find-error --include-warnings; lsp-find-error --previous --include-warnings }
|
||||||
|
|
||||||
|
define-command lsp-restart -docstring 'restart lsp server' %{ lsp-stop; lsp-start }
|
||||||
|
|
||||||
|
hook global WinSetOption filetype=(c|cpp|python) %{
|
||||||
|
# Show matching objects?
|
||||||
|
set-option window lsp_auto_highlight_references false
|
||||||
|
map global '<s-*>' -docstring 'Highlight related references' ': lsp-highlight-references<ret>'
|
||||||
|
|
||||||
|
# Hint window next to the cursor?
|
||||||
|
set-option window lsp_hover_anchor false
|
||||||
|
|
||||||
|
lsp-auto-hover-enable
|
||||||
|
lsp-enable-window
|
||||||
|
}
|
||||||
|
|
||||||
|
hook global KakEnd .* lsp-exit
|
||||||
|
}
|
||||||
|
|
||||||
|
plug "dmerejkowsky/kak-spell" config %{
|
||||||
|
declare-user-mode kak-spell
|
||||||
|
map global user s ': enter-user-mode -lock kak-spell<ret>' -docstring 'enter spell user mode'
|
||||||
|
map global kak-spell a ': kak-spell-add<ret>' -docstring 'add the selection to the user dict'
|
||||||
|
map global kak-spell d ': kak-spell-disable<ret>' -docstring 'clear spelling highlighters'
|
||||||
|
map global kak-spell e ': kak-spell-enable en_US<ret> :kak-spell <ret>' -docstring 'enable spell check in English'
|
||||||
|
map global kak-spell f ': kak-spell-enable fr_FR<ret> :kak-spell <ret>' -docstring 'run spell check in French'
|
||||||
|
map global kak-spell l ': kak-spell-list <ret>' -docstring 'list spelling errors in a buffer'
|
||||||
|
map global kak-spell n ': kak-spell-next<ret>' -docstring 'go to next spell error'
|
||||||
|
map global kak-spell p ': kak-spell-previous<ret>' -docstring 'go to next spell error'
|
||||||
|
map global kak-spell r ': kak-spell-replace<ret>' -docstring 'suggest a list of replacements'
|
||||||
|
map global kak-spell x ': kak-spell-remove<ret>' -docstring 'remove the selection from the user dict'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
set-option -add global ui_options ncurses_padding_char=╱ # Examples: ▚ ╳ ╱ ┼ ╲
|
||||||
|
|
||||||
|
# add-highlighter global/ scrollbar
|
||||||
|
# add-highlighter global/scrollbar/ scrollbar-indicator red,default lsp_error_lines
|
||||||
|
# add-highlighter global/scrollbar/ scrollbar-indicator yellow,default lint_flags
|
||||||
|
# # add-highlighter global/scrollbar/ scrollbar-indicator red,default git_diff_flags
|
||||||
|
# # git show-diff
|
||||||
|
|
||||||
|
|
||||||
|
# Force `liquidprompt` to be a shell filetype.
|
||||||
|
hook global BufCreate (.*/)?liquidprompt %{
|
||||||
|
set buffer filetype sh
|
||||||
|
}
|
||||||
|
|
||||||
|
# Force liquidprompt's *.theme files to be a shell filetype.
|
||||||
|
hook global BufCreate .*\.theme %{
|
||||||
|
set buffer filetype sh
|
||||||
|
}
|
||||||
|
hook global BufCreate .*\.conf %{
|
||||||
|
set buffer filetype sh
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
[delta]
|
[delta]
|
||||||
navigate = true
|
navigate = true
|
||||||
side-by-side = true
|
side-by-side = false
|
||||||
file-style = yellow
|
file-style = yellow
|
||||||
|
|
||||||
# we define the delta feature "ov-diff" we are using for git diff
|
# we define the delta feature "ov-diff" we are using for git diff
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue