refactor(presets): replace xdg-open with vim.ui.open
Problem: all presets hardcoded `open = { 'xdg-open' }`, making them
Linux-only. The compiler already handles `open = true` via
`vim.ui.open()`, which is cross-platform.
Solution: change all four presets to `open = true`.
This commit is contained in:
parent
0b16ff7178
commit
edfe3b6117
2 changed files with 8 additions and 8 deletions
|
|
@ -10,7 +10,7 @@ M.typst = {
|
|||
output = function(ctx)
|
||||
return (ctx.file:gsub('%.typ$', '.pdf'))
|
||||
end,
|
||||
open = { 'xdg-open' },
|
||||
open = true,
|
||||
}
|
||||
|
||||
---@type preview.ProviderConfig
|
||||
|
|
@ -26,7 +26,7 @@ M.latex = {
|
|||
clean = function(ctx)
|
||||
return { 'latexmk', '-c', ctx.file }
|
||||
end,
|
||||
open = { 'xdg-open' },
|
||||
open = true,
|
||||
}
|
||||
|
||||
---@type preview.ProviderConfig
|
||||
|
|
@ -43,7 +43,7 @@ M.markdown = {
|
|||
clean = function(ctx)
|
||||
return { 'rm', '-f', (ctx.file:gsub('%.md$', '.html')) }
|
||||
end,
|
||||
open = { 'xdg-open' },
|
||||
open = true,
|
||||
}
|
||||
|
||||
---@type preview.ProviderConfig
|
||||
|
|
@ -70,7 +70,7 @@ M.github = {
|
|||
clean = function(ctx)
|
||||
return { 'rm', '-f', (ctx.file:gsub('%.md$', '.html')) }
|
||||
end,
|
||||
open = { 'xdg-open' },
|
||||
open = true,
|
||||
}
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue