(By default, sg.nvim downloads released binaries from Github. If you prefer to build the plugin yourself, you'll need cargo to build) To be able to te

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-09-30 10:30:08

(By default, sg.nvim downloads released binaries from Github. If you prefer to build the plugin yourself, you'll need cargo to build)

To be able to test our changes we need to tell our favourite plugin manager to load the plugin locally rather than clone it from GitHub. Below is a snippet on how to do it with lazy.nvim

For ease for development it can be useful to automatically switch to loading the plugin from this repository if we enter this directory. We can do this by doing the following:

With the above changes, as soon as we enter this repository directory direnv will run .envrc which exports our SG_NVIM_DEV variable. Once we open Neovim and our plugins are loaded our load_sg function will get executed and see the SG_NVIM_DEV varialbe in the environment and rather load the sg.nvim plugin from the current working directory!

Leave a Comment