Commit Graph
100 Commits
Author SHA1 Message Date
AkianonymusandSidhanth Rathod fe9a7b1651 core|options: Add formatoptions in options | Remove unnecessary autocmd 2022-08-25 17:44:35 +05:30
AkianonymusandSidhanth Rathod 9021289421 core: autocmd: Remove 'tabdo wincmd =' on VimResized
this should not be in main config, not every one wants their splits to be of equal size on resize, sometimes i want the split to of smaller size whether the screen is resized or not

this should be in used custom dir
2022-08-25 17:44:35 +05:30
Aki 4ac1ece326 Update lazy_load.lua 2022-08-24 08:19:02 +05:30
AkianonymusandSidhanth Rathod 130442712b Fix some lsp warnings 2022-08-19 10:46:44 +05:30
AkianonymusandSidhanth Rathod 5e81ae8379 utils: close_buffer: Ask for confirmation when using on modified files
neovim handles this internally so why not use it
2022-08-19 10:46:44 +05:30
AkianonymusandSidhanth Rathod ce86597c3d utils: bufilter: Check for nil
it will be empty if tabufline is disabled
2022-08-19 10:46:44 +05:30
AkianonymusandSidhanth Rathod ac0faa4f8b core: options: Remove redundant code
that is shada default behaviour, why it is there ?
2022-08-14 08:52:30 +05:30
AkianonymusandSidhanth Rathod 0184035c15 treesitter: Do no set normal syntax highlight here
normal syntax isn't dependent on treesitter, so will be set when loading
the theme
2022-08-14 08:52:30 +05:30
AkianonymusandSidhanth Rathod f2c3ed0e7d utils: mappings: Allow plugin=true in user mappings
so that they can be lazy loaded if required

https://github.com/NvChad/NvChad/issues/1467
2022-08-12 22:00:07 +05:30
AkianonymusandSidhanth Rathod 78ddf8d624 Just load impatient from init
if will be called multiple times if present in lazy_load.lua which is
  totallly unnecessary

why even from there ?

Yes, this does not affect the --startuptime
2022-08-12 22:00:07 +05:30
AkianonymusandSidhanth Rathod a20fc560f3 utils: Improve mapping function | Properly lazy load whichkey
just add desc with normal vim.keymap.set function

whichkey will automatically use the descriptions
2022-08-11 22:53:17 +05:30
AkianonymusandSidhanth Rathod f4655e13ec mappings: Only set mappings if the plugin is enabled
format files

