Skip to content

Commit

Permalink
fix: utilize ts-context in glance preview window (#1265)
Browse files Browse the repository at this point in the history
* set ts-context floatterm zindex to 50 which greater than 45.

default zindex of glance [dnlhc/glance.nvim] floatterm is 45.
It can display on glance.

Signed-off-by: mjkx <[email protected]>

* set trim_scope to inner

Signed-off-by: mjkx <[email protected]>

* perf: add discription

---------

Signed-off-by: mjkx <[email protected]>
Co-authored-by: CharlesChiuGit <[email protected]>
  • Loading branch information
mvmx3 and CharlesChiuGit authored Jun 2, 2024
1 parent 04543b5 commit a7c136a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/modules/configs/editor/ts-context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ return function()
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
line_numbers = true,
multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
trim_scope = "inner", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
zindex = 30,
-- HACK: to make use of `ts-context` in `glance`, set zindex to 50.(glance zindex is 45)
zindex = 50,
})
end

0 comments on commit a7c136a

Please sign in to comment.