Commit Graph

25 Commits

Author SHA1 Message Date
Akianonymus 4801ec86f1 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
2021-08-19 14:19:12 +05:30
Akianonymus 7753e03b9e 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
2021-08-19 14:19:12 +05:30
Akianonymus e3f0429a72 tree-wide: Format files
ugh why do people don't push formatted stuff
2021-08-19 14:19:12 +05:30
siduck76 aa8df57cae Revert "NvChad Updater | Chadrc Fixes | Cleanup and Formatting | Misc (#288)"
This reverts commit 36cb57ecce.
2021-08-19 12:36:01 +05:30
Aki 36cb57ecce
NvChad Updater | Chadrc Fixes | Cleanup and Formatting | Misc (#288)
* 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
2021-08-19 12:33:11 +05:30
Galen Rowell 575dc10ddc
Greatly improve terminal features! Persistent terminals (#275)
* remove toggleTerm plugin

* Adding term binds, term hider & Telescope terms to bring them back

* Adding many term features!
2021-08-18 15:43:35 +05:30
Galen Rowell 86903ab982
chore: stylua formatting update (#261)
* addded stylua config file

* chore: formatted with stylua
2021-08-16 13:19:09 +05:30
Aki 4abf43aa99
Fixes (#259)
* Missed in 154ba7d

* utils/change-theme: Check theme name for magic chars
2021-08-16 09:18:31 +05:30
siduck76 154ba7d419 add theme toggler (#245) 2021-08-15 00:44:55 +05:30
siduck76 05e587cfc0
Clean up utils 2021-08-14 22:32:32 +05:30
Aki c656d6a3bd
Fix theme switcher reload | Move reload_theme to utils (#252)
* rearrange functions in utils.lua alphabetically
2021-08-14 22:11:20 +05:30
siduck76 0efa21c9c9 add user_config 2021-08-12 17:28:03 +05:30
Akianonymus e0f1cb3687 theme_switcher: Handle some edgecases | Clear cmdline after default theme prompt 2021-08-03 09:00:29 +05:30
Akianonymus a6ab121d12 Implement theme switcher
using telescope picker

ask if want to change default theme, change value in user_config.lua

load it as a telescope extension

live preview of themes

Co-authored-by: Galen Rowell <growell3@gmail.com>
2021-08-01 15:04:04 +10:00
Akianonymus 7affb8cbfb Move from utils.lua to their respective places | Format all files 2021-08-01 15:04:04 +10:00
siduck76 f8727f1659
Update utils.lua 2021-07-23 18:03:04 +05:30
Galen Rowell 0d69a528a8 Fix statusline issue 2021-07-22 18:04:21 +10:00
Galen Rowell 652f703767 Fix term crash bug, no auto-close finished term anymore 2021-07-22 17:45:47 +10:00
siduck76 845ac0e615
Merge pull request #171 from Pocco81/dev-init
Securely call modules and disable all builtin plugin
2021-07-21 23:00:42 +05:30
Pocco81 5531edf8e4 fix: formatted code with luafmt 2021-07-20 23:20:00 -05:00
Pocco81 355178a7bb feat: secure calls + disabled all builtin plugins 2021-07-20 13:19:31 -05:00
Galen Rowell f35aa3c604 automatically close a terminal buffer if it has exited/returned 2021-07-20 20:18:10 +10:00
Galen Rowell 1bedbbe5c4 Fix terminal buffer format bug, & enable escape from terminal & visual mdoes 2021-07-18 15:42:54 +10:00
Akianonymus 643d1bd7d8 [3/4] Refactor: init: Use async | Move theme stuff to theme.lua
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
2021-07-16 20:11:08 +05:30
siduck76 c6084220de improve config structure 2021-07-09 09:14:04 +05:30