Disable mini.indentscope
in vim.lsp.buf.hover
floating window
#962
-
Hi everyone, local disabled_filetypes = { 'NvimTree', 'alpha', 'help' }
vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('MiniIndentScopeDisable', { clear = true }),
callback = function(opts)
local ftype = vim.bo[opts.buf].filetype
if vim.tbl_contains(disabled_filetypes, ftype) then
vim.b[opts.buf].miniindentscope_disable = true
end
end,
}) How would you go disabling Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Good question. Unfortunately, I also can't see a reliable way to specifically identify a buffer used in Instead I can suggest a more general criteria which should fit nicely in what you're trying to achieve: disable 'mini.indentscope' in any "helper" buffer (i.e. with 'buftype' not equal to local disable_in_helper_floats = function(opts)
if vim.bo[opts.buf].buftype == '' then return end
if vim.api.nvim_win_get_config(0).relative == '' then return end
vim.b[opts.buf].miniindentscope_disable = true
end
local augroup = vim.api.nvim_create_augroup('MiniIndentScopeDisable', { clear = true })
vim.api.nvim_create_autocmd('BufWinEnter', { group = augroup, callback = disable_in_helper_floats }) |
Beta Was this translation helpful? Give feedback.
Good question. Unfortunately, I also can't see a reliable way to specifically identify a buffer used in
vim.lsp.buf.hover()
.Instead I can suggest a more general criteria which should fit nicely in what you're trying to achieve: disable 'mini.indentscope' in any "helper" buffer (i.e. with 'buftype' not equal to
''
) in floating window (i.e. withrelative
config field not equal to''
). Here is how I'd go about implementing it: