because it is a user config, so our config shoudn't break even we if dont have it
use our own table merge function
move loading config to a function
use a global variable to store the config, so no need to call the table function everytime
because mappings.lua is called from multiple places, so there should't be any code that executes without calling a specific function
show error message when something fails in init.lua
makes no sense to not
rearrange plugin functions alphabetically, but keep misc at top
* tree-wide: Format files
ugh why do people don't push formatted stuff
* mappings|init: Move init mappings to a function, only call when required | Show err message for init
because mappings.lua is called from multiple places, so there should't be any code that executes without calling a specific function
show error message when something fails in init.lua
makes no sense to not
rearrange plugin functions alphabetically, but keep misc at top
* feat: Do not depend on user config | Fix merging of configs
because it is a user config, so our config shoudn't break even we if dont have it
use our own table merge function
move loading config to a function
use a global variable to store the config, so no need to call the table function everytime
* Add NvChadUpdate command and shortcut for it
map leader+uu to it
summary of what it does:
first ask the user for confirmation and tell that the updater is gonna run git reset --hard in config repo and chadrc will be restored
take backup of chadrc in a lua string and locally in a file with chadrc.bak.(random numbers)
git reset on config dir and git pull
whether success or error, restore the chadrc file
if restore fails, then print backup file path
for more deep understanding, read the comments in utils.lua
* NvChadUpdater: Make update repo and url configurable | Improvr logging
only for insert mode ( so also works on terminal too )
remove visual mode key binding, till we find a proper solution, because it is super annoying right now
Original pr here: https://github.com/siduck76/NvChad/pull/160
Actually saved some milliseconds, can be observed in benchmarks too
from packer readme
```
To optimize startup time, packer.nvim compiles code to perform the lazy-loading operations you specify. This means that you do not need to load packer.nvim unless you want to perform some plugin management operations.
```
Add packer commands manually to mappings.lua, but with basic functionalty
By this, we don't losr the packer commands and don't even load at startup
After some command is actually executed, it will load the PackerCommands as they were
third commit of refactor
perf improvements due to async
run packer sync if base16 not found
this is not perfect error handling for initial run, but something
handle require errors
currently when a vertical or horizontal split buffer is open and ctrl + q is used, then it removes the buffer content but not the actual buffer, further it duplicates an existing buffer content.
This commit fixes that