From 5deb05b869a22b0ce29ca071cf0c3898fae63063 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sat, 30 Jul 2022 18:26:23 +0200 Subject: Add surround --- fnl/config/hop.fnl | 4 ++-- fnl/config/init.fnl | 1 + fnl/config/lualine.fnl | 19 ++++++++++--------- fnl/config/surround.fnl | 6 ++++++ 4 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 fnl/config/surround.fnl diff --git a/fnl/config/hop.fnl b/fnl/config/hop.fnl index a2aff1e..55dd52f 100644 --- a/fnl/config/hop.fnl +++ b/fnl/config/hop.fnl @@ -5,8 +5,8 @@ (def- opts {:noremap true :silent true}) -(nvim.set_keymap :n :s ":HopChar2" {:silent true}) -(nvim.set_keymap :n :S ":HopWord" {:silent true}) +(nvim.set_keymap :n :m ":HopChar2" {:silent true}) +(nvim.set_keymap :n :M ":HopWord" {:silent true}) (nvim.set_keymap :o :f ":lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })" opts) diff --git a/fnl/config/init.fnl b/fnl/config/init.fnl index 3d54805..9b1fb5e 100644 --- a/fnl/config/init.fnl +++ b/fnl/config/init.fnl @@ -27,4 +27,5 @@ config.window-picker config.zen config.minibar + config.surround config.lsp]}) diff --git a/fnl/config/lualine.fnl b/fnl/config/lualine.fnl index 87aaf94..9674323 100644 --- a/fnl/config/lualine.fnl +++ b/fnl/config/lualine.fnl @@ -4,15 +4,14 @@ (def- ignore [:help :packer :neogitstatus - :NvimTree + ;; :NvimTree :lir :spectre_panel :alpha :Outline :NeogitStatus :NeogitCommitMessage - :TelescopePrompt - ""]) + :TelescopePrompt]) (defn- active-clients [] (let [clients (vim.lsp.buf_get_clients) client_names []] @@ -30,25 +29,27 @@ :sections [:error :warn] :symbols {:error " " :warn " "} :colored false + :disabled_buftypes [:nvim-tree] :padding 0 :update_in_insert false :always_visible true}) -(def- diff {1 :diff :colored false :cond hide-in-width}) +(def- diff {1 :diff :colored false :disabled_buftypes [:nvim-tree] :cond hide-in-width}) -(def- branch {1 "b:gitsigns_head" :icon " " :cond hide-in-width}) +(def- branch {1 "b:gitsigns_head" :icon " " :disabled_buftypes [:nvim-tree] :cond hide-in-width}) -(def- filetype {1 :filetype :colored false :cond hide_in_width}) +(def- filetype {1 :filetype :disabled_buftypes [:nvim-tree] :colored false :cond hide_in_width}) -(def- language-server {1 active-clients :cond hide_in_width}) +(def- language-server {1 active-clients :disabled_buftypes [:nvim-tree] :cond hide_in_width}) (def- opts {:options {:icons_enabled true :theme :auto - :component_separators {:left "" :right ""} + :component_separators "" :section_separators {:left "" :right ""} :disabled_filetypes ignore :always_divide_middle true - :globalstatus true} + :globalstatus true + :refresh {:statusline 50}} :sections {:lualine_a [:mode] :lualine_b [branch diff] :lualine_c {} diff --git a/fnl/config/surround.fnl b/fnl/config/surround.fnl new file mode 100644 index 0000000..04a516f --- /dev/null +++ b/fnl/config/surround.fnl @@ -0,0 +1,6 @@ +;; Surround selections. +(module config.surround {autoload {: util}}) + +(def- opts {}) + +(util.use-config :nvim-surround opts) -- cgit v1.2.3-70-g09d2