feat nvim gui: add glrnvim

This commit is contained in:
Yuan Chiu 2025-05-30 21:53:45 +08:00
parent ddc470988a
commit 77540d4eb5
Signed by: yuan
GPG Key ID: 50FBE4156404B98D
4 changed files with 61 additions and 5 deletions

View File

@ -167,7 +167,7 @@ pacman_nogui = [
]
pacman_gui = [
'gvim',
'neovide',
'foot',
]
aur = [
@ -175,6 +175,7 @@ aur = [
]
aur_gui = [
'glrnvim',
'alacritty-sixel-git',
'winscp',
]

View File

@ -0,0 +1,50 @@
# vim:fileencoding=utf-8:ft=yaml
# Choose the backend terminal to run neovim in.
# Current supported terminals: alacritty, urxvt, kitty, wezterm, foot.
# backend: urxvt
# backend: alacritty
# Path to backend executable file
# NOTE: requires a backend key
# NOTE: old key exe_path is now deprecated but can still be used
#term_exe_path: /path/to/urxvt
# Specify the Neovim executable path.
# NOTE: nvim will be used if not specified
# NOTE: For windows, e.g.: C:\tools\neovim\Neovim\bin\nvim.exe
#nvim_exe_path: /path/to/nvim
# The fonts to be used. Multi fonts can be supplied.
# The first one will be set as the major font. Others will be set as
# fallback fonts according to the given orders if possible.
# NOTE: Not all backends support fallback font.
fonts:
- MesloLGS NF
- Source Code Pro
- monofur
# The font size to be used.
#
font_size: 10
# Set to true if the terminal's default configuration should be loaded
# first. Other glrnvim configurations will overwrite the terminal settings
# if they are set in config.yml.
# urxvt is not impacted by this setting. It always load resources according
# to the defined orders.
#load_term_conf: false
# Configuration file for the selected terminal.
# NOTE:This option is not supported by urxvt.
# If this option is specified, the terminal's default config won't be loaded
# when 'load_term_conf' is true.
#term_config_path: /path/to/config.toml
# Set to true to redirect the backend terminal error output to null device.
# Avoid annoying harmless terminal error logs being printed all the time.
#omit_term_stderr: false
backend: foot
load_term_conf: true
term_config_path: {{ joinPath .chezmoi.homeDir ".config/glrnvim/foot.ini" }}

View File

@ -0,0 +1,3 @@
[main]
font=MesloLGS NF:size=10, Noto Color Emoji:size=10,Source Code Pro:size=10,monofur:size=10,
initial-window-size-chars=220x60

View File

@ -507,10 +507,12 @@ return {
-- 自動命令:啟動時自動顯示 Neo-tree
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
if vim.fn.winheight(0) > 20 and vim.fn.winwidth(0) > 140 then
vim.cmd("Neotree show")
vim.cmd("Neotree reveal")
end
vim.defer_fn(function()
if vim.fn.winheight(0) > 20 and vim.fn.winwidth(0) > 140 then
vim.cmd("Neotree show")
vim.cmd("Neotree reveal")
end
end, 0)
end,
})