Contribute

NvChad install for contributors

If you wish to contribute to NvChad, you should:

  1. Create a fork on GitHub
  2. Clone your fork to your machine
  • For ssh:

    1. $ git clone git@github.com:<YOUR GITHUB USERNAME>/NvChad.git ~/.config/nvim
  • For https:

    1. $ git clone https://github.com/<YOUR GITHUB USERNAME>/NvChad.git ~/.config/nvim
  1. Add a new remote repo to track

    • This means you can push/pull as normal to your own repo, but also easily track & update from the NvChad repo
    • For ssh:

      1. $ git remote add upstream git@github.com:NvChad/NvChad.git
    • For https:

      1. $ git remote add upstream https://github.com/NvChad/NvChad.git
  2. Any time you create a branch to do some work, use

    1. $ git fetch upstream && git checkout -b dev-myFEAT upstream/main
  3. Only use the --rebase flag to update your dev branch

    • This means that there are no Merge NvChad/main into devBranch commits, which are to be avoided
    1. $ git pull upstream --rebase

Things to know before contributing

  • When making a PR (pull request), please be very descriptive about what you’ve done!

  • We are open to all PRs, but may decline some for a myriad of reasons. Though don’t be discouraged! We’ll still be open to discussions.

  • PR’s are always welcomed however NvChad aims to be less bloated. So PR’s regarding existing plugin’s enhancement and creating new features with existing plugins itself (without adding a new plugin), bug fixes and corrections are more encouraged.

  • NvChad won’t keep adding more and more features (like adding new plugins) as requested if they feel unneeded and aren’t usable by the majority!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature’s PR is welcomed!

  • But adding specific features like adding config for wakatime etc will be added in this chad user configs. This lets the user select the things only they want (adding configs from extra configs).

Format your PR with stylua

How to remove or edit commits from your PR

You may have been directed here to remove a commit such as a merge commit: Merge NvChad/main into devBranch from your PR

As these commands edit your git history, you may need to force push with git push origin --force

  1. Run the following:

    1. $ git rebase -i HEAD~<NUMBER OF COMMITS TO GO BACK>

    Example

    1. $ git rebase -i HEAD~4
    1. pick 28b2dcb statusline add lsp status
    2. pick dad9a39 feat: Added lsp radial progress
    3. pick 68f72f1 add clickable btn for exiting nvim
    4. pick b281b53 avoid using q! for quitting vim
    5. # Rebase 52b655b..b281b53 onto 52b655b (4 commands)
    6. #
    7. # Commands:
    8. # p, pick <commit> = use commit
    9. # r, reword <commit> = use commit, but edit the commit message
    10. # e, edit <commit> = use commit, but stop for amending
    11. # s, squash <commit> = use commit, but meld into previous commit
    12. # f, fixup <commit> = like "squash", but discard this commit's log message
    13. # x, exec <command> = run command (the rest of the line) using shell
    14. # b, break = stop here (continue rebase later with 'git rebase --continue')
    15. # d, drop <commit> = remove commit
    16. # l, label <label> = label current HEAD with a name
    17. # t, reset <label> = reset HEAD to a label
    18. # m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
    19. # . create a merge commit using the original merge commit's
    20. # . message (or the oneline, if no original merge commit was
    21. # . specified). Use -c <commit> to reword the commit message.
    22. #
    23. # These lines can be re-ordered; they are executed from top to bottom.
    24. #
    25. # If you remove a line here THAT COMMIT WILL BE LOST.
    26. #
    27. # However, if you remove everything, the rebase will be aborted.
    28. #
    29. # Note that empty commits are commented out
  2. Change the pick commands to whatever you wish, you may wish to d drop or e edit a commit. Then save & quit this git file to run it.

    Example

    1. pick 28b2dcb statusline add lsp status
    2. pick dad9a39 feat: Added lsp radial progress
    3. edit 68f72f1 add clickable btn for exiting nvim
    4. d b281b53 avoid using q! for quitting vim
    5. # Rebase 52b655b..b281b53 onto 52b655b (4 commands)
    6. #
    7. # Commands:
    8. # p, pick <commit> = use commit
    9. # r, reword <commit> = use commit, but edit the commit message
    10. # e, edit <commit> = use commit, but stop for amending
    11. # s, squash <commit> = use commit, but meld into previous commit
    12. # f, fixup <commit> = like "squash", but discard this commit's log message
    13. # x, exec <command> = run command (the rest of the line) using shell
    14. # b, break = stop here (continue rebase later with 'git rebase --continue')
    15. # d, drop <commit> = remove commit
    16. # l, label <label> = label current HEAD with a name
    17. # t, reset <label> = reset HEAD to a label
    18. # m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
    19. # . create a merge commit using the original merge commit's
    20. # . message (or the oneline, if no original merge commit was
    21. # . specified). Use -c <commit> to reword the commit message.
    22. #
    23. # These lines can be re-ordered; they are executed from top to bottom.
    24. #
    25. # If you remove a line here THAT COMMIT WILL BE LOST.
    26. #
    27. # However, if you remove everything, the rebase will be aborted.
    28. #
    29. # Note that empty commits are commented out
  3. If you picked drop you are done, if you picked edit then edit your files, then run:

    1. $ git add <files>
  4. Once you have edited & added your files, run:

    1. $ git rebase --continue
  5. You will likely need to push using:

    1. $ git push origin --force