diff options
Diffstat (limited to 'fnl/nvrc/ui/modules/vi_mode.fnl')
-rw-r--r-- | fnl/nvrc/ui/modules/vi_mode.fnl | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/fnl/nvrc/ui/modules/vi_mode.fnl b/fnl/nvrc/ui/modules/vi_mode.fnl deleted file mode 100644 index 0fd4e16..0000000 --- a/fnl/nvrc/ui/modules/vi_mode.fnl +++ /dev/null @@ -1,40 +0,0 @@ -(local modes {:n :NORMAL - :no :NORMAL - :v :VISUAL - :V "V-LINE" - "\022" "V-BLOCK" - :s :SELECT - :S "L-SELECT" - "\019" "B-SELECT" - :i :INSERT - :ic :INSERT - :R :REPLACE - :Rv "V-REPLACE" - :c :COMMAND - :cv "VIM-EX" - :ce :EX - :r :PROMPT - :rm :MOAR - :r? :CONFIRM - :! :SHELL - :t :TERMINAL}) - -(fn mode [] - (let [current-mode (. (vim.api.nvim_get_mode) :mode)] - (: (string.format "%s " (. modes current-mode)) :upper))) - -(fn update-mode-colors [] - (let [current-mode (. (vim.api.nvim_get_mode) :mode)] - (var mode-color "%#StatusLineAccent#") - (if (= current-mode :n) (set mode-color "%#StatusLineAccent#") - (or (= current-mode :i) (= current-mode :ic)) - (set mode-color "%#StatusLineInsertAccent#") - (or (or (= current-mode :v) (= current-mode :V)) - (= current-mode "\022")) - (set mode-color "%#StatusLineVisualAccent#") (= current-mode :R) - (set mode-color "%#StatusLineReplaceAccent#") (= current-mode :c) - (set mode-color "%#StatusLineCmdLineAccent#") (= current-mode :t) - (set mode-color "%#StatusLineTerminalAccent#")) - mode-color)) - -{: mode : update-mode-colors} |