From 3022dfe4afe5e03598e09197c39036e8b82582ff Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Mon, 28 Apr 2025 21:01:03 +0800 Subject: [PATCH] style Trailing whitespace line endings or no final newline --- .chezmoidata/packages.toml | 2 +- .chezmoiignore | 2 +- .chezmoiscripts/run_once_after_apply.sh.tmpl | 2 +- .../run_onchange_after_install.sh.tmpl | 2 +- ...nge_before_darwin-install-packages.sh.tmpl | 2 +- ...ange_before_linux-install-packages.sh.tmpl | 4 +- .editorconfig | 10 ++ .gitignore | 2 +- Readme.md | 4 +- dot_config/nvim/Readme.md | 8 +- dot_config/nvim/init.vim | 2 +- dot_config/nvim/lua/plugins/nightfox.lua | 2 +- dot_config/zellij/config.kdl | 118 +++++++++--------- dot_gvimrc | 2 +- dot_p10k.zsh | 4 +- dot_zshrc | 6 +- 16 files changed, 91 insertions(+), 81 deletions(-) diff --git a/.chezmoidata/packages.toml b/.chezmoidata/packages.toml index bb583db..e5b768f 100644 --- a/.chezmoidata/packages.toml +++ b/.chezmoidata/packages.toml @@ -53,4 +53,4 @@ pacman = [ aur = [ 'alacritty-sixel-git', 'winscp', -] \ No newline at end of file +] diff --git a/.chezmoiignore b/.chezmoiignore index 31ba6c1..6989dd1 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -18,4 +18,4 @@ dconf.ini *.ps1 {{ else }} *.sh -{{ end }} \ No newline at end of file +{{ end }} diff --git a/.chezmoiscripts/run_once_after_apply.sh.tmpl b/.chezmoiscripts/run_once_after_apply.sh.tmpl index 9ff138b..d2d32c2 100644 --- a/.chezmoiscripts/run_once_after_apply.sh.tmpl +++ b/.chezmoiscripts/run_once_after_apply.sh.tmpl @@ -3,4 +3,4 @@ {{ if eq .chezmoi.os "darwin" -}} defaults write com.googlecode.iterm2 PrefsCustomFolder -string "~/.config/iterm2" defaults write com.googlecode.iterm2 LoadPrefsFromCustomFolder -bool true -{{ end -}} \ No newline at end of file +{{ end -}} diff --git a/.chezmoiscripts/run_onchange_after_install.sh.tmpl b/.chezmoiscripts/run_onchange_after_install.sh.tmpl index f2deab4..83ce3da 100644 --- a/.chezmoiscripts/run_onchange_after_install.sh.tmpl +++ b/.chezmoiscripts/run_onchange_after_install.sh.tmpl @@ -18,4 +18,4 @@ mkdir -p ~/.winscp/drive_c/users/{{ .chezmoi.username }}/AppData/Roaming/FileZil ln -s ~/.config/filezilla/sitemanager.xml ~/.winscp/drive_c/users/{{ .chezmoi.username }}/AppData/Roaming/FileZilla/sitemanager.xml {{ end }} {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/.chezmoiscripts/run_onchange_before_darwin-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_before_darwin-install-packages.sh.tmpl index 1e53bde..4a3dff6 100644 --- a/.chezmoiscripts/run_onchange_before_darwin-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_before_darwin-install-packages.sh.tmpl @@ -13,4 +13,4 @@ brew {{ . | quote }} cask {{ . | quote }} {{ end -}} EOF -{{ end -}} \ No newline at end of file +{{ end -}} diff --git a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl index 04c8f75..bdc0339 100644 --- a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl @@ -16,7 +16,7 @@ wait_for_pacman_unlock() { if ! pgrep -x pacman >/dev/null && \ ! pgrep -x packagekitd >/dev/null && \ ! pgrep -x packagekit >/dev/null; then - + echo "🔍 找不到 pacman 或 PackageKit,疑似殘留鎖檔。" if [ "$WAITED" -ge "$MAX_IDLE" ]; then @@ -94,4 +94,4 @@ fi {{ end -}} -{{ end -}} \ No newline at end of file +{{ end -}} diff --git a/.editorconfig b/.editorconfig index faf3f33..8d7b5a0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,16 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true +# 排除特定檔案類型的規則 +[*.code-workspace] +# 不套用任何規則,覆蓋全域設定 +indent_size = unset +indent_style = unset +charset = unset +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset + [*.ps1] charset = utf-8 end_of_line = crlf diff --git a/.gitignore b/.gitignore index a087852..345f39c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -bin/chezmoi \ No newline at end of file +bin/chezmoi diff --git a/Readme.md b/Readme.md index 2870cc1..756a593 100644 --- a/Readme.md +++ b/Readme.md @@ -61,7 +61,7 @@ rm -rf ~/.local/share/chezmoi-private rm ~/.ssh/known_hosts rm -rf ~/.vimrc ~/.vim ~/.gvimrc rm ~/.zshrc -rm -rf ~/.config/alacritty ~/.config/zellij +rm -rf ~/.config/alacritty ~/.config/zellij ```
@@ -223,4 +223,4 @@ EOT 工具官網 * * -* \ No newline at end of file +* diff --git a/dot_config/nvim/Readme.md b/dot_config/nvim/Readme.md index b455310..52c1f43 100644 --- a/dot_config/nvim/Readme.md +++ b/dot_config/nvim/Readme.md @@ -9,15 +9,15 @@ dot_config/nvim ├── lua │ ├── init.lua #主要設定進入點 新式給nvim專用設定 │ ├── config -│ │ ├── gui.lua +│ │ ├── gui.lua │ │ ├── lazy.lua │ │ └── options.lua │ └── plugins │ └── example.lua #LazyNvim給的範例,已經被第一段截斷掉,所以此腳本將不會執行 └── Readme.md - ``` +``` - ## 代找外掛 +## 代找外掛 * Align - * \ No newline at end of file + * diff --git a/dot_config/nvim/init.vim b/dot_config/nvim/init.vim index f161c60..94cfd85 100644 --- a/dot_config/nvim/init.vim +++ b/dot_config/nvim/init.vim @@ -1 +1 @@ - lua require('init') +lua require('init') diff --git a/dot_config/nvim/lua/plugins/nightfox.lua b/dot_config/nvim/lua/plugins/nightfox.lua index 0344c85..a178aff 100644 --- a/dot_config/nvim/lua/plugins/nightfox.lua +++ b/dot_config/nvim/lua/plugins/nightfox.lua @@ -17,4 +17,4 @@ return { vim.cmd("colorscheme nordfox") end, }, -} \ No newline at end of file +} diff --git a/dot_config/zellij/config.kdl b/dot_config/zellij/config.kdl index fc773f3..ba14d25 100644 --- a/dot_config/zellij/config.kdl +++ b/dot_config/zellij/config.kdl @@ -272,90 +272,90 @@ plugins { // eg. "https://example.com/my-plugin.wasm" load_plugins { } - + // Use a simplified UI without special fonts (arrow glyphs) // Options: // - true // - false (Default) -// +// // simplified_ui true - + // Choose the theme that is specified in the themes section. // Default: default -// +// theme "nord" - + // Choose the base input mode of zellij. // Default: normal -// +// default_mode "normal" - + // Choose the path to the default shell that zellij will use for opening new panes // Default: $SHELL -// +// // default_shell "fish" - + // Choose the path to override cwd that zellij will use for opening new panes -// +// // default_cwd "/tmp" - + // The name of the default layout to load on startup // Default: "default" -// +// // default_layout "compact" - + // The folder in which Zellij will look for layouts // (Requires restart) -// +// // layout_dir "/tmp" - + // The folder in which Zellij will look for themes // (Requires restart) -// +// // theme_dir "/tmp" - + // Toggle enabling the mouse mode. // On certain configurations, or terminals this could // potentially interfere with copying text. // Options: // - true (default) // - false -// +// // mouse_mode false - + // Toggle having pane frames around the panes // Options: // - true (default, enabled) // - false -// +// // pane_frames false - + // When attaching to an existing session with other users, // should the session be mirrored (true) // or should each user have their own cursor (false) // (Requires restart) // Default: false -// +// // mirror_session true - + // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP // eg. when terminal window with an active zellij session is closed // (Requires restart) // Options: // - detach (Default) // - quit -// +// // on_force_close "quit" - + // Configure the scroll back buffer size // This is the number of lines zellij stores for each pane in the scroll back // buffer. Excess number of lines are discarded in a FIFO fashion. // (Requires restart) // Valid values: positive integers // Default value: 10000 -// +// // scroll_buffer_size 10000 - + // Provide a command to execute when copying text. The text will be piped to // the stdin of the program to perform the copy. This can be used with // terminal emulators which do not support the OSC 52 ANSI control sequence @@ -365,102 +365,102 @@ default_mode "normal" // copy_command "xclip -selection clipboard" // x11 // copy_command "wl-copy" // wayland // copy_command "pbcopy" // osx -// +// // copy_command "pbcopy" - + // Choose the destination for copied text // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. // Does not apply when using copy_command. // Options: // - system (default) // - primary -// +// // copy_clipboard "primary" - + // Enable automatic copying (and clearing) of selection when releasing mouse // Default: true -// +// // copy_on_select true - + // Path to the default editor to use to edit pane scrollbuffer // Default: $EDITOR or $VISUAL // scrollback_editor "/usr/bin/vim" - + // A fixed name to always give the Zellij session. // Consider also setting `attach_to_session true,` // otherwise this will error if such a session exists. // Default: -// +// // session_name "My singleton session" - + // When `session_name` is provided, attaches to that session // if it is already running or creates it otherwise. // Default: false -// +// // attach_to_session true - + // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible // Options: // - true (default) // - false -// +// // auto_layout false - + // Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected // Options: // - true (default) // - false -// +// // session_serialization false - + // Whether pane viewports are serialized along with the session, default is false // Options: // - true // - false (default) -// +// // serialize_pane_viewport false - + // Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 // defaults to the scrollback size. If this number is higher than the scrollback size, it will // also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. -// +// // scrollback_lines_to_serialize 10000 - + // Enable or disable the rendering of styled and colored underlines (undercurl). // May need to be disabled for certain unsupported terminals // (Requires restart) // Default: true -// +// // styled_underlines false - + // How often in seconds sessions are serialized -// +// // serialization_interval 10000 - + // Enable or disable writing of session metadata to disk (if disabled, other sessions might not know // metadata info on this session) // (Requires restart) // Default: false -// +// // disable_session_metadata false - + // Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it) // (Requires restart) // Default: true (if the host terminal supports it) -// +// // support_kitty_keyboard_protocol false - + // Whether to stack panes when resizing beyond a certain size // Default: true -// +// // stacked_resize false - + // Whether to show tips on startup // Default: true -// +// // show_startup_tips false - + // Whether to show release notes on first version run // Default: true -// +// // show_release_notes false diff --git a/dot_gvimrc b/dot_gvimrc index cd370cc..80092a4 100644 --- a/dot_gvimrc +++ b/dot_gvimrc @@ -9,4 +9,4 @@ let g:ranger_terminal = 'kitty -e' " 調整固定視窗大小 set lines=46 -set columns=170 \ No newline at end of file +set columns=170 diff --git a/dot_p10k.zsh b/dot_p10k.zsh index 1826184..80e3be1 100644 --- a/dot_p10k.zsh +++ b/dot_p10k.zsh @@ -756,14 +756,14 @@ typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### # Yazi shell color. typeset -g POWERLEVEL9K_YAZI_FOREGROUND=3 typeset -g POWERLEVEL9K_YAZI_BACKGROUND=0 # Custom icon. # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' - + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### # Nnn shell color. typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 diff --git a/dot_zshrc b/dot_zshrc index 0be7480..0559cf5 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -148,7 +148,7 @@ compdef floorp='firefox' if command -v xdg-open &> /dev/null; then bindkey -s '^[e' 'xdg-open "$PWD" 2> /dev/null\n' elif [ "$(uname -s)" = 'Darwin' ]; then - bindkey -s '^[e' 'open "$PWD" 2> /dev/null\n' + bindkey -s '^[e' 'open "$PWD" 2> /dev/null\n' fi # bindkey -s '^E' 'gnome-terminal --working-directory="$PWD" -- zsh\n' @@ -161,7 +161,7 @@ export PATH="$HOME/.local/share/gem/ruby/3.3.0/bin:$PATH" # Fix ython3 to python Path on macOS if [ "$(uname -s)" = 'Darwin' ]; then - export PATH=/usr/local/opt/python/libexec/bin:$PATH + export PATH=/usr/local/opt/python/libexec/bin:$PATH fi # Created by `pipx` on 2023-01-30 19:57:14 @@ -204,4 +204,4 @@ function git_pushmulti() { # 執行 git pushmulti noglob git pushmulti "$remotes" "$branches" -} \ No newline at end of file +}