mirror of
https://github.com/stevenproctor/dotfiles.git
synced 2026-01-28 12:49:56 -06:00
Zoom toggle support for NeoVim
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
(require :dotfiles.core)
|
||||
(require :dotfiles.mapping)
|
||||
(require :dotfiles.conceal)
|
||||
(require :dotfiles.zoom-toggle)
|
||||
|
||||
;(nvim.ex.source "~/.vimrc")
|
||||
|
||||
|
||||
24
nvim/.config/nvim/fnl/dotfiles/zoom-toggle.fnl
Normal file
24
nvim/.config/nvim/fnl/dotfiles/zoom-toggle.fnl
Normal file
@@ -0,0 +1,24 @@
|
||||
(module dotfiles.zoom-toggle
|
||||
{autoload
|
||||
{a aniseed.core}
|
||||
require
|
||||
{anenv aniseed.env
|
||||
nvim aniseed.nvim
|
||||
nu aniseed.nvim.util
|
||||
u dotfiles.util}})
|
||||
|
||||
(var unzoom! nil)
|
||||
|
||||
(defn zoom-toggle []
|
||||
(if unzoom!
|
||||
(do
|
||||
(nvim.command unzoom!)
|
||||
(set unzoom! nil))
|
||||
(do
|
||||
(set unzoom! (nvim.fn.winrestcmd))
|
||||
(nvim.ex.resize)
|
||||
(nvim.ex.vertical :resize))))
|
||||
|
||||
|
||||
(nu.fn-bridge :ZoomToggle :dotfiles.zoom-toggle :zoom-toggle {:return false})
|
||||
(u.nnoremap :<C-W>z ":call ZoomToggle()<CR>")
|
||||
Reference in New Issue
Block a user