From b3dbfe6ae7bcc40a97472ff53b263549cd21c124 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 5 Nov 2020 07:30:00 -0700 Subject: [PATCH] Kakoune (#11) --- install.conf.yaml | 3 +++ kakrc | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 kakrc diff --git a/install.conf.yaml b/install.conf.yaml index 545b3fd..705598a 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -38,3 +38,6 @@ ~/qiime2-3.code-workspace: vscode/qiime2-3.code-workspace ~/mds.code-workspace: vscode/mds.code-workspace ~/personal.code-workspace: vscode/personal.code-workspace + ~/.config/kak/kakrc: + create: true + path: kakrc diff --git a/kakrc b/kakrc new file mode 100644 index 0000000..c1093f1 --- /dev/null +++ b/kakrc @@ -0,0 +1,36 @@ +# inspired by https://gist.github.com/daboross/ce6a5a9f8d14bd4974c5f43b90dfdfaa + +# line numbers +add-highlighter global/ number-lines +# TODO: do I _have_ to use rgb here? +set-face global LineNumbers rgb:707070,default + +# helper popups +set -add global autoinfo normal +set global ui_options ncurses_assistant=off + +set global autowrap_fmtcmd 'fmt -w %c' + +# global: wrap to 100 characters (unless FT override, below) +add-highlighter global/ wrap -width 101 -indent -word +set global autowrap_column 101 + +# global: 4 space indents (unless FT override, below) +set global tabstop 4 +hook global InsertChar \t %{ exec -draft -itersel h@ } -group kakrc-replace-tabs-with-spaces + +#### FT overrides #### +hook global WinSetOption filetype=rust %{ + set buffer formatcmd 'rustfmt' + set buffer tabstop 4 + set buffer indentwidth 4 + add-highlighter buffer/ wrap -word -width 120 + set buffer autowrap_column 120 +} + +hook global WinSetOption filetype=python %{ + set buffer tabstop 4 + set buffer indentwidth 4 + add-highlighter buffer/ wrap -word -width 79 + set buffer autowrap_column 79 +}