nvim: Limit indentscope to reasonable max lines

Stops looking for a scope after 2000 lines (instead of the default
10000).
This commit is contained in:
Marty Oehme 2025-02-07 16:41:06 +01:00
parent d3e325db86
commit 8a57725f15
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -171,7 +171,7 @@ return {
conflict = { suffix = "" }, -- disable to use git-conflict instead conflict = { suffix = "" }, -- disable to use git-conflict instead
diagnostic = { suffix = "d", options = {} }, diagnostic = { suffix = "d", options = {} },
file = { suffix = "", options = {} }, file = { suffix = "", options = {} },
indent = { suffix = "" }, -- disable since we use indentscope above indent = { suffix = "" }, -- disable since we use indentscope
jump = { suffix = "j", options = {} }, jump = { suffix = "j", options = {} },
location = { suffix = "l", options = {} }, location = { suffix = "l", options = {} },
oldfile = { suffix = "o", options = {} }, -- FIXME: overwritten by wrapping defaults currently oldfile = { suffix = "o", options = {} }, -- FIXME: overwritten by wrapping defaults currently
@ -201,7 +201,7 @@ return {
require("mini.indentscope").setup({ require("mini.indentscope").setup({
symbol = "", symbol = "",
draw = { animation = require("mini.indentscope").gen_animation.none() }, draw = { animation = require("mini.indentscope").gen_animation.none() },
options = { indent_at_cursor = false }, options = { indent_at_cursor = false, n_lines = 2000 },
}) })
-- disable indentlines for terminals -- disable indentlines for terminals
vim.api.nvim_create_autocmd("TermOpen", { vim.api.nvim_create_autocmd("TermOpen", {