@@ -4,6 +4,7 @@ local ns = api.nvim_create_namespace('IndentLine')
44local ffi , treesitter = require (' ffi' ), vim .treesitter
55local opt = {
66 only_current = false ,
7+ exclude = { ' dashboard' , ' lazy' , ' help' , ' nofile' , ' terminal' , ' prompt' },
78 config = {
89 virt_text_pos = ' overlay' ,
910 hl_mode = ' combine' ,
@@ -308,19 +309,16 @@ local function on_win(_, winid, bufnr, toprow, botrow)
308309 local pos = api .nvim_win_get_cursor (winid )
309310 context .currow = pos [1 ] - 1
310311 context .curcol = pos [2 ]
311- context .botrow = botrow
312312 local ok = pcall (treesitter .get_paser , bufnr )
313313 context .has_ts = ok
314- local currow_indent = find_in_snapshot (context .currow + 1 ).indent
315- find_current_range (currow_indent )
314+ find_current_range (find_in_snapshot (context .currow + 1 ).indent )
316315end
317316
318317return {
319318 setup = function (conf )
320319 conf = conf or {}
321320 opt .only_current = conf .only_current or false
322- opt .exclude = { ' dashboard' , ' lazy' , ' help' , ' nofile' , ' terminal' , ' prompt' }
323- vim .list_extend (opt .exclude , conf .exclude or {})
321+ opt .exclude = vim .list_extend (opt .exclude , conf .exclude or {})
324322 opt .config .virt_text = { { conf .char or ' │' } }
325323 opt .minlevel = conf .minlevel or 1
326324 set_provider (ns , { on_win = on_win , on_line = on_line })
0 commit comments