use vim.defer_fn to load the plugins after entering the ui
add the lazy load to setup
lazy load gitsigns, neoscroll, lspinstall and vim-matchup using this method
rearrange according to startup sequence
* the default provider given by feline uses gitsigns which only updates when a file is opened
* code taken from: https://github.com/hoob3rt/lualine.nvim/blob/master/lua/lualine/components/branch.lua
* use gitsigns var when available
Co-authored-by: Famiu Haque <famiuhaque@gmail.com>
Co-authored-by: hoob3rt <pelczarskihubert@gmail.com>
Co-authored-by: Shadman <shadmansaleh3@gmail.com>
from packer docs
module = string or list -- Specifies Lua module names for require. When requiring a string which starts
-- with one of these module names, the plugin will be loaded.
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
* 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