Skip to content

Commit 71e1f2b

Browse files
committed
refactor(zen-mode): add type annotations and improve readability
- Annotate `on_open` function with parameter type. - Clarify excluded `filetypes` and `buftypes` with comments.
1 parent f1ca023 commit 71e1f2b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lua/plugins/zen-mode.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
-- ZenMode | Distraction-free coding for Neovim
22
-- https://github.com/folke/zen-mode.nvim
33

4+
-- Filetypes to exclude from custom on_open rules
45
local filetypes = {
56
"fugitive",
67
"log",
78
}
9+
10+
-- Buftypes to exclude from custom on_open rules
811
local buftypes = {
912
"nofile",
1013
"prompt",
1114
"terminal",
1215
}
1316

17+
---Define function to apply custom sizing rules when opening ZenMode.
18+
---@param win integer
1419
local on_open = function(win)
1520
-- Make certain buffers use all available columns
1621
local bufnr = vim.api.nvim_win_get_buf(win)

0 commit comments

Comments
 (0)