diff options
| -rw-r--r-- | autoload/git.kak | 26 | ||||
| -rw-r--r-- | autoload/repl.kak | 1 | ||||
| -rw-r--r-- | autoload/window.kak | 8 | ||||
| -rw-r--r-- | colors/phenax.kak | 5 | ||||
| -rwxr-xr-x | scripts/apply_vimgrep_updates.fnl | 2 |
5 files changed, 15 insertions, 27 deletions
diff --git a/autoload/git.kak b/autoload/git.kak index 2cc3228..76485ab 100644 --- a/autoload/git.kak +++ b/autoload/git.kak @@ -9,8 +9,6 @@ declare-user-mode git-r map global user g ': enter-user-mode git<ret>' -docstring 'Git mode' map global git s ': gitui<ret>' -docstring 'Git tui' map global git A ': git add %val{buffile}<ret>' -docstring 'Add file' -map global git c ': git add commit<ret>' -docstring 'Commit' -map global git C ': git add commit --amend<ret>' -docstring 'Amend commit' map global git m ': git-line-blame<ret>' -docstring 'Blame selection lines' map global git r ': enter-user-mode git-r<ret>' -docstring 'Git re(base/set) mode' @@ -31,26 +29,6 @@ define-command git-toggle-diff %{ } define-command git-line-blame %{ - evaluate-commands %sh{ - file="${kak_buffile}" - line="$(echo "$kak_selection_desc" | sed -E 's/\.[0-9]+//g')" - echo "terminal sh -c \"git --no-pager log -u -L '$line:$file' --color=always | delta\"" - } + terminal-singleton git-blame sh -c \ + "git -p log -u -L '%sh{echo ""$kak_selection_desc"" | sed -E 's/\.[0-9]+//g'}:%val{buffile}' --color=always" } - -# TODO: Toggle this -# hook global -group git-diff-if-repo EnterDirectory .* %{ -# remove-hooks global git-diff -# try %{ -# evaluate-commands %sh{ -# if (git rev-parse --is-inside-work-tree >/dev/null 2>&1); then -# echo " -# hook global -group git-diff ModeChange .*:.*:normal %{ try %{git update-diff} } -# hook global -group git-diff WinCreate .* %{ try %{git update-diff} } -# hook global -group git-diff BufReload .* %{ try %{git update-diff} } -# " -# fi -# } -# } -# } - diff --git a/autoload/repl.kak b/autoload/repl.kak index 933664e..1e3d369 100644 --- a/autoload/repl.kak +++ b/autoload/repl.kak @@ -3,6 +3,7 @@ declare-option str xrepl_current_cmd; declare-option str xrepl_current_transform; declare-option bool xrepl_current_clear_screen false; +# TODO: Use register set to selection (paragraph) instead of selection # TODO: Add env # TODO: Migrate curly # TODO: Preserve original selection with send paragraph diff --git a/autoload/window.kak b/autoload/window.kak index a405924..f5f1d95 100644 --- a/autoload/window.kak +++ b/autoload/window.kak @@ -9,16 +9,18 @@ map global win z ': wq<ret>' define-command terminal-singleton -params 2.. -docstring 'terminal-singleton <name> <command> [args...]' %{ eval %sh{ - name="$1"; shift; + name="$1"; shift 1; open-term-win() { printf "terminal -n '$name' env" printf " 'KAKOUNE_SESSION=$kak_session' 'KAKOUNE_CLIENT=$kak_client'" - printf " %q" "$@" + for arg in "$@"; do + printf ' "%s"' "$(echo "$arg" | sed 's/["]/\\"/g')" + done } focus-term-win() { tmux select-window -t "$name" >/dev/null 2>&1 } - focus-term-win || open-term-win "$@"; + (focus-term-win || open-term-win "$@") } } diff --git a/colors/phenax.kak b/colors/phenax.kak index 191080b..406bf0d 100644 --- a/colors/phenax.kak +++ b/colors/phenax.kak @@ -32,6 +32,7 @@ evaluate-commands %sh{ face global value ${blue1} face global type ${blue1} face global variable ${blue1} + face global numeric ${orange} face global module ${blue1} face global function ${blue2} face global string ${green} @@ -145,6 +146,10 @@ evaluate-commands %sh{ face global ts_documentation documentation face global ts_meta meta face global ts_builtin builtin + face global ts_constant_numeric numeric + face global ts_constant_builtin numeric + face global ts_constant_builtin_boolean numeric + face global ts_string_special_symbol variable face global ts_punctuation_bracket ${foreground4},default " diff --git a/scripts/apply_vimgrep_updates.fnl b/scripts/apply_vimgrep_updates.fnl index 664ed8a..4542930 100755 --- a/scripts/apply_vimgrep_updates.fnl +++ b/scripts/apply_vimgrep_updates.fnl @@ -1,5 +1,7 @@ #!/usr/bin/env -S fennel --lua luajit +;; TODO: Support -A -B outputs for context + (local M {}) (fn M.main [] |
