This repo is used to store all my dotfiles (most of, at least) for open source softwares e.g. Bash, Zsh, Neovim etc.
It includes the following configs for now:
- Zsh:
.zshrc - Neovim:
nvim/ - fontconfig:
cjk-fallback.conf
More configs will be added to this repo in future.
Here shows their functions and the way to have them worked on your machine.
This .zshrc file enables:
-
Git Info Displays. It displays:
- Username, current working directory, and Git branch/status in the prompt.
-
Manual Plugin Control. The following extensions are installed:
- zsh-autosuggestions
- zsh-syntax-highlighting
-
Command Completion. It supports basic smart completion with case-insensitive matching.
-
Command Correction. It supports basic automatic suggestion for mistyped commands.
-
Various System Variables. It has set variables for:
- CUDA
- Ruby's
GEM_HOME - Miniforge (use
conda-initto enable in shell)
To use this, make sure you've installed zsh on your system.
Arch Linux:
sudo pacman -Syu
sudo pacman -S zshDebian / Ubuntu:
sudo apt update && sudo apt upgrade
sudo apt install zshThen, you need to clone specific extensions from GitHub into directory ~/.zsh-plugins to let the config work.
To clone them, use the following commands:
mkdir -p ~/.zsh-plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh-plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh-plugins/zsh-syntax-highlightingAnd, you need to clone this repo and link the .zshrc inside with ~/.zshrc:
git clone https://github.com/xin1z/dotfiles.git ~/dotfiles
ln -s ~/dotfiles/dotfiles/.zshrc ~/.zshrcThen, reload Zsh with:
source ~/.zshrcThen, everything should work just fine.
This Neovim config uses packer.nvim to manage plugins.
WHY PACKER.NVIM?
Because it's more predictable, sustainable, maintainable than lazy.nvim and packer.nvim's so-called 'successor'—pckr.nvim. I hate such 'smart' lazy loading features because it adds unnecessary complexity. packer.nvim gives its users full control to how plugins are loaded, and such predictability is what I like the most.
The following packages are installed and configured:
-
Packer.nvim Itself. Plugin manager.
-
nvim-lspconfig. LSP Server plugin.
-
none-ls.nvim. A formatter.
-
Treesitter. A Syntax-Highlighting extension.
-
nvim-tree. A file-tree extension.
-
Catppuccin. A Theme.
-
hrsh7th/nvim-cmp etc.. A bunch of packages for code completion.
-
LuaSnip. Snippet.
Features: This config enables automatic Conda environment ditection, Python codes will automatically use the Python in the current Conda environment (if activated).
It supports syntax highlighting and basic code completion. It's pretty usable for now, and more features will be added.
To use this, make sure you've installed neovim on your system.
Arch Linux:
sudo pacman -Syu
sudo pacman -S neovimDebian / Ubuntu:
sudo apt update && sudo apt upgrade
sudo apt install neovimSince the plugins are managed by packer.nvim, you need to clone it with git:
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvimThen, this repository should be cloned and the nvim/ folder should be linked:
git clone https://github.com/xin1z/dotfiles.git ~/dotfiles
ln -sf ~/dotfiles/dotfiles/nvim/ ~/.config/nvim/Then, start Neovim with nvim in terminal, run :PackerSync in command mode, and everything should work just fine.
This config file matches characters by langauges (mostly CJK) to make them displayed correctly.
It only matches:
zh_CNzh_SGzh_HKzh_TWja_JP
to their Noto Sans fonts for now (because I only need proper CJK character display besides latin alphabets).
It has included Symbols Nerd Font for better nerd font display as well, so make sure you've installed it.
Link this config file to your fontconfig folder, then refresh caches with fc-cache -fv, and everything should work just fine.