Created
July 24, 2018 16:43
-
-
Save divarvel/954736d85529fac17a4d45d7177148fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define-command -docstring ":edit with a fuzzy search" fuzzy-edit %{ | |
evaluate-commands %sh{ | |
FILE=$(rg --files | rofi -dmenu -i -p 'file'); | |
[[ -n "$FILE" ]] && printf "edit %s\\n" $FILE | |
} | |
} | |
define-command -docstring ":buffer with a fuzzy search " fuzzy-buffer %{ | |
evaluate-commands %sh{ | |
BUFFER=$(printf "%s\\n" "${kak_buflist}" | rofi -dmenu -i -sep ' ' -p 'buffer'); | |
[[ -n "$BUFFER" ]] && printf "buffer %s\\n" $BUFFER | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addhl global/ number-lines | |
colorscheme zenburn | |
source ~/.config/kak/fuzzy.kak | |
## LSP SETUP | |
eval %sh{kak-lsp --kakoune -s $kak_session } | |
nop %sh{ (kak-lsp -s $kak_session -vvv ) > /dev/null 2>&1 < /dev/null & } | |
# display info inline | |
set global lsp_hover_anchor true | |
# Quick access for common commands | |
map global user t :lsp-hover<ret> | |
map global user b :fuzzy-buffer<ret> | |
map global user e :fuzzy-edit<ret> | |
# Use rg instead of grep -rHn | |
set-option global grepcmd rg | |
# Haskell: use stylish-haskell as formatter | |
hook global BufWritePre .*[.](hs) %{ | |
set-option buffer formatcmd stylish-haskell | |
format | |
} | |
alias global x write-quit | |
alias global xa write-all-quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment