Reviewed-on: #248 Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com> Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
30 lines
1.3 KiB
Makefile
30 lines
1.3 KiB
Makefile
root_dir := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
|
neovim_patch_file := $(root_dir)/patch/kickstart.nvim/updates.patch
|
|
neovim_config_dir := $(XDG_CONFIG_HOME)/nvim
|
|
|
|
.DEFAULT_GOAL = help
|
|
|
|
.PHONY: apply_patch_init_lua
|
|
apply_patch_init_lua: ## apply the patch file in kickstart's init.lua file
|
|
@cd $(neovim_config_dir) && git apply $(neovim_patch_file)
|
|
|
|
.PHONY: patch_init_lua
|
|
patch_init_lua: ## create a patch file with the changes made in kickstart's init.lua file
|
|
@cd $(neovim_config_dir) && git diff --patch init.lua > $(neovim_patch_file)
|
|
|
|
.PHONY: patch_init_lua_dry_run
|
|
patch_init_lua_dry_run: ## show the changes made in kickstart's init.lua file
|
|
@cd $(neovim_config_dir) && git diff --patch init.lua
|
|
|
|
.PHONY: diff_mise_config
|
|
diff_mise_config: ## compare host's mise config with repository's config
|
|
@nvim -d ~/.config/mise/config.toml ./config/mise/config.toml
|
|
|
|
.PHONY: diff_custom_neovim_config
|
|
diff_custom_neovim_config: ## compare host's custom neovim config with repository's config
|
|
@nvim -d ~/.config/nvim/lua/custom/plugins/init.lua ./config/nvim/lua/custom/plugins/init.lua
|
|
|
|
.PHONY: help
|
|
help: ## show help message
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|