@@ -80,6 +80,8 @@ default settings:
80
80
height = 0, -- Force height for the focused window
81
81
minwidth = 0, -- Force minimum width for the unfocused window
82
82
minheight = 0, -- Force minimum height for the unfocused window
83
+ focusedwindow_minwidth = 0, -- Force minimum width for the focused window
84
+ focusedwindow_minheight = 0, -- Force minimum height for the focused window
83
85
height_quickfix = 10, -- Set the height of quickfix panel
84
86
},
85
87
split = {
@@ -91,7 +93,7 @@ default settings:
91
93
relativenumber = false, -- Display relative line numbers in the focussed window only
92
94
hybridnumber = false, -- Display hybrid line numbers in the focussed window only
93
95
absolutenumber_unfocussed = false, -- Preserve absolute numbers in the unfocussed windows
94
-
96
+
95
97
cursorline = true, -- Display a cursorline in the focussed window only
96
98
cursorcolumn = false, -- Display cursorcolumn in the focussed window only
97
99
colorcolumn = {
@@ -154,6 +156,14 @@ SETUP OPTIONS ~
154
156
require("focus").setup({ autoresize = { minwidth = 80} })
155
157
<
156
158
159
+ **Set Focus Minimum Width for Focused Window**
160
+
161
+ >lua
162
+ -- Force minimum width for the focused window
163
+ -- Default: Calculated based on golden ratio
164
+ require("focus").setup({ autoresize = { focusedwindow_minwidth = 80} })
165
+ <
166
+
157
167
**Set Focus Height**
158
168
159
169
>lua
@@ -170,6 +180,14 @@ SETUP OPTIONS ~
170
180
require("focus").setup({ autoresize = { minheight = 10} })
171
181
<
172
182
183
+ **Set Focus Minimum Height for Focused Window**
184
+
185
+ >lua
186
+ -- Force minimum height for the focused window
187
+ -- Default: Calculated based on golden ratio
188
+ require("focus").setup({ autoresize = { focusedwindow_minheight = 80} })
189
+ <
190
+
173
191
**Set Focus Quickfix Height**
174
192
175
193
>lua
@@ -287,7 +305,7 @@ buffer**
287
305
-- Enable auto highlighting for focussed/unfocussed windows
288
306
-- Default: false
289
307
require("focus").setup({ ui = { winhighlight = true } })
290
-
308
+
291
309
-- By default, the highlight groups are setup as such:
292
310
-- hi default link FocusedWindow VertSplit
293
311
-- hi default link UnfocusedWindow Normal
@@ -312,10 +330,10 @@ Here is an example:
312
330
>lua
313
331
local ignore_filetypes = { 'neo-tree' }
314
332
local ignore_buftypes = { 'nofile' , 'prompt' , 'popup' }
315
-
333
+
316
334
local augroup =
317
335
vim.api.nvim_create_augroup('FocusDisable', { clear = true })
318
-
336
+
319
337
vim.api.nvim_create_autocmd('WinEnter', {
320
338
group = augroup,
321
339
callback = function(_)
@@ -328,7 +346,7 @@ Here is an example:
328
346
end,
329
347
desc = 'Disable focus autoresize for BufType',
330
348
})
331
-
349
+
332
350
vim.api.nvim_create_autocmd('FileType', {
333
351
group = augroup,
334
352
callback = function(_)
@@ -473,7 +491,7 @@ LEVERAGE HJKL TO MOVE OR CREATE YOUR SPLITS DIRECTIONALLY ~
473
491
require('focus' ).split_command(direction)
474
492
end, { desc = string.format('Create or move to split (%s)', direction) })
475
493
end
476
-
494
+
477
495
-- Use `<Leader> h ` to split the screen to the left, same as command FocusSplitLeft etc
478
496
focusmap('h')
479
497
focusmap('j')
0 commit comments