fix: guard macOS-only configs behind has('mac') check

This commit is contained in:
Carlos Gutierrez
2026-03-05 17:01:47 -05:00
parent 0f59a7b9d7
commit 017a82dc61
3 changed files with 26 additions and 18 deletions

View File

@@ -136,18 +136,20 @@ g.loaded_ruby_provider = 0 -- Disable Ruby provider (optional)
g.python3_host_prog = fn.expand("~/.local/pipx/venvs/pynvim/bin/python")
-- Clipboard provider optimization (macOS)
g.clipboard = {
name = "macOS-clipboard",
copy = {
["+"] = "pbcopy",
["*"] = "pbcopy",
},
paste = {
["+"] = "pbpaste",
["*"] = "pbpaste",
},
}
-- Clipboard provider optimization (macOS only)
if vim.fn.has("mac") == 1 then
g.clipboard = {
name = "macOS-clipboard",
copy = {
["+"] = "pbcopy",
["*"] = "pbcopy",
},
paste = {
["+"] = "pbpaste",
["*"] = "pbpaste",
},
}
end
-- Lua specific settings
opt.runtimepath:append(vim.fn.stdpath("config") .. "/lua")

View File

@@ -10,12 +10,12 @@ return {
"lervag/vimtex",
ft = { "tex", "latex", "bib" },
config = function()
-- Use Skim on macOS (or change to your preferred PDF viewer)
vim.g.vimtex_view_method = "skim"
-- Alternatively, use the general viewer (Preview.app)
-- vim.g.vimtex_view_method = "general"
-- vim.g.vimtex_view_general_viewer = "open"
-- PDF viewer: Skim on macOS, zathura elsewhere
if vim.fn.has("mac") == 1 then
vim.g.vimtex_view_method = "skim"
else
vim.g.vimtex_view_method = "zathura"
end
-- Compiler settings
vim.g.vimtex_compiler_method = "latexmk"