mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-08-16 02:45:09 +00:00
feat(marks): add support for displaying marks according to the mark_type (#2775)
* Fixes: #2763 * clean up docs type annotations --------- Co-authored-by: LUCIANO FURTADO <l.furtado@f5.com> Co-authored-by: James Trew <j.trew10@gmail.com>
This commit is contained in:
co-authored by
LUCIANO FURTADO
James Trew
parent
20bf20500c
commit
4e77d1991d
@@ -1074,7 +1074,17 @@ internal.marks = function(opts)
|
||||
local marks_table = {}
|
||||
local marks_others = {}
|
||||
local bufname = vim.api.nvim_buf_get_name(opts.bufnr)
|
||||
for _, cnf in ipairs { local_marks, global_marks } do
|
||||
local all_marks = {}
|
||||
opts.mark_type = vim.F.if_nil(opts.mark_type, "all")
|
||||
if opts.mark_type == "all" then
|
||||
all_marks = { local_marks, global_marks }
|
||||
elseif opts.mark_type == "local" then
|
||||
all_marks = { local_marks }
|
||||
elseif opts.mark_type == "global" then
|
||||
all_marks = { global_marks }
|
||||
end
|
||||
|
||||
for _, cnf in ipairs(all_marks) do
|
||||
for _, v in ipairs(cnf.items) do
|
||||
-- strip the first single quote character
|
||||
local mark = string.sub(v.mark, 2, 3)
|
||||
|
||||
Reference in New Issue
Block a user