fix: guard macOS-only configs behind has('mac') check
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
-- This ftplugin is currently configured for macOS (Homebrew + Apple Silicon).
|
||||||
|
-- Skip on Linux until Linux paths are configured.
|
||||||
|
if vim.fn.has("mac") ~= 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local home = os.getenv("HOME")
|
local home = os.getenv("HOME")
|
||||||
local workspace_path = home .. "/.local/share/nvim/jdtls-workspace/"
|
local workspace_path = home .. "/.local/share/nvim/jdtls-workspace/"
|
||||||
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
|
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
|
||||||
|
|||||||
@@ -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")
|
g.python3_host_prog = fn.expand("~/.local/pipx/venvs/pynvim/bin/python")
|
||||||
|
|
||||||
-- Clipboard provider optimization (macOS)
|
-- Clipboard provider optimization (macOS only)
|
||||||
g.clipboard = {
|
if vim.fn.has("mac") == 1 then
|
||||||
name = "macOS-clipboard",
|
g.clipboard = {
|
||||||
copy = {
|
name = "macOS-clipboard",
|
||||||
["+"] = "pbcopy",
|
copy = {
|
||||||
["*"] = "pbcopy",
|
["+"] = "pbcopy",
|
||||||
},
|
["*"] = "pbcopy",
|
||||||
paste = {
|
},
|
||||||
["+"] = "pbpaste",
|
paste = {
|
||||||
["*"] = "pbpaste",
|
["+"] = "pbpaste",
|
||||||
},
|
["*"] = "pbpaste",
|
||||||
}
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
-- Lua specific settings
|
-- Lua specific settings
|
||||||
opt.runtimepath:append(vim.fn.stdpath("config") .. "/lua")
|
opt.runtimepath:append(vim.fn.stdpath("config") .. "/lua")
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ return {
|
|||||||
"lervag/vimtex",
|
"lervag/vimtex",
|
||||||
ft = { "tex", "latex", "bib" },
|
ft = { "tex", "latex", "bib" },
|
||||||
config = function()
|
config = function()
|
||||||
-- Use Skim on macOS (or change to your preferred PDF viewer)
|
-- PDF viewer: Skim on macOS, zathura elsewhere
|
||||||
vim.g.vimtex_view_method = "skim"
|
if vim.fn.has("mac") == 1 then
|
||||||
|
vim.g.vimtex_view_method = "skim"
|
||||||
-- Alternatively, use the general viewer (Preview.app)
|
else
|
||||||
-- vim.g.vimtex_view_method = "general"
|
vim.g.vimtex_view_method = "zathura"
|
||||||
-- vim.g.vimtex_view_general_viewer = "open"
|
end
|
||||||
|
|
||||||
-- Compiler settings
|
-- Compiler settings
|
||||||
vim.g.vimtex_compiler_method = "latexmk"
|
vim.g.vimtex_compiler_method = "latexmk"
|
||||||
|
|||||||
Reference in New Issue
Block a user