add zoom toggle to nvim
This commit is contained in:
parent
19cbbb9fa8
commit
a404d3af2c
3 changed files with 25 additions and 18 deletions
|
|
@ -43,6 +43,7 @@ sops = "latest"
|
||||||
usage = "latest"
|
usage = "latest"
|
||||||
yazi = "latest"
|
yazi = "latest"
|
||||||
zoxide = "latest"
|
zoxide = "latest"
|
||||||
|
watchexec = "latest"
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
lockfile = true
|
lockfile = true
|
||||||
|
|
|
||||||
|
|
@ -27,28 +27,28 @@ opt.expandtab = true -- Use spaces instead of tabs
|
||||||
opt.formatoptions = "jcroqlnt" -- tcqj
|
opt.formatoptions = "jcroqlnt" -- tcqj
|
||||||
opt.grepformat = "%f:%l:%c:%m"
|
opt.grepformat = "%f:%l:%c:%m"
|
||||||
opt.grepprg = "rg --vimgrep"
|
opt.grepprg = "rg --vimgrep"
|
||||||
opt.ignorecase = true -- Ignore case
|
opt.ignorecase = true -- Ignore case
|
||||||
opt.inccommand = 'split' -- Preview substitutions live, as you type!
|
opt.inccommand = 'split' -- Preview substitutions live, as you type!
|
||||||
opt.mouse = "a" -- Enable mouse mode
|
opt.mouse = "a" -- Enable mouse mode
|
||||||
opt.nrformats = 'blank,bin,hex'
|
opt.nrformats = 'blank,bin,hex'
|
||||||
opt.number = true -- Print line number
|
opt.number = true -- Print line number
|
||||||
opt.pumblend = 10 -- Popup blend
|
opt.pumblend = 10 -- Popup blend
|
||||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
opt.pumheight = 10 -- Maximum number of entries in a popup
|
||||||
opt.relativenumber = true -- Relative line numbers
|
-- opt.relativenumber = true -- Relative line numbers
|
||||||
opt.scrolloff = 15 -- Lines of context
|
opt.scrolloff = 15 -- Lines of context
|
||||||
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
||||||
opt.shiftround = true -- Round indent
|
opt.shiftround = true -- Round indent
|
||||||
opt.shiftwidth = 2 -- Size of an indent
|
opt.shiftwidth = 2 -- Size of an indent
|
||||||
opt.showmode = false -- Don't show mode since we have a statusline
|
opt.showmode = false -- Don't show mode since we have a statusline
|
||||||
opt.sidescrolloff = 8 -- Columns of context
|
opt.sidescrolloff = 8 -- Columns of context
|
||||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
||||||
opt.smartcase = true -- Don't ignore case with capitals
|
opt.smartcase = true -- Don't ignore case with capitals
|
||||||
opt.smartindent = true -- Insert indents automatically
|
opt.smartindent = true -- Insert indents automatically
|
||||||
opt.spelllang = { "en" }
|
opt.spelllang = { "en" }
|
||||||
opt.splitbelow = true -- Put new windows below current
|
opt.splitbelow = true -- Put new windows below current
|
||||||
opt.splitright = true -- Put new windows right of current
|
opt.splitright = true -- Put new windows right of current
|
||||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||||
opt.termguicolors = true -- True color support
|
opt.termguicolors = true -- True color support
|
||||||
opt.undofile = true
|
opt.undofile = true
|
||||||
opt.undolevels = 10000
|
opt.undolevels = 10000
|
||||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
||||||
|
|
|
||||||
|
|
@ -238,5 +238,11 @@ return {
|
||||||
vim.api.nvim_create_user_command("SessionDelete", function()
|
vim.api.nvim_create_user_command("SessionDelete", function()
|
||||||
require('mini.sessions').select('delete')
|
require('mini.sessions').select('delete')
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<Leader>uz', function()
|
||||||
|
require('mini.misc').zoom()
|
||||||
|
end,
|
||||||
|
{ desc = 'Toggle zoom', silent = true })
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue