From 8a50f4eed5cbc77a4f49b1fb2cd504a872d3af65 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 19 Jul 2022 00:05:35 +0200 Subject: Add minibar --- fnl/config/winbar.fnl | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 fnl/config/winbar.fnl (limited to 'fnl/config/winbar.fnl') 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))}) -- cgit v1.2.3-70-g09d2