fix some lsp warnings
2022-08-07 08:09:32 +05:30
AkianonymusandSidhanth Rathod d7b97dfe63 utils: Improve remove_default_keys function
undo this black magic
2022-08-07 08:09:32 +05:30
AkianonymusandSidhanth Rathod 5bd4282835 cmp: load if cmp module is called 2022-08-07 08:09:32 +05:30
AkianonymusandSidhanth Rathod d8a92c75b1 Fix colorizer lazy load messing up cursor position when file is opened 2022-07-15 15:58:59 +05:30
AkianonymusandSidhanth Rathod fa68c66454 mappings: Do not use j,k mappings in operator mode 2022-07-14 23:19:29 +05:30
AkianonymusandSidhanth Rathod b9f0e4623e mappings: Add back mappings removed in https://github.com/NvChad/NvChad/commit/0844431d37b762c4fa0ff37dba28280848cf3f09 | Format files 2022-07-14 15:44:10 +05:30
Akianonymusandsiduck 08a16b9201 telescope: Add mapping to close picker with q in normal mode 2022-05-09 10:49:21 +05:30
Akianonymusandsiduck d912bbe67c mapping: Fix p not copy selected text when clipboard in not set
format statusline.lua
2022-05-08 11:36:05 +05:30
Akianonymusandsiduck a1e33798b6 statusline: Make config overridable 2022-05-07 20:22:08 +05:30
Akianonymusandsiduck 78cf3e97ad nvimtree: Don't exclude custom dir deliberatly
this is not doable, can interfere with different repos
2022-05-07 20:22:08 +05:30
Akianonymusandsiduck 9472212cee Format files 2022-05-05 15:02:48 +05:30
Akianonymusandsiduck 382eb7c60e utils.lua: Improve plugin_list function
require strings if given, if succesfull then use that table
2022-05-05 15:02:48 +05:30
Akianonymusandsiduck 08e9ab363e plugins/cmp: Use keymaps for command line too.
will be used if cmp triggered in command line mode
2022-05-05 15:02:48 +05:30
Akianonymusandsiduck e7bba86ccf plugins/colorizer: Move to our org fork 2022-02-07 20:21:11 +05:30
Akianonymusandsiduck 46db63749f cmp: Add border to floating docs, move completeopt inside config
format files
2022-02-04 06:12:31 +05:30
Akianonymusandsiduck 5a3ac7300d plugins/lspkind_icons: Add icon for TypeParameter 2022-02-04 06:12:31 +05:30
Akianonymusandsiduck 6b06bb9ed4 Remove duplicate code, missed in d8dabe9 | Format files 2022-01-31 11:13:31 +05:30
Akianonymusandsiduck de246fa0f5 Resolve https://github.com/NvChad/NvChad/issues/774 | Format 2022-01-30 23:09:25 +05:30
Akianonymusandsiduck b9fcaf610f plugins:lspconfig: Add module name to packer config
https://github.com/NvChad/NvChad/issues/730
2022-01-22 14:53:26 +05:30
Akianonymusandsiduck bad06dc44f mappings: Allow to remove plugin mappings in chadrc
This enables us to disable a plugin mappings individually

for eg:
  M.mappings.plugins = {
      telelscope = {
          find_hiddenfiles = false
      }
  }

  This will disable the telelscope find_hiddenfiles mapping.

It's also helpful when we want to use the mapping used by find_hiddenfiles for something else
2022-01-22 14:53:26 +05:30
Akianonymusandsiduck 4c85f25a09 init.lua: Print error message if custom init.lua cannot be called properly 2022-01-22 14:53:26 +05:30
Akianonymusandsiduck b86ae3b170 configs/statusline: Fix extra space before git diff removed icon 2022-01-22 14:53:26 +05:30
Akianonymusandsiduck bccd8e4ab9 utils: Improve override functions | Fix nvimtree and statusline config |
Misc

* make more things configurable
* use more generic variable names
* handle some edgecases
* cleanup
* format files
2022-01-22 10:15:38 +05:30
Akianonymusandsiduck 331754a890 nvimtree: Load after nvim-web-devicons when lazy load disabled
this is necessary as nvimtree depends on nvim-web-devicons

follow up commit for a2d91ac
2021-12-26 10:44:30 +05:30
Akianonymusandsiduck 60212005cb statusline: Refresh after BufRead too
sometimes events like BufEnter, BufWinEnter, etc are not enough for triggering a refresh, like opening nvim when nvimtree is not lazy load
2021-12-26 10:44:30 +05:30
Akianonymusandsiduck a2d91acc84 nvimtree: Allow changing lazy load from chadrc | Resolve https://github.com/NvChad/NvChad/issues/621
a packerCompile is needed after changin the config value in chadrc
2021-12-25 06:04:58 +05:30
Akianonymusandsiduck d2db2cc1cd plugin: Use Comment.nvim | Resolve #646 & #626 2021-12-11 22:54:59 +05:30
Akianonymusandsiduck 2293b16709 Cleanup | Format files
* fix some lint warnings
* remove some unneeded code
2021-12-11 11:58:52 +05:30
Akianonymusandsiduck76 9a45bb3f20 fix: Disabling shortline from chadrc
missed in https://github.com/NvChad/NvChad/commit/317eedd9b277b4457fbdfc6314e2cee955531c24

