diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-07-19 00:05:35 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-07-19 00:05:35 +0200 |
commit | 8a50f4eed5cbc77a4f49b1fb2cd504a872d3af65 (patch) | |
tree | 2d8d21c0b6e067b0db57eb756dbe4d89bbef02c2 /fnl/config | |
parent | 6d785ef00645009e220757159be9a7fe8ea5e587 (diff) |
Add minibar
Diffstat (limited to 'fnl/config')
-rw-r--r-- | fnl/config/init.fnl | 2 | ||||
-rw-r--r-- | fnl/config/minibar.fnl | 18 | ||||
-rw-r--r-- | fnl/config/winbar.fnl | 37 |
3 files changed, 19 insertions, 38 deletions
diff --git a/fnl/config/init.fnl b/fnl/config/init.fnl index 2aa9da2..3d54805 100644 --- a/fnl/config/init.fnl +++ b/fnl/config/init.fnl @@ -26,5 +26,5 @@ config.which-key config.window-picker config.zen - config.winbar + config.minibar config.lsp]}) diff --git a/fnl/config/minibar.fnl b/fnl/config/minibar.fnl new file mode 100644 index 0000000..6b5630f --- /dev/null +++ b/fnl/config/minibar.fnl @@ -0,0 +1,18 @@ +(module config.minibar {autoload {: util}}) + +(let [minibar (util.load-plugin :minibar)] + (minibar.setup {:ignore-filetypes [:help + :startify + :dashboard + :packer + :neogitstatus + :NvimTree + :Trouble + :alpha + :lir + :Outline + :NeogitStatus + :NeogitCommitMessage + :NeogitNotification + :NeogitCommitView + :spectre_panel]})) diff --git a/fnl/config/winbar.fnl b/fnl/config/winbar.fnl deleted file mode 100644 index b8e708b..0000000 --- a/fnl/config/winbar.fnl +++ /dev/null @@ -1,37 +0,0 @@ -;; Winbar settings -(module config.winbar {autoload {nvim aniseed.nvim}}) - -(def- ignore-filetypes {:help true - :startify true - :dashboard true - :packer true - :neogitstatus true - :NvimTree true - :Trouble true - :alpha true - :lir true - :Outline true - :NeogitStatus true - :NeogitCommitMessage true - :NeogitNotification true - :spectre_panel true}) - -(defn- is-empty [arg] (or (= arg nil) (= arg ""))) - -(defn- get-filename [] (vim.fn.expand "%t:")) - -(defn- get-filetype [] vim.bo.filetype) - -(defn- get-extension [] (vim.fn.expand "%:e")) - -(defn- ignore [] (. ignore-filetypes (get-filetype))) - -(defn- get-winbar [] - (if (and (not= (ignore) true) (not= (is-empty (get-filetype)) true)) - (vim.api.nvim_set_option_value :winbar (.. " " "%t%m") - {:scope :local}) - (vim.api.nvim_set_option_value :winbar "" {:scope :local}))) - -(nvim.create_autocmd "BufEnter,CursorMoved,CursorHold,BufWinEnter,BufFilePost,InsertEnter,BufWritePost,TabClosed" - {:callback (lambda [] - (get-winbar))}) |