File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ local OPTION_DEFAULTS = {
25
25
" typst" , -- Supported from NeoVim 0.10+
26
26
},
27
27
auto_set_mode_filetype_denylist = {},
28
+ buftype_allowlist = {},
28
29
excluded_treesitter_queries = {
29
30
markdown = {
30
31
" (fenced_code_block) @markdown1" ,
249
250
M .set_mode_heuristically = function ()
250
251
local buftype = vim .api .nvim_get_option_value (" buftype" , { buf = 0 })
251
252
252
- if buftype ~= " " then
253
+ if
254
+ buftype ~= " " and not vim .tbl_contains (opts .buftype_allowlist , buftype )
255
+ then
253
256
log (" Buftype is " .. buftype .. " , ignoring" )
254
257
return
255
258
end
@@ -360,6 +363,7 @@ M.setup = function(o)
360
363
opts .auto_set_mode_filetype_denylist ,
361
364
" table" ,
362
365
},
366
+ buftype_allowlist = { opts .buftype_allowlist , " table" },
363
367
notify_on_switch = { opts .notify_on_switch , " boolean" },
364
368
log_path = { opts .log_path , " string" },
365
369
})
You can’t perform that action at this time.
0 commit comments