nvim-config/init.lua
2025-02-08 10:30:59 +08:00

37 lines
1011 B
Lua

-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
-- Check if Alacritty is available
local alacritty_exists = vim.fn.executable("alacritty") == 1
-- Set the terminal emulator dynamically
if alacritty_exists then
vim.g.terminal_command = "alacritty"
else
-- Fallback to xterm if Alacritty is not available
vim.g.terminal_command = "xterm"
end
-- 确保支持 termguicolors
if vim.fn.has("termguicolors") == 1 then
vim.opt.termguicolors = true
end
-- vim.cmd([[colorscheme tokyonight-day]])
-- 设置透明背景
vim.cmd.highlight({ "Normal", "guibg=NONE" })
vim.cmd.highlight({ "Normal", "ctermbg=NONE" })
-- -- 你可能还需要设置其他需要透明的元素
-- vim.cmd [[
-- highlight NonText ctermbg=NONE guibg=NONE
-- highlight LineNr ctermbg=NONE guibg=NONE
-- highlight Folded ctermbg=NONE guibg=NONE
-- highlight EndOfBuffer ctermbg=NONE guibg=NONE
-- ]]
require("luasnip.loaders.from_vscode").lazy_load({
paths = { "/home/sangge/.config/nvim/snippets" },
})