2023-07-14 19:07:55 +00:00
|
|
|
(let [wezterm (require :wezterm)
|
2023-07-14 22:48:28 +00:00
|
|
|
wezterm-exists (vim.fn.executable :wezterm)
|
2023-07-14 19:07:55 +00:00
|
|
|
augroup (vim.api.nvim_create_augroup :NifocWezterm {:clear true})
|
|
|
|
aucmd vim.api.nvim_create_autocmd]
|
2023-07-14 22:48:28 +00:00
|
|
|
(when (= wezterm-exists 1)
|
|
|
|
(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})
|
2023-10-10 16:08:23 +00:00
|
|
|
(aucmd :VimEnter {:callback #(wezterm.set_user_var :enable-ligatures :t)
|
|
|
|
:group augroup})
|
|
|
|
(aucmd :VimLeavePre {:callback (fn []
|
|
|
|
(wezterm.set_user_var :enable-ligatures :f)
|
|
|
|
(wezterm.set_tab_title ""))
|
|
|
|
:group augroup})))
|