Commit Graph

91 Commits

Author SHA1 Message Date
siduck76
92a9e13e7c Update init.lua 2021-09-28 15:11:03 +05:30
github-actions[bot]
7cab4295ee chore: format source code 2021-09-28 15:11:03 +05:30
Ashin Antony
8726de1faa chore: Clean init.lua
Why do we have a table to require a single module. We had this when we had plugins, colors etc. 
But we only have one module now. So why bother a list and looping through for a single module ?
2021-09-28 15:11:03 +05:30
Akianonymus
9ffddb6b52 Restructure config | Move some to a packer plugin | Lot of cleanup
* move teleacope files, updater and related utils to
  https://github.com/NvChad/core

* restructure config file and directory structure

* expose mappings for better escape

* allow multiple mappings for some

* improve merge table function for the same

* move autocommands to a seperate file

* rearrange everything alphabetically where sanely possible

* rearrange packer plugin list on the basis of trigerred state

config structure now

 .
├──  init.lua
├──  LICENSE
├──  lua
│  ├──  chadrc.lua
│  ├──  colors
│  │  ├──  highlights.lua
│  │  ├──  init.lua
│  │  └──  themes
│  │     ├──  chadracula.lua
│  │     ├──  everforest.lua
│  │     ├──  gruvchad.lua
│  │     ├──  javacafe.lua
│  │     ├──  mountain.lua
│  │     ├──  norchad.lua
│  │     ├──  one-light.lua
│  │     ├──  onedark.lua
│  │     ├──  tokyonight.lua
│  │     └──  tomorrow-night.lua
│  ├──  core
│  │  ├──  autocmds.lua
│  │  ├──  init.lua
│  │  ├──  mappings.lua
│  │  ├──  options.lua
│  │  └──  utils.lua
│  ├──  default_config.lua
│  └──  plugins
│     ├──  configs
│     │  ├──  autopairs.lua
│     │  ├──  autosave.lua
│     │  ├──  bufferline.lua
│     │  ├──  chadsheet.lua
│     │  ├──  compe.lua
│     │  ├──  dashboard.lua
│     │  ├──  gitsigns.lua
│     │  ├──  icons.lua
│     │  ├──  lspconfig.lua
│     │  ├──  luasnip.lua
│     │  ├──  nvimtree.lua
│     │  ├──  others.lua
│     │  ├──  statusline.lua
│     │  ├──  telescope.lua
│     │  ├──  treesitter.lua
│     │  └──  zenmode.lua
│     ├──  init.lua
│     └──  packerInit.lua
└──  README.md
2021-08-22 17:54:10 +05:30
Akianonymus
02f0122ab4 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
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
86903ab982
chore: stylua formatting update (#261)
* addded stylua config file

* chore: formatted with stylua
2021-08-16 13:19:09 +05:30
Akianonymus
7affb8cbfb Move from utils.lua to their respective places | Format all files 2021-08-01 15:04:04 +10:00
Akianonymus
92eb5ca740 Do not load packer on startup
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
2021-07-23 21:58:14 +05:30
Akianonymus
6b4435caef Don't use new_async
It doesn't seem to be improving stuff as it is not supposed to

Due to the half baked stats of the startuptime plugin, people were fooled

no point in disabling filetype and whatenot

See some discussion here: https://github.com/siduck76/NvChad/issues/175
2021-07-23 21:57:14 +05:30
siduck76
e01aafeea5
Merge pull request #178 from Akianonymus/main
install.sh: Use chsh instead of grep /etc/shells | init: Move bufferline config to pluginList | Misc improvements
2021-07-23 18:38:32 +05:30
siduck76
559acbd135
rm unneeded error landing
nvim by default shows stackrace path so I dont think we should be having this.
2021-07-23 18:17:31 +05:30
Akianonymus
fcfb814594 init: Move bufferline config to pluginList.lua
plugins.bufferline should be as config of nvim-bufferline

and pluginList for packer
2021-07-23 18:14:52 +05:30
siduck76
b54c4ca5de
better error message 2021-07-21 23:00:19 +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
siduck76
4ff7208c66 lazy loading 100%!! 2021-07-18 22:11:52 +05:30
siduck76
c6857e2a72 modded nord theme added 2021-07-17 14:07:27 +05:30
siduck76
2952f4d5c7 clean stuff 2021-07-16 23:22:36 +05:30
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
Akianonymus
0d7345bc44 Move options from init.lua => options.lua
use a local g = vim.g
2021-07-15 23:10:53 +05:30
siduck76
c4a8ecf47f add bufferline highlights 2021-07-15 10:18:10 +05:30
siduck76
c6084220de improve config structure 2021-07-09 09:14:04 +05:30
siduck76
50b00f4737 replace vim-auto-save with AutoSave.nvim 2021-07-02 15:17:36 +05:30
siduck76
ca29b38478 lazy load colorizer 2021-06-27 20:59:39 +05:30
siduck76
7d23b8c24e add some mappings 2021-06-27 18:15:58 +05:30
siduck76
3e1cf53fd6 set default theme 2021-06-26 08:16:23 +05:30
siduck76
c5f5709f10 lazy loading telescope! 2021-06-26 08:11:39 +05:30
siduck76
fc76cb3f52 global theme option 2021-06-26 08:08:12 +05:30
siduck76
40a63f67c8 add gruvbox theme 2021-06-26 08:05:24 +05:30
siduck76
685044335b use fzf for telescope 2021-06-26 08:03:29 +05:30
siduck76
47e062eb73 rm lazy loading for colorizer 2021-06-26 08:01:09 +05:30
siduck76
900fb9e8f1 rm whichkey 2021-06-26 07:59:33 +05:30
siduck76
0e9b3832ae lazy load lspconfig :D 2021-06-26 07:57:09 +05:30
siduck76
2f238742d2 add vim-matchup , lazy load some plugins 2021-06-26 07:54:10 +05:30
siduck76
193a852335 lazy load truezen.nvim 2021-06-26 07:52:48 +05:30
siduck76
f900ecaed3 lazy load colorizer , nvim-commet 2021-06-26 07:50:10 +05:30
siduck76
247e6e06c5 lazy load gitsigns 2021-06-26 07:45:42 +05:30
siduck76
4c96c28c2d lazy load blankline 2021-06-26 07:43:35 +05:30
siduck76
b42f4778f9 lazy load dashboard 2021-06-26 07:40:23 +05:30
siduck76
e2717401fe lazy load neoformat + lspkind ( run :PackerSync and :PackerCompile ) 2021-06-26 07:31:15 +05:30
siduck76
4e23587ca3 lazy loading : nvimtree and autopairs 2021-06-25 23:06:17 +05:30
siduck76
922089fc07 lazy loading : treesitter 2021-06-25 21:36:13 +05:30
siduck76
e771a32ab8 lazy loading : compe 2021-06-24 22:49:42 +05:30
siduck76
18ff27d6b1 add dashboard footer & disable statusline in dashboard 2021-06-19 12:50:35 +05:30
siduck76
a9816eed42 hide statusline in NvimTree and terminal buffers 2021-06-18 08:40:01 +05:30
siduck76
e31e74e0da
Update init.lua 2021-06-15 16:31:54 +05:30
ashincoder
0350571803 added commenting support 2021-06-15 15:55:32 +05:30
siduck76
a5b665f4a8 dashboard config 2021-06-14 09:24:47 +05:30