Neovim: Fix focus plugin not loading
This commit is contained in:
parent
7b8ea9c3af
commit
c2b60ad356
@ -2,19 +2,22 @@
|
||||
-- https://github.com/nvim-focus/focus.nvim
|
||||
return {
|
||||
'nvim-focus/focus.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
enable = true,
|
||||
ui = {
|
||||
-- Display line numbers in the focused window only.
|
||||
hybridnumber = true,
|
||||
|
||||
-- Display signcolumn in the focussed window only
|
||||
-- Display signcolumn in the focused window only.
|
||||
signcolumn = true,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local ignore_buftypes = { 'dbui' }
|
||||
require('focus').setup {}
|
||||
|
||||
local ignore_buftypes = { 'dbui' }
|
||||
local ignore_filetypes = { 'dbui' }
|
||||
local augroup = vim.api.nvim_create_augroup('FocusDisable', { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd('WinEnter', {
|
||||
@ -28,5 +31,17 @@ return {
|
||||
end,
|
||||
desc = 'Disable focus autoresize for BufType',
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
group = augroup,
|
||||
callback = function(_)
|
||||
if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then
|
||||
vim.b.focus_disable = true
|
||||
else
|
||||
vim.b.focus_disable = false
|
||||
end
|
||||
end,
|
||||
desc = 'Disable focus autoresize for FileType',
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user