1
0
Fork 0
dotfiles/home/config/nvim/plugins/wezterm.fnl
2023-07-14 21:07:55 +02:00

15 lines
757 B
Fennel

(let [wezterm (require :wezterm)
augroup (vim.api.nvim_create_augroup :NifocWezterm {:clear true})
aucmd vim.api.nvim_create_autocmd]
(wezterm.setup {:create_commands false})
(aucmd :BufEnter {:callback (fn [args]
(let [path (vim.api.nvim_buf_get_name args.buf)
name (vim.fs.basename path)
title (if (and name (> (length name) 0))
(.. "nvim " name)
"")]
(wezterm.set_tab_title title)))
:group augroup})
(aucmd :VimLeavePre {:callback #(wezterm.set_tab_title "") :group augroup}))