Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for setting markmap_cmd in the config opts #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions lua/markmap/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ M.set = function(opts)
M.html_output = opts.html_output or nil
M.hide_toolbar = opts.hide_toolbar or false
M.grace_period = opts.grace_period or 3600000 -- 60min
M.markmap_cmd = opts.markmap_cmd or nil

-- Set defaults: M.html_output
if M.html_output == nil then
Expand All @@ -31,10 +32,12 @@ M.set = function(opts)
end

-- Set defaults: M.markmap_cmd
if is_windows then
M.markmap_cmd = "markmap.cmd" -- windows requires this special command.
else
M.markmap_cmd = "markmap"
if M.markmap_cmd == nil then
if is_windows then
M.markmap_cmd = "markmap.cmd" -- windows requires this special command.
else
M.markmap_cmd = "markmap"
end
end

-- Expose config globally
Expand Down