diff --git a/.chezmoidata/packages.toml b/.chezmoidata/packages.toml index 336d071..6d8e85d 100644 --- a/.chezmoidata/packages.toml +++ b/.chezmoidata/packages.toml @@ -167,7 +167,7 @@ pacman_nogui = [ ] pacman_gui = [ 'gvim', - 'neovide', + 'foot', ] aur = [ @@ -175,6 +175,7 @@ aur = [ ] aur_gui = [ + 'glrnvim', 'alacritty-sixel-git', 'winscp', ] diff --git a/dot_config/glrnvim/config.yml.tmpl b/dot_config/glrnvim/config.yml.tmpl new file mode 100644 index 0000000..3dc158a --- /dev/null +++ b/dot_config/glrnvim/config.yml.tmpl @@ -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" }} diff --git a/dot_config/glrnvim/foot.ini b/dot_config/glrnvim/foot.ini new file mode 100644 index 0000000..b6550f5 --- /dev/null +++ b/dot_config/glrnvim/foot.ini @@ -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 diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_components/neo-tree.lua b/dot_config/nvim/exact_lua/exact_plugins/exact_components/neo-tree.lua index 2461f2d..c7c66fb 100644 --- a/dot_config/nvim/exact_lua/exact_plugins/exact_components/neo-tree.lua +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_components/neo-tree.lua @@ -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, })