ldelossa / nvim-ide

A full featured IDE layer for Neovim. Heavily inspired by VSCode.
MIT License
826 stars 27 forks source link

Fix when git repo is in detached state #101

Closed rosstang closed 1 year ago

rosstang commented 1 year ago

It fixes

https://github.com/ldelossa/nvim-ide/issues/20

After fixing,

ross@ross-comp:~/packer/opt/which-key.nvim$ git checkout HEAD~1
Note: switching to 'HEAD~1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 5ffa07b refactor: removing deprecated health functions (#377)
ross@ross-comp:~/packer/opt/which-key.nvim$ nvim

no longer has errors, while the branches still show up correctly.

ldelossa commented 1 year ago

Thanks!!