Skip to content

Commit

Permalink
chore(build): auto-generate vimdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 5, 2023
1 parent 1a945b2 commit 3cdb8c5
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions doc/focus.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*focus.txt* For Neovim >= 0.7.0 Last change: 2023 September 22
*focus.txt* For Neovim >= 0.7.0 Last change: 2023 October 05

==============================================================================
Table of Contents *focus-table-of-contents*
Expand Down Expand Up @@ -90,7 +90,7 @@ default settings:
relativenumber = false, -- Display relative line numbers in the focussed window only
hybridnumber = false, -- Display hybrid line numbers in the focussed window only
absolutenumber_unfocussed = false, -- Preserve absolute numbers in the unfocussed windows

cursorline = true, -- Display a cursorline in the focussed window only
cursorcolumn = false, -- Display cursorcolumn in the focussed window only
colorcolumn = {
Expand Down Expand Up @@ -283,7 +283,7 @@ buffer**
-- Enable auto highlighting for focussed/unfocussed windows
-- Default: false
require("focus").setup({ ui = { winhighlight = true } })

-- By default, the highlight groups are setup as such:
-- hi default link FocusedWindow VertSplit
-- hi default link UnfocusedWindow Normal
Expand All @@ -296,8 +296,9 @@ buffer**

DISABLING FOCUS *focus-focus.nvim-disabling-focus*

Focus can be disabled by setting a variable for just one window
(`vim.w.focus_disable = true`) or globally (`vim.g.focus_disable = true`).
Focus can be disabled by setting a variable for just one window,
(`vim.w.focus_disable = true`), just one buffer (`vim.b.focus_disable = true`),
or globally (`vim.g.focus_disable = true`).

If you want to disable Focus for certain buffer or file types you can do this
by setting up autocommands (`:help autocmd`) in your configuration.
Expand All @@ -307,10 +308,10 @@ Here is an example:
>lua
local ignore_filetypes = { 'neo-tree' }
local ignore_buftypes = { 'nofile', 'prompt', 'popup' }

local augroup =
vim.api.nvim_create_augroup('FocusDisable', { clear = true })

vim.api.nvim_create_autocmd('WinEnter', {
group = augroup,
callback = function(_)
Expand All @@ -323,7 +324,7 @@ Here is an example:
end,
desc = 'Disable focus autoresize for BufType',
})

vim.api.nvim_create_autocmd('FileType', {
group = augroup,
callback = function(_)
Expand Down Expand Up @@ -462,7 +463,7 @@ LEVERAGE HJKL TO MOVE OR CREATE YOUR SPLITS DIRECTIONALLY ~
require('focus').split_command(direction)
end, { desc = string.format('Create or move to split (%s)', direction) })
end

-- Use `<Leader>h` to split the screen to the left, same as command FocusSplitLeft etc
focusmap('h')
focusmap('j')
Expand Down

0 comments on commit 3cdb8c5

Please sign in to comment.