Skip to content

Disable mini.indentscope in vim.lsp.buf.hover floating window #962

Closed Answered by echasnovski
FrancescoLuzzi asked this question in Q&A
Discussion options

You must be logged in to vote

How would you go disabling indentscope inside the floating window opened by vim.lsp.buf.hover?

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. with relative config field not equal to ''). Here is how I'd go about implementing it:

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FrancescoLuzzi
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants