Commit Graph
100 Commits
Author SHA1 Message Date
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
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
Akianonymus 3fc587b54d install.sh: Use chsh instead of grep /etc/shells 2021-07-23 18:07:30 +05:30
Akianonymus 2e1d53971e install.sh: More automation 2021-07-19 20:35:10 +05:30
Akianonymus 2567ebaee4 telescope: Fix a bug introduced in 0023233
PackerCompile at the same time conflicts with packer sync because packer always runs in bg
2021-07-19 20:35:10 +05:30
Akianonymus 1e658562f0 install.sh: Run PackerSync from script after install too
as the corresponding code for that was removed from init.lua
2021-07-19 07:20:22 +05:30
AkianonymusandVhyrro 6b507c3368 init: Asynchronously load filetype and syntax
lots of improvement for startup time

Co-authored-by: Vhyrro <vhyrro@gmail.com>
2021-07-19 07:20:22 +05:30
Akianonymus 0023233eef Fix formatting | Handle a edgecase in telescope config | Misc
* fix formatting in pluginList, luasnip

* don't use pcall on highlights

* sync and compile fzf and media files only when the error occurs, add a
  help text telling tbe user to restart neovim
2021-07-19 07:19:53 +05:30
Akianonymus 05d57bba29 packerInit: Clone packer at opt path as we are lazy loading
move packadd to packerInit
2021-07-19 06:19:36 +05:30
Akianonymus 9c1a3ad2a2 Use a different saner syntax for pcall
takes less lines, looks much better

remove neoscroll.lua, missed in 2952f4d5c7
2021-07-17 22:10:25 +05:30
Akianonymus 1d7602e3e4 mappings: Don't yank the text after pasting in visual mode 2021-07-17 19:09:12 +05:30
Akianonymus dbc4979ebd Go to next/previous line with h,l,left and right 2021-07-17 19:09:12 +05:30
Akianonymus 72b9fa5018 mappings: Use ESC to clear search highlighting and to get out of terminal insert mode 2021-07-17 19:09:07 +05:30
Akianonymus 35b210b46a install.sh: Don't ask for terminal shell when updating | Misc
Handle a edgecase for config copying

Remove an unnecessary print
2021-07-16 21:00:28 +05:30
Akianonymus d1f23d1bc3 [4/4] Refactor: install.sh: Don't handle packer
use +":lua require 'pluginList' vim.cmd('PackerSync')"
only for update as PackerSync should trigger on fresh install automatically
2021-07-16 20:59:17 +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 3e83ec5314 [2/4] Refactor: plugins: Handle packer seperatly | Changes for configs
eg: require "plugins.neoscroll" instead of require "plugins.neoscroll".config()

second commit of refactor

handle require errors

handle cloning of packer
2021-07-16 20:08:46 +05:30
Akianonymus d16ffabcfd [1/4] Refactor: plugins: Add seperate config for each plugins
first commit of Refactor

handle require errors

move config from other places to proper files

don't create a pseudo config function for no reason

https://github.com/siduck76/NvChad/pull/156#issuecomment-881453546
2021-07-16 19:36:54 +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
Akianonymus 42bf581337 Disable nvim intro and tilde chars on end of buffer
This avoids the situation when the initial screen looks out of place
because there is some pre rendered text

https://github.com/neovim/neovim/pull/8546
2021-07-15 23:10:53 +05:30
Akianonymus e6ae79127f Increase timeoutlen to 400
sometimes 200 ms is way too for 3 key mappings
2021-07-13 16:16:57 +05:30