chore: format files
2021-10-14 11:08:23 +05:30
Akianonymusandsiduck76 2356ba069e fix: #501 | delay when use d in visual mode
only if copy_del = false
2021-10-02 12:13:56 +05:30
Akianonymusandsiduck76 585266dcef fix: Packer blank window on PackerSync 2021-10-02 11:24:14 +05:30
Akianonymusandsiduck76 d810cc35a7 chore: format files 2021-10-02 11:24:14 +05:30
Akianonymusandsiduck76 317eedd9b2 feat: Make short statusline toggleable from chadrc 2021-10-02 11:24:14 +05:30
Akianonymusandsiduck76 85117ef95e statusline: feline: Use default git provider
now it handles dirs too

https://github.com/famiu/feline.nvim/commit/092442db0c7eb6087f0ae2cbeb776781bcc16176
2021-09-09 08:45:15 +05:30
Akianonymusandsiduck76 e800122b45 plugins/configs/cmp: Enclose in pcall 2021-08-27 18:23:48 +05:30
Akianonymusandsiduck76 d90747415f plugins/configs/statusline: Fix branch seperator 2021-08-27 18:23:48 +05:30
Akianonymusandsiduck76 cdf9250636 Hide statusline in help too 2021-08-27 18:23:48 +05:30
Akianonymusandsiduck76 2c33e3dd38 mappings: Fix strange delete/yank/cut behaviour | Resolve #379
use mode() to detect if currently in operator pending mode, if then use normal j otherwise gj
2021-08-27 10:20:57 +05:30
Akianonymusandsiduck76 a1c103b6a8 lsp: Reload current buffer after startup
so lsp aftually starts for the current buffer, rest buffers are fine
2021-08-27 10:20:57 +05:30
Akianonymusandsiduck76 4e645c3c9f mappings: Change reload_config function name
changed in nvchad/extensions repo
2021-08-26 19:41:27 +05:30
Akianonymusandsiduck76 780142b150 plugins/configs/bufferline: Use a more unique func name quit all, to avoid conflicts
format file
2021-08-26 19:41:27 +05:30
Akianonymusandsiduck76 adf0168dcc plugins: More lazy load, yay
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
2021-08-26 19:41:27 +05:30
Akianonymusandsiduck76 66de975543 plugins/configs/statusline: Fix % icon for page position 2021-08-26 19:41:27 +05:30
Akianonymusandsiduck76 af597372ec plugins/configs/statusline: Remove extra space in lsp indicator 2021-08-26 19:41:27 +05:30
ee981f4f4a plugins/configs/statusline: Fix git branch not appearing without opening files
* 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>
2021-08-26 19:41:27 +05:30
Akianonymusandsiduck76 9b4b288d01 utils: load_config: Use filereadable to check if file exists 2021-08-25 11:41:15 +05:30
Akianonymusandsiduck76 753f144d3f packerInit: Print error on clone failed 2021-08-25 11:41:15 +05:30
Akianonymusandsiduck76 1b2ec94b75 feat: Add copy_del and copy_cut options to config 2021-08-25 11:41:15 +05:30
Akianonymusandsiduck76 49216a9c93 feat: Support for custom user mappings | Improve map function
move map function to utils

rearrange utils, was missed
2021-08-25 11:41:15 +05:30
Akianonymusandsiduck76 bf3d4b31a6 Missed in previous commit 2021-08-22 17:58:48 +05:30
Akianonymusandsiduck76 a28a838c06 NvChad/core -> Nvchad/extensions 2021-08-22 17:54:10 +05:30
Akianonymusandsiduck76 a82f71334f telescope-media: Check if ueberzug is available before loading the extension 2021-08-22 17:54:10 +05:30
Akianonymusandsiduck76 ef40dfcbc1 plugins: Properly lazy load telescope
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.
2021-08-22 17:54:10 +05:30
Akianonymusandsiduck76 3ee3b0368a config: Seperate plugin and non-plugin configs 2021-08-22 17:54:10 +05:30
Akianonymusandsiduck76 e08a460543 config: Expose tabstop option 2021-08-22 17:54:10 +05:30
Akianonymusandsiduck76 aa95c05179 Remove some unneeded events when hiding statusline
dunno why cmdwinenter was there

term enter is not needed as it will handled with Buf events

