mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
fix: do not show tags in template (closes 133)
This commit is contained in:
@@ -2132,10 +2132,14 @@ local function FollowLink(opts)
|
||||
|
||||
-- first: check if we're in a tag or a link
|
||||
local kind, atcol, tag
|
||||
local globArg = ""
|
||||
|
||||
if opts.follow_tag ~= nil then
|
||||
kind = "tag"
|
||||
tag = opts.follow_tag
|
||||
if opts.templateDir ~= nil then
|
||||
globArg = "--glob=!" .. "**/" .. opts.templateDir .. "/*.md"
|
||||
end
|
||||
else
|
||||
kind, atcol = check_for_link_or_tag()
|
||||
end
|
||||
@@ -2498,6 +2502,7 @@ local function FollowLink(opts)
|
||||
search_command = {
|
||||
"rg",
|
||||
"--vimgrep",
|
||||
globArg,
|
||||
"-e",
|
||||
prompt,
|
||||
"--",
|
||||
@@ -2720,7 +2725,8 @@ local function FindAllTags(opts)
|
||||
local i = opts.i
|
||||
opts.cwd = M.Cfg.home
|
||||
opts.tag_notation = M.Cfg.tag_notation
|
||||
opts.templateDir = Path:new(M.Cfg.templates):make_relative(M.Cfg.home)
|
||||
local templateDir = Path:new(M.Cfg.templates):make_relative(M.Cfg.home)
|
||||
opts.templateDir = templateDir
|
||||
|
||||
if not global_dir_check() then
|
||||
return
|
||||
@@ -2787,6 +2793,7 @@ local function FindAllTags(opts)
|
||||
local follow_opts = {
|
||||
follow_tag = selection,
|
||||
show_link_counts = true,
|
||||
templateDir = templateDir,
|
||||
}
|
||||
actions._close(prompt_bufnr, false)
|
||||
vim.schedule(function()
|
||||
|
||||
Reference in New Issue
Block a user