File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ local Effect = require("tiny-glimmer.animation.effect")
9
9
local hl_visual_bg = utils .int_to_hex (utils .get_highlight (" Visual" ).bg )
10
10
local hl_normal_bg = utils .int_to_hex (utils .get_highlight (" Normal" ).bg )
11
11
12
- local hijack_done = false
12
+ M . hijack_done = false
13
13
14
14
local animation_group = require (" tiny-glimmer.namespace" ).tiny_glimmer_animation_group
15
15
@@ -175,6 +175,10 @@ M.config = {
175
175
virt_text = {
176
176
priority = 2048 ,
177
177
},
178
+ hijack_ft_disabled = {
179
+ " alpha" ,
180
+ " snacks_dashboard" ,
181
+ },
178
182
}
179
183
180
184
-- Helper Functions
@@ -358,7 +362,23 @@ function M.setup(options)
358
362
359
363
AnimationFactory .initialize (M .config , effects_pool , M .config .refresh_interval_ms )
360
364
361
- setup_hijacks ()
365
+ vim .defer_fn (function ()
366
+ if vim .tbl_contains (M .config .hijack_ft_disabled , vim .bo .filetype ) then
367
+ vim .api .nvim_create_autocmd ({ " BufEnter" }, {
368
+ group = animation_group ,
369
+ callback = function ()
370
+ if M .hijack_done then
371
+ return
372
+ end
373
+ setup_hijacks ()
374
+ M .hijack_done = true
375
+ end ,
376
+ })
377
+ return
378
+ end
379
+
380
+ setup_hijacks ()
381
+ end , 100 )
362
382
363
383
vim .api .nvim_create_autocmd ({ " BufEnter" , " BufLeave" }, {
364
384
group = animation_group ,
You can’t perform that action at this time.
0 commit comments