use filetype events as a buffer may not trigger other events but change
the filetype
2021-08-22 17:54:10 +05:30
Akianonymusandsiduck76 3719521d9a Disable statusline in dashboard
need here because out custom statusline hide function doesn't care about dashboard settings
2021-08-22 17:54:10 +05:30
Akianonymusandsiduck76 e1d0678f6e mappings: Add PackerClean command 2021-08-22 17:54:10 +05:30
Akianonymusandsiduck76 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
Akianonymusandsiduck76 b817c55542 mappings: Close buffer -> leader+x | Resolve #6
move theme toggle to leader+tt
2021-08-20 16:27:29 +05:30
Akianonymusandsiduck76 4c04160b87 dashboard: Fix alignment 2021-08-20 16:27:29 +05:30
Akianonymusandsiduck76 e15e79b519 options.lua: Merge the TermOpen autocommands 2021-08-20 16:27:29 +05:30
Akianonymusandsiduck76 1f6dbed26b Improve hiding/showing statusline via config 2021-08-20 16:27:29 +05:30
Akianonymusandsiduck76 3ccd804da9 utils/update_nvchad: Use --rebase instead of --ff-only 2021-08-20 01:00:46 +05:30
Akianonymusandsiduck76 5fab35f2e1 utils/load_config: Implement force reload of config 2021-08-20 01:00:46 +05:30
Akianonymusandsiduck76 f7d2bacb51 Fix theme switcher statusline reload 2021-08-20 01:00:46 +05:30
Akianonymusandsiduck76 7244492b36 utils/merge_table: Handle another edgecase 2021-08-19 16:52:46 +05:30
Akianonymusandsiduck76 224873b937 Missed in 67c6ec6 and 575dc10 2021-08-19 16:52:46 +05:30
Akianonymusandsiduck76 880d4dc312 NvChadUpdater: Make update repo and url configurable | Improve logging 2021-08-19 14:19:12 +05:30
Akianonymusandsiduck76 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
Akianonymusandsiduck76 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
Akianonymusandsiduck76 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
Akianonymusandsiduck76 e3f0429a72 tree-wide: Format files
ugh why do people don't push formatted stuff
2021-08-19 14:19:12 +05:30
AkiandGitHub 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
AkiandGitHub 98086892a7 tree-wide: Format files | Reformat chadrc | Misc (#268)
chadrc: looks cleaner this way

move close buffer to misc as it is not dependent on buffer plugin
2021-08-17 23:21:10 +05:30
AkiandGitHub 4abf43aa99 Fixes (#259)
* Missed in 154ba7d

* utils/change-theme: Check theme name for magic chars
2021-08-16 09:18:31 +05:30
AkiandGitHub 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
AkiandGitHub 0423da189c base16: Change syntax for new changes in base16 repo (#226) 2021-08-10 16:49:18 +05:30
Akianonymus a25f4fca70 Just packer shenanigans 2021-08-03 09:38:50 +05:30
Akianonymus e0f1cb3687 theme_switcher: Handle some edgecases | Clear cmdline after default theme prompt 2021-08-03 09:00:29 +05:30
AkianonymusandGalen Rowell af783670e4 mappings: leader+th for Telescope themes 2021-08-01 15:04:04 +10:00
AkianonymusandGalen Rowell 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
AkianonymusandGalen Rowell 7affb8cbfb Move from utils.lua to their respective places | Format all files 2021-08-01 15:04:04 +10:00
Akianonymus 3f1e9cf37a statusline: Show lsp icon only if client is active for current buffer 2021-07-26 16:57:00 +05:30
Akianonymus 268c37e52f mappings: Allow moving the cursor through wrapped lines normally
This doesn't affect any other stuff like 10j or 10k
2021-07-26 14:32:29 +05:30
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
Akianonymus 936f368036 Replace tweekmonster/startuptime.vim with dstein64/vim-startuptime
because it's broken now
2021-07-23 20:23:02 +05:30
Akianonymus bb04ba07cb mappings.lua: Code style fixes | Cleanup options.lua 2021-07-23 18:15:13 +05:30