nvchad/lua/plugins/obsidian.lua
Paul Trowbridge 01d6066949 Fix block anchor navigation failing in large KJV files
obsidian.nvim defaults search_max_lines to 1000, which meant block anchors
beyond line 1000 (e.g. Matthew 25:14 at line 1803) were never found and
the cursor landed at the top of the file instead of the verse.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 10:23:06 -04:00

33 lines
718 B
Lua

local home = os.getenv("HOME") or "~"
local function dir_exists(path)
return vim.fn.isdirectory(vim.fn.expand(path)) == 1
end
local all_workspaces = {
{ name = "journal", path = home .. "/journal" },
{ name = "work", path = home .. "/hc_notes" },
{ name = "SQL", path = "/mnt/c/Users/ptrowbridge/SQL" },
{ name = "pl", path = "/mnt/c/Users/ptrowbridge/plbuild" },
}
local workspaces = vim.tbl_filter(function(w)
return dir_exists(w.path)
end, all_workspaces)
return {
"epwalsh/obsidian.nvim",
version = "*",
lazy = true,
ft = "markdown",
cond = #workspaces > 0,
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {
workspaces = workspaces,
search_max_lines = 5000,
},
}