summaryrefslogtreecommitdiff
path: root/fnl/config/winbar.fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-07-18 01:31:52 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-07-18 01:31:52 +0200
commit1a1e70f440a0ee147e2ff6c9015bf350a318e392 (patch)
tree839b62b47d68dd5b6f1fb1b1cad4ef9a92c9ded0 /fnl/config/winbar.fnl
parent63cba80dab3c6aa19a2111cc2de6b2ac7afae516 (diff)
Remove icon from winbar
Diffstat (limited to 'fnl/config/winbar.fnl')
-rw-r--r--fnl/config/winbar.fnl20
1 files changed, 3 insertions, 17 deletions
diff --git a/fnl/config/winbar.fnl b/fnl/config/winbar.fnl
index 9f9cbb3..d87d2f1 100644
--- a/fnl/config/winbar.fnl
+++ b/fnl/config/winbar.fnl
@@ -23,24 +23,10 @@
(defn- ignore [] (. ignore-filetypes (get-filetype)))
-(defn- get-icon [] (let [(ok? devicons) (pcall require :nvim-web-devicons)]
- (if ok?
- (let [filename (get-filename)
- extension (get-extension)]
- (if (not (is-empty filename))
- (let [(icon _) (devicons.get_icon filename
- extension)]
- icon))))))
-
(defn- get-winbar []
- (if (and (not= (ignore) true) (not= (is-empty (get-filename)) true))
- (let [icon (get-icon)]
- (if (not= icon nil)
- (vim.api.nvim_set_option_value :winbar
- (.. " " icon " " "%t%m")
- {:scope :local})
- (vim.api.nvim_set_option_value :winbar (.. " " "%t%m")
- {:scope :local})))
+ (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"