mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-26 22:10:26 +00:00
fix: accelerating dotfiles debugging
This commit is contained in:
parent
120c04a849
commit
ab8840055f
2 changed files with 8 additions and 10 deletions
|
@ -11,17 +11,16 @@ For instance, I've added the following content to my Justfile:
|
|||
> The latest Justfile I'm using: [ryan4yin/nix-config/Justfile](https://github.com/ryan4yin/nix-config/blob/main/Justfile)
|
||||
|
||||
```Makefile
|
||||
|
||||
###############################################################
|
||||
# Quick Test - Neovim
|
||||
###############################################################
|
||||
|
||||
nvim-test:
|
||||
rm -rf $"($env.HOME)/.config/astronvim/lua/user"
|
||||
rsync -avz --copy-links --chmod=D2755,F744 home/base/desktop/editors/neovim/astronvim_user/ $"($env.HOME)/.config/astronvim/lua/user"
|
||||
|
||||
nvim-clean:
|
||||
rm -rf $"($env.HOME)/.config/astronvim/lua/user"
|
||||
rm -rf ${HOME}.config/astronvim/lua/user
|
||||
|
||||
nvim-test: nvim-clean
|
||||
rsync -avz --copy-links --chmod=D2755,F744 home/base/desktop/editors/neovim/astronvim_user/ ${HOME}/.config/astronvim/lua/user
|
||||
```
|
||||
|
||||
Now, when I need to quickly test my Neovim configuration after making changes, I simply run `just nvim-test`. Once testing is complete, I execute `just nvim-clean`, followed by redeploying the configuration using `nixos-rebuild`. This allows for swift testing and seamless restoration of the configuration.
|
||||
|
|
|
@ -11,17 +11,16 @@
|
|||
> 我使用的 Justfile 最新版: [ryan4yin/nix-config/Justfile](https://github.com/ryan4yin/nix-config/blob/main/Justfile)
|
||||
|
||||
```Makefile
|
||||
|
||||
###############################################################
|
||||
# Quick Test - Neovim
|
||||
###############################################################
|
||||
|
||||
nvim-test:
|
||||
rm -rf $"($env.HOME)/.config/astronvim/lua/user"
|
||||
rsync -avz --copy-links --chmod=D2755,F744 home/base/desktop/editors/neovim/astronvim_user/ $"($env.HOME)/.config/astronvim/lua/user"
|
||||
|
||||
nvim-clean:
|
||||
rm -rf $"($env.HOME)/.config/astronvim/lua/user"
|
||||
rm -rf ${HOME}.config/astronvim/lua/user
|
||||
|
||||
nvim-test: nvim-clean
|
||||
rsync -avz --copy-links --chmod=D2755,F744 home/base/desktop/editors/neovim/astronvim_user/ ${HOME}/.config/astronvim/lua/user
|
||||
```
|
||||
|
||||
然后在需要快速测试 Neovim 配置时,每次修改完配置后,跑一下 `just nvim-test`,我的配置就更新了。
|
||||
|
|
Loading…
Reference in a new issue