Compare commits

...
387 Commits
Author SHA1 Message Date
siduck76 06c324a1a7 Update README.md 2021-08-19 22:28:55 +05:30
siduck76 2c0a094442 Update README.md 2021-08-19 21:08:47 +05:30
Dhruv Jain b97d9a8f85 Very minor typos in plugin sections 2021-08-19 18:38:27 +05:30
Dhruv Jain 3ec8c80abe Fix typos in Feature section 2021-08-19 18:38:27 +05:30
Dhruv Jain 9b719a6db6 Fix typos in Bloat section 2021-08-19 18:38:27 +05:30
Dhruv Jain 6bfd2043e8 fix typos in TODO section 2021-08-19 18:38:27 +05:30
godspeed-x df00e8ba51 link image to nvchad's contributor page 2021-08-19 18:38:27 +05:30
siduck76 47ab9c28a1 add no buffer icon to statusline 2021-08-19 18:13:58 +05:30
ashincoder a49f62d3c6 feat: Added option for italic_comments 2021-08-19 18:05:54 +05:30
siduck76 112d3866a5 improve various theme colors 2021-08-19 17:44:48 +05:30
siduck76 5ae6fba20d make statusline more pretty 2021-08-19 17:35:24 +05:30
Akianonymus 7244492b36 utils/merge_table: Handle another edgecase 2021-08-19 16:52:46 +05:30
Akianonymus 224873b937 Missed in 67c6ec6 and 575dc10 2021-08-19 16:52:46 +05:30
siduck76 114d699fc5 change nvimtree rootfolder fg 2021-08-19 16:09:24 +05:30
siduck76 e75fbed322 disable transparency by default 2021-08-19 14:39:27 +05:30
siduck76 f10fb47637 add transparency option to user config 2021-08-19 14:36:49 +05:30
Akianonymus 880d4dc312 NvChadUpdater: Make update repo and url configurable | Improve logging 2021-08-19 14:19:12 +05:30
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 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
Akianonymus e3f0429a72 tree-wide: Format files
ugh why do people don't push formatted stuff
2021-08-19 14:19:12 +05:30
siduck76 6224ed6283 Revert "chore: update path_display (#285)"
This reverts commit 1d78add91e.
2021-08-19 13:24:35 +05:30
siduck76 32a6fd8d29 add statusline_style to chadrc 2021-08-19 12:38:50 +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
siduck76 623a2a0d1a default_config : add statusline separators style 2021-08-19 11:59:42 +05:30
siduck76 88ff5595ad Update README.md 2021-08-19 10:25:22 +05:30
Tuan Nguyen 1d78add91e chore: update path_display (#285) 2021-08-19 09:36:32 +05:30
siduck76 fdb2fa115d update readme 2021-08-19 08:40:08 +05:30
Galen Rowell f82b390aba make cheatsheet enabled by default (#281) 2021-08-18 19:31:02 +05:30
Galen Rowellandsiduck76 1fac41047d add a quick install section to NvChad & removed 2 showcase photos (#280)
* add a quick install section to NvChad & removed 2 showcase photos

* Update README.md

Co-authored-by: siduck76 <siduck13@gmail.com>
2021-08-18 19:05:51 +05:30
Galen Rowell fa965c9797 added relativenumber option & statusline option (#279) 2021-08-18 17:43:56 +05:30
siduck76 e663122638 add bg to Floating window 2021-08-18 15:25:58 +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
siduck76 51760c21f5 Add important notes for user , default config 2021-08-18 11:10:13 +05:30
siduck76 056fcb51f5 User config works 2021-08-18 00:33:37 +05:30
siduck76 b571fd9d40 test user config xD 2021-08-18 00:08:38 +05:30
Pocco81 0d35b9ddac feat: added default conf and deep extension capabilities (#269) 2021-08-18 00:02:48 +05:30
Aki 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
siduck76 29f3259c42 Update README.md 2021-08-17 20:13:58 +05:30
siduck76 9cee2c0921 Update README.md 2021-08-17 19:41:43 +05:30
siduck76 e25f30899d rename mountaineer 2021-08-17 19:13:03 +05:30
sprlptr48 9c3f9adb22 Fix wrong link in README (#266) 2021-08-17 18:40:41 +05:30
siduck76 cf4e0a2c53 fix plenary.nvim not loading (#256) 2021-08-17 12:12:33 +05:30
siduck76 00e76c72ec rm install script 2021-08-17 10:11:58 +05:30
siduck76 c62e94923a add mapping cheatsheet (#244) 2021-08-16 22:18:08 +05:30
siduck76 eaaefc236d add one-light (#243) 2021-08-16 19:04:09 +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 9c134872fb rename theme name 2021-08-16 08:57:25 +05:30
siduck76 aabc3e692f update tomorrow night theme name 2021-08-16 08:43:39 +05:30
siduck76 c251f88567 update nvim-base16 repo link 2021-08-16 08:14:16 +05:30
ashincoder 7b796294a4 refact: move false to true in plugins and change disable to 'not' so that the user does'nt be confused (#257) 2021-08-16 06:16:14 +05:30
siduck76 27031acd08 Update README.md 2021-08-15 13:22:41 +05:30
siduck76 49120177ce Update theme.lua 2021-08-15 01:10:05 +05:30
siduck76 154ba7d419 add theme toggler (#245) 2021-08-15 00:44:55 +05:30
ea0a221230 (feat) add filename edit/lock icons provider (#253)
* (feat) add filename edit/lock icons provider

* Update statusline.lua

Co-authored-by: Sage Baram <sagebaram@gamil.com>
Co-authored-by: siduck76 <siduck13@gmail.com>
2021-08-14 23:56:34 +05:30
siduck76 ebdcd4cae1 fix luasnip creating statusline errors (#250) 2021-08-14 22:35:10 +05:30
siduck76 05e587cfc0 Clean up utils 2021-08-14 22:32:32 +05:30
siduck76 e0feea9407 cleanup ! 2021-08-14 22:31: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
Galen Rowell e80a6935d6 Now have 3 separate terms, window, vert & hori, renamed some variables (#251) 2021-08-14 19:28:24 +05:30
siduck76 c80d79a7cc set completeopt for compe 2021-08-14 18:12:28 +05:30
siduck76 59359943eb show chadributors in the readme 2021-08-14 16:12:44 +05:30
siduck76 fd2aa6095f improve nav_in insertmode (#240) 2021-08-14 13:44:28 +05:30
curtainandcurtain 2b331e7fa1 add some useful keymap in insert/command mode with switch to toggle (#240)
Co-authored-by: curtain <kaleidoscope@163.com>
2021-08-14 13:26:54 +05:30
siduck76 f805cb1cbd user_config : add option to disable telescope media plugin 2021-08-14 13:00:01 +05:30
Galen Rowell 91c8736146 WIP - Added toggleterm, based upon curtanips work (#237)
* Added toggleterm, based upon curtanips work
Also other various term fixes & changed term mappings

* new NvChad config to hide statusline by filetype
2021-08-13 21:29:17 +05:30
siduck76 3f44f0761a fix statusline missing after termclose (#236) 2021-08-13 13:17:41 +05:30
siduck76 c7fdd68072 statusline : add vimode colors 2021-08-13 12:12:43 +05:30
curtainandcurtain f832195a81 fix luasnip complete and move it to reasonable place (#235)
Co-authored-by: curtain <kaleidoscope@163.com>
2021-08-13 10:05:31 +05:30
siduck76 f884caa606 everforest theme : better dark color 2021-08-12 23:14:28 +05:30
siduck76 2884254afe add everforest theme (#219) 2021-08-12 23:10:00 +05:30
siduck76 0df87e4e72 fix telescope commands not working! (#230) 2021-08-12 22:23:43 +05:30
siduck76 a21ef38dc5 fix comment toggle mapping (#233) 2021-08-12 18:37:02 +05:30
siduck76 0efa21c9c9 add user_config 2021-08-12 17:28:03 +05:30
siduck76 d5c64d335e add chadracula theme 2021-08-10 20:09:55 +05:30
Iorvethe ae30324ed4 Add theme: Dracula (#225)
* Add theme: Dracula

* Dracula theme: make black2 lighter
2021-08-10 16:49:33 +05:30
Aki 0423da189c base16: Change syntax for new changes in base16 repo (#226) 2021-08-10 16:49:18 +05:30
siduck76 f22366eac9 truezen.nvim : update var 2021-08-09 21:30:17 +05:30
siduck76 62841e3dc2 update discord server invite link
the previous one expired after 7 days
2021-08-08 09:33:57 +05:30
siduck76 98e2957234 add mountaineer theme 2021-08-07 20:30:17 +05:30
ashincoder 605cbdf585 Merge for a clean repo (#220) 2021-08-07 17:49:57 +05:30
siduck76 b16e2bf29c load signature.nvim after lspconfig only
https://github.com/siduck76/NvChad/pull/218#issuecomment-894633359
2021-08-07 15:33:10 +05:30
ashincoder 2795ed4fb3 Added .gitignore and lazy load lsp_signature more (#218) 2021-08-07 15:24:31 +05:30
siduck76 ea992308f1 disable tilde on end of buffer 2021-08-07 11:48:13 +05:30
siduck76 d390966b4d disable indentline in packer float window 2021-08-07 11:42:56 +05:30
siduck76 d4193727bd add lsp-signature.nvim (#142) 2021-08-07 11:25:23 +05:30
siduck76 232bb5fd7c add tokyonight theme (#215) 2021-08-06 21:25:24 +05:30
Pocco81 ef16aa7f1c replaced 'bin/bash' with 'usr/bin/env bash' for better compatibility (#216) 2021-08-06 08:01:49 +05:30
siduck76 ccca491acd Merge pull request #214 from Pocco81/dev-script
Improvement and fixes:  improve install script.
2021-08-05 05:08:29 +05:30
Pocco81 9e7bec1198 changed nvchad_path 2021-08-04 17:19:38 -05:00
Pocco81 45bf74bc03 Merge branch 'main' into dev-script 2021-08-04 17:14:57 -05:00
Pocco81 c5fd109a2d done 2021-08-04 14:49:33 -05:00
Pocco81 af1aa860da remove and install cmds 2021-08-04 00:11:15 -05:00
Pocco81 a49c54fc41 refactor 2021-08-03 23:17:40 -05:00
Pocco81 acceccda87 accept both args and flags 2021-08-03 23:09:18 -05:00
Pocco81 bbbd73fc56 basic parser 2021-08-03 22:38:03 -05:00
siduck76 3ed108b4ea update todo 2021-08-04 08:39:43 +05:30
siduck76 927bde7187 Merge pull request #211 from Akianonymus/main
Theme switcher improvements | Packer Shenanigans
2021-08-03 11:41:05 +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
Pocco81 668f1d5623 skeleton for new install script 2021-08-02 21:23:20 -05:00
siduck76 6468de54c1 Create README.md 2021-08-02 07:10:08 +05:30
siduck76 0ea1bcb6f1 Update README.md 2021-08-02 07:10:02 +05:30
siduck76 f172cc8362 rm vim-startuptime 2021-08-02 06:48:11 +05:30
siduck76 021cf9c6f4 Merge pull request #201 from G-Rowell/dev-chadThemeSwitcher
Chad theme switcher
2021-08-01 10:35:08 +05:30
Akianonymus 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
Akianonymus 7affb8cbfb Move from utils.lua to their respective places | Format all files 2021-08-01 15:04:04 +10:00
siduck76 12085f495c replace bufread event with bufenter ( lspinstall/lspkind ) 2021-08-01 10:09:51 +05:30
siduck76 5236893e5e add permanent undo (#197) 2021-08-01 09:55:28 +05:30
siduck76 8ac85a03af Create user_config.lua 2021-07-31 21:04:53 +05:30
siduck76 e9aa4b5234 Update user_config.lua 2021-07-31 21:04:47 +05:30
siduck76 bcbde0e1a2 add theme to user_config 2021-07-31 20:44:42 +05:30
siduck76 29f04fcc9d Merge pull request #199 from ashincoder/main
Added invite link
2021-07-29 15:48:06 +05:30
ashincoder 202c62a2d3 Added invite link
I've added the invite link of NvChad discord and Changed the badge alt name to discord
2021-07-29 15:32:28 +05:30
siduck76 5d1156ddb2 Merge pull request #195 from mmatongo/xdg
add XDG_CONFIG_HOME
2021-07-29 12:47:08 +05:30
Daniel M. Matongo 9ba08bf788 update _CONFIG_PATH 2021-07-29 05:27:08 +00:00
Daniel M. Matongo dcf5d64437 add XDG_CONFIG_HOME
I tried installing it on my system and it failed mostly because the NvChad was by default installed to the `.config` directory. I use a custom dir for my `XDG_CONFIG_HOME` so I figured if anyone has the same issue this would be an easy way to have it not work for them, the fallback dir here is `.config` if the user has not set a custom one.
2021-07-28 19:16:32 +00:00
siduck76 9089232ec7 Merge pull request #194 from ashincoder/main
Added Discord Badge
2021-07-28 21:48:09 +05:30
ashincoder d9c7a1b504 Added Discord Badge
Replaced gitter badge
2021-07-28 21:46:39 +05:30
siduck76 87f3415f6f Update mappings.lua 2021-07-28 19:53:19 +05:30
siduck76 f27f7b1502 add hl to nvimtree_rootdir 2021-07-28 19:18:03 +05:30
siduck76 f4d24e35ae Merge pull request #193 from G-Rowell/dev-fixTerm
fix mapping error
2021-07-28 18:45:41 +05:30
Galen Rowell 462a20d66a fix mapping error 2021-07-28 14:42:55 +10:00
siduck76 7f34fee4a4 Merge pull request #179 from vladdoster/patch-1
(maint): update conditional check and log message
2021-07-28 05:10:59 +05:30
vlad doster e197049a59 Merge branch 'main' into patch-1 2021-07-27 16:30:24 -05:00
siduck76 b49ba0a254 Merge pull request #187 from Akianonymus/main
statusline: Show lsp icon only if client is active for current buffer
2021-07-26 21:40:27 +05:30
Akianonymus 3f1e9cf37a statusline: Show lsp icon only if client is active for current buffer 2021-07-26 16:57:00 +05:30
siduck76 22ea576682 Merge pull request #186 from Akianonymus/main
Use jdhao/better-escape.vim | Allow moving the cursor through wrapped lines normally
2021-07-26 15:26:21 +05:30
G-Rowell 3b05354337 Use jdhao/better-escape.vim to handle jk as escape mappings
only for insert mode ( so also works on terminal too )

remove visual mode key binding, till we find a proper solution, because it is super annoying right now

Original pr here: https://github.com/siduck76/NvChad/pull/160
2021-07-26 15:14:49 +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
siduck76 11d75cf597 better colors for javacafe theme 2021-07-25 14:53:43 +05:30
siduck76 33422b0f3a better colors for javacafe theme 2021-07-25 13:18:48 +05:30
siduck76 cf46fc09a5 Merge pull request #184 from JavaCafe01/javacafe-colorscheme
Added javacafe color scheme
2021-07-25 11:06:24 +05:30
gokul edbd88fdb7 Added javacafe color scheme
The javacafe color scheme is my custom smash of nord and pastel colors.
2021-07-24 16:43:38 -07:00
siduck76 9157cafb61 Update telescope.lua 2021-07-25 01:31:50 +05:30
siduck76 a31d8fb228 fix telescope media files mapping #183 2021-07-24 10:11:21 +05:30
siduck76 bdd63eeedc Delete nn.lua 2021-07-24 10:25:33 +05:30
siduck76 c98334ae08 lspconfig : update diagnostics in insert mode 2021-07-24 09:59:39 +05:30
siduck76 17b5336254 Merge pull request #181 from kilpkonn/vim-fugitive
Add git integration
2021-07-23 23:31:29 +05:30
Tavo Annus 021b5c07f5 Merge branch 'main' of github.com:siduck76/NvChad into vim-fugitive 2021-07-23 20:57:32 +03:00
siduck76 b0adf7a565 Merge pull request #180 from Akianonymus/main
Remove placebo async stuff | Replace startuptime plugin with actually working one | Do not load packer
2021-07-23 23:04:43 +05:30
Tavo Annus 472278f2e3 Add vim-fugitive plugin 2021-07-23 20:22:09 +03: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
Akianonymus 936f368036 Replace tweekmonster/startuptime.vim with dstein64/vim-startuptime
because it's broken now
2021-07-23 20:23:02 +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 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
siduck76 766d52db12 Merge pull request #174 from G-Rowell/dev-terminalAndScript
Fix term crash bug, no auto-close finished term anymore
2021-07-23 18:04:59 +05:30
siduck76 f8727f1659 Update utils.lua 2021-07-23 18:03:04 +05:30
vlad doster 756713b9c3 (maint): update conditional check and log message
- Use more appropriate `-n` flag
- Reword log message
2021-07-23 04:17:57 -05:00
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 020daec5fc disable matchit
matchit was already disabled by default but a recent PR enabled it again , sorry for that! Since vim matchup already does what matchit does , I'll remove it.
2021-07-21 23:06:28 +05:30
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
siduck76 b54c4ca5de better error message 2021-07-21 23:00:19 +05:30
siduck76 fec301504f clean stuff 2021-07-21 22:37:48 +05:30
siduck76 c1544dd020 Merge pull request #170 from Pocco81/dev-lsp
Lang servers error suppression and better "publish diagnostics" glyph
2021-07-21 22:48:44 +05:30
siduck76 08dfe17678 clean stuff | map new tab 2021-07-21 11:26:25 +05:30
siduck76 f72c36f4ab Merge pull request #167 from G-Rowell/dev-terminalAndScript
Fix buffers/tab terminal issues, improve terminal install scripting
2021-07-21 10:02:51 +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
Pocco81 1e2d299bf9 feat: suppressed error messages from lang servers and added better glyph for publish diagnostics 2021-07-20 12:38:51 -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 15f20e8437 better shell setup scripting 2021-07-20 19:41:50 +10:00
Galen Rowell a6ea40d7ba open default shell terminal with proper neovim commands, fix buffer tabline issue 2021-07-20 19:38:43 +10:00
Galen Rowell ff14ba61f9 open new buffers, instead of tabs 2021-07-20 19:36:06 +10:00
siduck76 665fa24783 Merge pull request #166 from Akianonymus/main
Fixes
2021-07-19 21:32:50 +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
siduck76 3669af3517 Merge pull request #165 from Akianonymus/main
Even faster startup time | Fix formatting | Misc
2021-07-19 08:54:01 +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
siduck76 d257c4dd85 Update README.md 2021-07-18 23:35:25 +05:30
siduck76 4ff7208c66 lazy loading 100%!! 2021-07-18 22:11:52 +05:30
siduck76 9f1dc90269 Create README.md 2021-07-18 18:27:11 +05:30
siduck76 18a050d54f Update README.md 2021-07-18 18:27:06 +05:30
siduck76 036fb6cd66 update readme 2021-07-18 18:23:29 +05:30
siduck76 2a9d24b4a8 Update README.md 2021-07-18 17:50:21 +05:30
siduck76 3be058da26 more lazy loaddd 2021-07-18 16:32:03 +05:30
siduck76 79f8c39dd2 Merge branch 'main' of github.com:siduck76/NvChad 2021-07-18 16:06:48 +05:30
siduck76 18f3b8b93e map jk escape from terminal buffer 2021-07-18 16:10:23 +05:30
siduck76 6d98a11dfe lazy load more plugins! 2021-07-18 16:06:33 +05:30
siduck76 cb3f7538e8 Merge pull request #162 from G-Rowell/dev-fixTerm
Fix terminal config issues
2021-07-18 11:45:12 +05:30
Galen Rowell 1bedbbe5c4 Fix terminal buffer format bug, & enable escape from terminal & visual mdoes 2021-07-18 15:42:54 +10:00
siduck76 cf8b2ce1cb Merge pull request #161 from Akianonymus/main
Code style fixes | Some saner defaults
2021-07-18 09:46:09 +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
siduck76 8be8d36474 Update README.md 2021-07-17 16:44:39 +05:30
siduck76 2c74abe936 map escape to normal mode 2021-07-17 16:13:42 +05:30
siduck76 82f07879f3 better nord colors 2021-07-17 14:20:36 +05:30
siduck76 5f7f2df2b7 minor changes 2021-07-17 14:15:14 +05:30
siduck76 c6857e2a72 modded nord theme added 2021-07-17 14:07:27 +05:30
siduck76 f0b491cd94 update truezen config 2021-07-17 01:04:13 +05:30
siduck76 5bb85b8176 trim default ts parsers list 2021-07-16 23:40:52 +05:30
siduck76 75aa73762f Update README.md 2021-07-16 23:55:40 +05:30
siduck76 2952f4d5c7 clean stuff 2021-07-16 23:22:36 +05:30
siduck76 6f2b358d3a Merge pull request #156 from Akianonymus/main
Major perf improvements | Handle errors | Better configs | Misc
2021-07-16 23:34:57 +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
siduck76 4a934e9a82 use better char for gitsigns 2021-07-15 11:09:58 +05:30
siduck76 c4a8ecf47f add bufferline highlights 2021-07-15 10:18:10 +05:30
siduck76 7658c3d978 Update README.md 2021-07-14 06:54:14 +05:30
siduck76 6d0150ab0b Merge pull request #155 from Akianonymus/main
Use shallow clone for packer | set bg colour | Fix visual selection color | Misc improvements
2021-07-13 19:43:02 +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
Akianonymus 10ddd491c1 highlights.lua: fix comments not visible in visual selection mode 2021-07-13 16:06:31 +05:30
Akianonymus 605c9e0458 highlights.lua: set neovim bg colour 2021-07-13 14:16:27 +05:30
Akianonymus c38c4ec0cf install.sh: Do shallow clone for packer.nvim 2021-07-13 14:13:33 +05:30
siduck76 484751c422 Merge pull request #150 from maitesin/patch-1
Remove quotes from jpeg icon color
2021-07-11 21:09:36 +05:30
Oscar Forner Martinez 734562cc36 Remove quotes from jpeg icon color 2021-07-11 17:29:55 +02:00
siduck76 5ff50c63e9 fix LspInstall lazy loading (#149) 2021-07-11 17:28:10 +05:30
siduck76 df4ff8dc6f lazy load some plugins 2021-07-11 12:20:15 +05:30
siduck76 4dbb1a71e2 lazy load lsp-install 2021-07-10 19:06:41 +05:30
siduck76 9627b5e6b4 add highlights for packer.nvim 2021-07-10 11:53:47 +05:30
siduck76 f6ace73656 minor changes 2021-07-10 09:41:10 +05:30
siduck76 0bbb88f6db typo 2021-07-09 16:54:40 +05:30
siduck76 1aef7e9a97 Merge pull request #145 from Akianonymus/main
Refactor Install script
2021-07-09 17:11:08 +05:30
siduck76 3a209318bb rm duplicate mapping 2021-07-09 17:10:28 +05:30
Akianonymus 2988a22eb8 mappings.lua: Fix ctrl + q when vertical/horizontal split buffer is open
currently when a vertical or horizontal split buffer is open and ctrl + q is used, then it removes the buffer content but not the actual buffer, further it duplicates an existing buffer content.

This commit fixes that
2021-07-09 15:26:09 +05:30
Akianonymus e71b9bbece install.sh: Refactor install script, Add new flags
Giving either --install or --update flag is neccessary for the script to proceed

    -i | --install       => Install the config.

    -u | --update        => Update the existing config without removing existing stuff.

    -b | --backup 'path' => Custom config backup path.

    -nb | --no-backup    => Don't take existing config backup. Use with caution.

Update formatting using following command
    shfmt -i 2 -sr -p -bn -ci -w install.sh
2021-07-09 14:31:47 +05:30
siduck76 a75d59a2bf Merge branch 'main' of github.com:siduck76/NvChad 2021-07-09 10:26:27 +05:30
siduck76 61778b20f1 Merge pull request #144 from Akianonymus/main
telescope.lua: Use path_display instead of shorten_path
2021-07-09 10:38:40 +05:30
siduck76 0a55de407e add git clone_timeout for packer 2021-07-09 10:25:26 +05:30
Akianonymus a5bd221680 telescope.lua: Use path_display instead of shorten_path
shorten_path is deprecated now

Reference: https://github.com/nvim-telescope/telescope.nvim/wiki/Path-Display-Configuration
2021-07-09 10:12:57 +05:30
siduck76 9f8ce72e55 add preload sizes for lua lsp (#143) 2021-07-09 09:19:24 +05:30
siduck76 c6084220de improve config structure 2021-07-09 09:14:04 +05:30
siduck76 e219b04e82 better colors 2021-07-07 22:19:51 +05:30
siduck76 b16c5a2f70 autopairs parenthesis autoinsert after function completion 2021-07-06 13:39:23 +05:30
siduck76 8b4118605b add parenthesis for function completion 2021-07-05 23:27:41 +05:30
siduck76 7db1fb75b9 use better colors for tomorrow-night theme 2021-07-05 23:03:38 +05:30
siduck76 3ee8f9876c Merge pull request #125 from alternateved/append-to-highlights
Add bg colors for all nvchad themes
2021-07-05 22:25:12 +05:30
siduck76 02b4194e1e Update highlights.lua 2021-07-05 22:24:30 +05:30
siduck76 45f940f3fb Merge pull request #123 from alternateved/add-theme
Add tomorrow-night theme
2021-07-05 22:18:19 +05:30
alternateved 20c3eca0b6 Make darker_black less dark 2021-07-05 18:41:37 +02:00
alternateved 07d3192f6f Remove blue-ish tint from darker_black 2021-07-05 18:32:38 +02:00
siduck76 1399a0c762 Merge pull request #130 from ashincoder/main
Made some changes in mappings and settings
2021-07-05 18:40:23 +05:30
siduck76 1aed70921e Merge pull request #129 from Akianonymus/main
install.sh: Fix all shellcheck warnings | Misc improvements
2021-07-05 18:38:43 +05:30
ashincoder c5703f2d03 Merge branch 'siduck76:main' into main 2021-07-05 18:38:28 +05:30
siduck76 0914c33ab8 Merge pull request #132 from alternateved/fix-zen
Update TrueZen.nvim configuration file
2021-07-05 18:38:03 +05:30
alternateved 8355a055d1 Rework TrueZen.nvim configuration file 2021-07-05 15:01:50 +02:00
alternateved ac069fd543 Update TrueZen.nvim configuration file 2021-07-05 14:57:27 +02:00
ashincoder 6d864a62bf Merge branch 'siduck76:main' into main 2021-07-05 17:19:36 +05:30
ashincoder 7f6cf1bc4b seperate prefix for zen mappings and timeoutlen in settings 2021-07-05 17:19:12 +05:30
alternateved d7729017c1 Merge branch 'siduck76:main' into append-to-highlights 2021-07-05 12:49:12 +02:00
alternateved 0e6f3c81b9 Merge branch 'siduck76:main' into add-theme 2021-07-05 12:49:04 +02:00
siduck76 4730350ca8 Update README.md 2021-07-05 15:30:53 +05:30
siduck76 30e7c8cefe Delete FUNDING.yml
Since this is just a config , who'd even pay for it lol? Also it having a sponsor button might've create bad image for some people and make them think that NvChad's just created to make some cash! So I'll be removing "the sponsor slap" from here :))
2021-07-05 15:25:11 +05:30
Akianonymus 27e3cf69bc install.sh: Fix all shellcheck warnings | Misc improvements
* modify sed command to work in both gnu sed and mac os sed

    https://stackoverflow.com/a/4247319

* use printf everywhere for more compatibility

* add some error checking
2021-07-05 15:00:12 +05:30
siduck76 1f89919d27 Merge pull request #122 from ashincoder/main
Fixed relative number
2021-07-05 06:29:06 +05:30
ashincoder a3df1f4cc4 Update highlights.lua 2021-07-05 05:52:55 +05:30
alternateved e8574170f5 Remove tomorrow-night theme 2021-07-04 20:14:12 +02:00
alternateved 6881fdfefb Add background colors in case of different terminal colors 2021-07-04 16:29:16 +02:00
alternateved 327c067fd2 Add tomorrow-night theme 2021-07-04 16:19:46 +02:00
ashincoder 57f9d0dbd3 fixed error #121 2021-07-04 19:25:37 +05:30
ashincoder d50d11435d changed relative number format to current way 2021-07-04 14:38:08 +05:30
siduck76 f3f3e51d0f Merge pull request #120 from ashincoder/main
updated indent-blankline branch to master
2021-07-03 13:32:03 +05:30
ashincoder c721db661f updated 2021-07-03 13:09:00 +05:30
ashincoder 0d9ae5f497 updated indent-blankline branch to master
In the commit of 17a83ea765831cb0cc64f768b8c3f43479b90bbe the branch of lua was merged to master.
2021-07-03 13:06:24 +05:30
siduck76 135249e19e Merge branch 'main' of github.com:siduck76/NvChad 2021-07-02 15:21:30 +05:30
siduck76 50b00f4737 replace vim-auto-save with AutoSave.nvim 2021-07-02 15:17:36 +05:30
siduck76 82eb17d95b Merge pull request #118 from ashincoder/main
added nice badges c:
2021-07-02 14:08:37 +05:30
ashincoder 81ce6877ae made changes 2021-07-02 13:23:01 +05:30
ashincoder da0b4df3c5 Update README.md 2021-07-02 13:21:42 +05:30
ashincoder 48ad79cd93 added made with lua badge in readme 2021-07-02 13:21:18 +05:30
ashincoder 4005cbc854 updated readme.md
Made label colors default and changed some colors
2021-07-02 11:57:02 +05:30
ashincoder 8ddf78a9af Updated the links of the badges 2021-07-02 10:26:07 +05:30
ashincoder c2f857cb9e update hyperlink of issue badge 2021-07-02 10:19:17 +05:30
ashincoder 4647da671b changed color of issues label to red 2021-07-02 07:38:32 +05:30
ashincoder 45a9c806a2 updated colors of readme
updated colors added Neovim logo.
2021-07-02 07:36:20 +05:30
ashincoder 0b842db789 added logos in badges
I added some more logos for soothness
2021-07-02 06:33:12 +05:30
siduck76 76cdd5a29b Merge pull request #116 from ashincoder/main
Updated telescope config #115
2021-07-01 21:39:20 +05:30
siduck76 dfe707d6db Update telescope-nvim.lua 2021-07-01 21:38:46 +05:30
ashincoder 9dbc9e6880 Updated telescope config
fixes issue #115.
2021-07-01 21:30:03 +05:30
siduck76 eacc481b08 Merge pull request #114 from ashincoder/main
added more badges
2021-07-01 21:27:35 +05:30
ashincoder 1895d1f771 centered the badges 2021-07-01 20:36:57 +05:30
siduck76 10d7b892c9 Update README.md 2021-07-01 20:13:57 +05:30
ashincoder 0ecde48940 Update README.md 2021-07-01 20:09:00 +05:30
ashincoder 113c9b5a6d full clear 2021-07-01 20:08:31 +05:30
ashincoder a1645954aa made flat all 2021-07-01 20:06:53 +05:30
ashincoder dbb87a304d made badges flat 2021-07-01 19:37:18 +05:30
siduck76 1f3a5fd233 Update README.md 2021-07-01 19:29:51 +05:30
ashincoder 799f2e0b6f Update README.md 2021-07-01 19:16:04 +05:30
ashincoder 940f344e0e added more badges
The badges added:
   - Stars
   - Issues
2021-07-01 19:15:29 +05:30
siduck76 3b1d43fcc4 Merge pull request #112 from ashincoder/main
updated config.yml
2021-07-01 18:48:42 +05:30
siduck76 ea3b090566 Update config.yml 2021-07-01 18:48:31 +05:30
ashincoder 311a01da44 Merge branch 'siduck76:main' into main 2021-07-01 18:43:23 +05:30
ashincoder 6e5d2940d7 updated config.yml
added some help links
2021-07-01 18:43:06 +05:30
siduck76 9d7c11e6bd Merge pull request #111 from alternateved/update-plugin-list
Update TrueZen.nvim after repository changed address
2021-07-01 18:42:30 +05:30
alternateved f1662951d1 Update TrueZen.nvim after repository changed address 2021-07-01 13:44:56 +02:00
siduck76 9b2d36b767 update nvimtree config and highlights 2021-07-01 11:55:38 +05:30
siduck76 2d4172fd98 Merge branch 'main' of github.com:siduck76/NvChad 2021-07-01 06:27:01 +05:30
siduck76 d073e01117 fix typo in mappings #109 2021-07-01 06:26:51 +05:30
siduck76 67a8d2b9df Merge pull request #108 from ashincoder/main
created config.yml in issue templates
2021-06-30 18:11:06 +05:30
ashincoder 7e69cb8ac9 created config.yml
created config.yml so that blank issues are not enabled
2021-06-30 17:41:33 +05:30
siduck76 8e389776dc Merge pull request #107 from ashincoder/main
added bug report template
2021-06-30 08:12:23 +05:30
ashincoder a465ea7239 created feature request template 2021-06-30 06:07:28 +05:30
ashincoder 602835d637 created bug report template 2021-06-30 06:03:22 +05:30
siduck76 168054cd05 Merge pull request #106 from ashincoder/main
removed -e flags in script
2021-06-29 15:29:12 +05:30
ashincoder 4631fbcf4c removed -e flags in script
I removed -e flags of echoes as it not useful in the posix script
2021-06-29 15:09:03 +05:30
siduck76 97370f36ca Merge pull request #104 from kingavatar/main
Fix Check Git Workspace Condition
2021-06-29 11:03:59 +05:30
kingavatar 4159c5370f Fix Check Git Workspace Condition 2021-06-29 10:50:37 +05:30
siduck76 69e790eeb3 Create README.md 2021-06-29 08:53:30 +05:30
siduck76 2b628f1729 Update README.md 2021-06-29 08:53:01 +05:30
siduck76 e9e2dd3f14 Update README.md 2021-06-29 08:52:28 +05:30
siduck76 4dde80f315 Update install.sh 2021-06-28 21:23:50 +05:30
siduck76 bd6014d60d Merge pull request #101 from Vanderscycle/patch-1
Update install.sh
2021-06-28 07:53:28 +05:30
Henri 087e4e8acc Update install.sh
Gave up and decided to clone the config and reinstall over my previous install to add later. Made the following modifications:
1 - removed the extra echos (use echo -e "\n some line " in the future)
2 - packer doesn't install if there's a previously installed packer folder. So the bash script purges the previous packer folder and starts anew.


tested the config correctly
2021-06-27 12:02:56 -07:00
siduck76 50321ad4a0 change some mappings 2021-06-27 22:08:47 +05:30
siduck76 da50d99462 load colorizer on bufread event only 2021-06-27 21:58:35 +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 89ab7f7be9 add donate link 2021-06-26 21:18:33 +05:30
siduck76 6d4d73c7f7 Merge branch 'main' of github.com:siduck76/NvChad 2021-06-26 18:20:36 +05:30
siduck76 9da869feee replace vsnip with luasnip,clean some confs 2021-06-26 18:20:25 +05:30
siduck76 ae2461a46f Update README.md 2021-06-26 17:51:11 +05:30
siduck76 3523eb277b Update README.md 2021-06-26 12:49:12 +05:30
siduck76 aa1a1af099 Update README.md 2021-06-26 12:48:04 +05:30
siduck76 c671acb112 Update README.md 2021-06-26 12:42:02 +05:30
siduck76 45afa83629 Update README.md 2021-06-26 12:39:30 +05:30
siduck76 36aa25ba49 Update README.md 2021-06-26 12:35:13 +05:30
siduck76 a6d2ccbb22 Update README.md 2021-06-26 12:33:02 +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 7758c086e2 clean up 2021-06-26 08:06:26 +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 dcc04837d4 disable some inbuilt plugins 2021-06-26 07:38:44 +05:30
siduck76 e2717401fe lazy load neoformat + lspkind ( run :PackerSync and :PackerCompile ) 2021-06-26 07:31:15 +05:30
siduck76 5f676ffbdb Update install.sh 2021-06-26 07:35:33 +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 7464358bbf lazy loading : vsnip 2021-06-24 22:51:39 +05:30
siduck76 e771a32ab8 lazy loading : compe 2021-06-24 22:49:42 +05:30
siduck76 bbadee53ad Update README.md 2021-06-19 20:24:28 +05:30
siduck76 7c0b6bac22 Update README.md 2021-06-19 20:24:02 +05:30
siduck76 8f6780f09f Update pluginList.lua 2021-06-19 19:24:24 +05:30
siduck76 18ff27d6b1 add dashboard footer & disable statusline in dashboard 2021-06-19 12:50:35 +05:30
siduck76 36474baab2 Merge branch 'main' of github.com:siduck76/NvChad 2021-06-19 07:08:33 +05:30
siduck76 c995595509 rm unneeded spaces after nvimtree default icons 2021-06-19 07:08:22 +05:30
siduck76 ffa008f148 Update README.md 2021-06-18 11:42:25 +05:30
siduck76 671ed7d090 Update README.md 2021-06-18 11:39:40 +05:30
siduck76 6c272e7313 disable showmode 2021-06-18 08:41:14 +05:30
siduck76 a9816eed42 hide statusline in NvimTree and terminal buffers 2021-06-18 08:40:01 +05:30
siduck76 74a97956bb Merge pull request #78 from ashincoder/main
cmd instead of vim.cmd
2021-06-16 18:56:26 +05:30
siduck76 fdd32cfcab Update highlights.lua 2021-06-16 18:56:12 +05:30
ashincoder 35343e8b96 cmd instead of vim.cmd 2021-06-16 18:53:16 +05:30
siduck76 a80de385f2 Update highlights.lua 2021-06-16 18:00:23 +05:30
siduck76 fe0fc44f77 Merge pull request #74 from ashincoder/main
Added relative numbers option and changed bookmark icon
2021-06-16 06:44:03 +05:30
ashincoder 20cc14e584 removed 2 repeated lines 2021-06-16 06:42:23 +05:30
ashincoder 9d35626a56 Merge branch 'main' of github.com:ashincoder/NvChad 2021-06-16 06:20:58 +05:30
ashincoder c3a447a471 commented relative number setting and changed bookmark icon 2021-06-16 06:20:47 +05:30
siduck76 61022dd971 Update README.md 2021-06-15 23:52:11 +05:30
siduck76 9bbd2b5d69 update todo and some stuff 2021-06-15 23:39:40 +05:30
siduck76 9aea4d08e5 minor changes in treesitter conf 2021-06-15 21:54:05 +05:30
siduck76 62f4ce0912 enable smartindent 2021-06-15 21:44:11 +05:30
siduck76 f87772e559 Merge pull request #66 from ashincoder/main
Added commenter support.
2021-06-15 16:32:50 +05:30
siduck76 19763665e6 Delete commenter.lua 2021-06-15 16:32:07 +05:30
siduck76 e31e74e0da Update init.lua 2021-06-15 16:31:54 +05:30
ashincoder c0369c7130 added commenting keybinding 2021-06-15 15:57:55 +05:30
ashincoder 0350571803 added commenting support 2021-06-15 15:55:32 +05:30
siduck76 e48da3491d Merge pull request #64 from ashincoder/main
backup old nvim config in install script
2021-06-15 14:52:59 +05:30
ashincoder 3879718cea changed script to mv nvim to nvim.bak instead of deleting it 2021-06-15 14:35:23 +05:30
siduck76 3552dcffb9 fix conflicting mappings 2021-06-14 23:21:16 +05:30
58 changed files with 3542 additions and 1196 deletions

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- Operating System
- Terminal
- Version of Neovim
**Additional context**
Add any other context about the problem here.
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Wiki
url: https://github.com/siduck76/NvChad/wiki
about: "Walks you through how to use and Configure NvChad."
- name: Visit our gitter chat
url: https://gitter.im/neovim-dotfiles/community
about: "A place where we dicuss NvChad related stuff."
+23
View File
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem was.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
**Screenshot**
Maybe a screenshot of the feature
+1
View File
@@ -0,0 +1 @@
plugin
+6
View File
@@ -0,0 +1,6 @@
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 3
quote_style = "AutoPreferDouble"
no_call_parentheses = true
+108 -50
View File
@@ -1,103 +1,161 @@
[![Super-Linter](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml/badge.svg)](https://github.com/siduck76/NvChad/actions/workflows/superLinter.yml)
<h1 align="center">NvChad</h1>
An attempt to make neovim (cli version) as functional as an IDE while being very eyecandy.
<div align="center">
<a href="https://nvchad.netlify.app/">Home</a>
<span> • </span>
<a href="https://nvchad.netlify.app/docs/Getting%20started/Setup">Install</a>
<span> • </span>
<a href="https://nvchad.netlify.app/docs/Contribute">Contribute</a>
<span> • </span>
<a href="https://github.com/siduck76/NvChad#gift_heart-support">Support</a>
<span> • </span>
<a href="https://github.com/siduck76/NvChad/wiki/Chad-user-configs">Extras</a>
<p></p>
</div>
# Screenshots -
<div align="center">
[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)]()
</div>
<div align="center">
[![Super Linter](https://img.shields.io/github/workflow/status/siduck76/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=green)]()
<a href="https://github.com/siduck76/NvChad"
><img
src="https://img.shields.io/github/repo-size/siduck76/NvChad?style=flat-square&label=Repo"
alt="GitHub repository size"
/></a>
<a href="https://github.com/siduck76/NvChad/blob/main/LICENSE"
><img
src="https://img.shields.io/github/license/siduck76/NvChad?style=flat-square&logo=GNU&label=License"
alt="License"
/>
[![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb)
[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.5+-blueviolet.svg?style=flat-square&logo=Neovim&logoColor=white)](https://github.com/neovim/neovim)
[![GitHub Issues](https://img.shields.io/github/issues/siduck76/NvChad.svg?style=flat-square&label=Issues&color=fc0330)](https://github.com/siduck76/NvChad/issues)
[![Last Commit](https://img.shields.io/github/last-commit/siduck76/NvChad.svg?style=flat-square&label=Last%20Commit&color=58eb34)](https://github.com/siduck76/NvChad/pulse)
</div>
# Showcase
<img src ="https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/dashboard-nvim.png"><hr>
<img src ="https://cdn.discordapp.com/attachments/610012460828852229/853933487295299584/unknown.png"><hr>
<img src ="https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/initialNvim1.png"><hr>
<img src ="https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/initialNvim.png"><hr>
<kbd><img src ="https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/nvimRice2.png"></kbd><hr>
# Very Useful lua plugins used in my config -
# Very Very Useful lua plugins used in my config
#### lspkind-nvim
#### Lspkind-nvim
This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items :
This tiny plugin adds vscode-like pictograms to neovim built-in lsp completion items:
<kbd><img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/lspkind.png"></kbd><hr>
#### nvim-tree.lua
#### Nvim-tree.lua
fast file tree :
fast file tree:
<kbd><img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/nvimtree.png"></kbd><hr>
### telescope-nvim -
### Telescope-nvim
A fuzzy file finder, picker, sorter, previewer and much more:
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/tel.png"></kbd>
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/telmedia.png"></kbd><hr>
### indent-blankline.nvim -
### Indent-blankline.nvim
adds indentline :
adds indentline:
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/blanklineNvim.png"></kbd>
### galaxyline -
### Galaxyline
fastest statusline plugin I've used so far:
<kbd><img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/statusline.png"></kbd><hr>
<hr>
### Nvim-bufferline.lua
### nvim-bufferline.lua -
As a top bufferline like thing which lets me handle tabs like switching, closing tabs.
As a top tabline like thing which lets me handle tabs and buffers like switching , sorting and closing them etc.
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/bufferline.png"></kbd>
<hr>
### nvim-web-devicons -
Lua fork of vim devicons which lets me change icons of filetypes
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/image.png"></kbd><hr>
### nvim-treesitter
Better syntax highlighting for programming languages ( my config just has html,css,js support for now ).
### Nvim-web-devicons
without / with Treesitter :
Lua fork of vim devicons which lets me change icons of filetypes:
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/image.png"></kbd>
### Nvim-treesitter
Better syntax highlighting for programming languages ( NvChad by default comes with lua/bash treesitter parsers ).
without / with Treesitter:
<kbd> <img src = "https://raw.githubusercontent.com/siduck76/dotfiles/master/rice%20flex/woTree.png"></kbd>
# Credits
- [Elianiva](https://github.com/elianiva) helped me with neovim lua related issues many times, NvChad wouldnt exist without his help at all!
- @lorvethe for making NvChad logo!
# Features
- File navigation with Nvimtree
- mouse works
- managing tabs with bufferline
- Using plugins that are mouse friendly
- Beautiful inbuilt themes
- lazy loading 100% of plugins
- managing tabs, buffers with bufferline
- autosave
- icons on nvimtree , telescope , bufferline/statusline and almost everywhere! with nvim-web-devicons
- minimal status line ( galaxyline)
- icons on nvimtree, telescope, bufferline/statusline and almost everywhere! with nvim-web-devicons
- minimal status line (galaxyline)
- gitsigns (colored bars for git in my config)
- using nvim-lsp
- nvim-lspconfig for nvim-lps configuration
- nvim-lspconfig for nvim-lsp configuration
- lspInstall for installing lsp servers easily
- nvim-compe for autocompletion
- lspkind to show pictograms on autocompletion items
- telescope for file finding , picking , previewing (files and even images)
- telescope for file finding, picking, previewing (files and even images)
- nvim-treesitter for syntax highlighting
- nvim-autopairs , for autolosing braces and stuffs
- neoformat for prettifying / formatting code
- nvim-autopairs for autolosing braces and stuffs
- neoformat for prettifying/formatting code
- packer.nvim as package manager
- indent-blankline.Nvim for indentlines
- smooth scrolling
- Snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets)
- luasnip for snippet plugin and snip support from VSCode through vsnip supporting custom and predefined snips (friendly-snippets)
- Distraction free modes (modes in which statusline, tabline etc. stuff get disabled so its just the text visible in the buffer similar to goyo.vim)
- Code formatting/prettifying
- gitsigns for git diffs
# Requirements
# Bloat
- To all those who think this is probably bloated, sure it is. Bloat means different to everyone. NvChad has like 30 ~ plugins but that doesn't mean those plugins are compromising neovim's speed, snappiness, or making it slow. No matter how many plugins I'd add on NvChad, it wouldn't compromise speed/snappiness/make it slow or whatever since it uses packer.nvim as plugin manager. packer.nvim lets you lazy load plugins i.e. loading plugins on certain events, mappings, sequentially loading them, etc, thus loading them only when needed. I have lazy loaded all the plugins so most plugins aren't loaded by default, hence not affecting neovim's startup/launch time.
- neovim 0.5
- A terminal that supports [nerdfonts](https://github.com/ryanoasis/nerd-fonts)
- Set terminal's inner padding to 0.
# Wiki
- [config-structure](https://github.com/siduck76/NvChad/wiki#config-structure)
- [Install](https://github.com/siduck76/NvChad/wiki#clone-my-setup)
- [mappings](https://github.com/siduck76/NvChad/wiki/mappings)
<img src = "https://chadpaste.com/f/kdmxdabxbk.png">
# TODO
It would be nice if NvChad focuses on existing plugins and config before adding new things. Some plugins like whichkey, telescope and treesitter still have basic configs! Also adding new features that'd make NvChad slow or its startup time slow wouldn't be encouraged. If that feature is really needed then it'll be mentioned in the wiki with its config.
- Debloat the config.
- Make NvChad more and more faster (reduce startup time as low as possible).
- Add more themes.
- Add a theme switcher
# Contact -
# Chad contributors
- My linux / unix related ricing community: https://t.me/DE_WM (telegram)
- Me: @siduck (telegram)
<a href = "https://github.com/NvChad/NvChad/graphs/contributors">
<img src = "https://contrib.rocks/image?repo=siduck76/NvChad"/>
</a>
## :gift_heart: Support
If you enjoy using NvChad and would like to show your appreciation, you may want to tip me here.
It is never required but always appreciated.
<p align="center">
<a href="https://www.buymeacoffee.com/siduck7" target="_blank"><img alt="undefined" width="48px" src="https://raw.githubusercontent.com/adi1090x/files/master/other/1.png"></a>
<a href="https://ko-fi.com/siduck76" target="_blank"><img alt="undefined" width="48px" src="https://raw.githubusercontent.com/adi1090x/files/master/other/2.png"></a>
<a href="https://www.paypal.com/paypalme/siduck76" target="_blank"><img alt="undefined" width="48px" src="https://raw.githubusercontent.com/adi1090x/files/master/other/3.png"></a>
</p>
## Warning
I get hearings from some plugin devs that nvchad users bring issues on discourse/reddit/matrix/gh repos etc. Please dont do that :/ . Bring NvChad related issues here ONLY and dont ever bother plugin devs, THIS IS A CLEAR WARNING! 😠
+10 -57
View File
@@ -1,59 +1,12 @@
-- load all plugins
require "pluginList"
require "misc-utils"
local chad_modules = {
"options",
"mappings",
}
require "top-bufferline"
require "statusline"
for i = 1, #chad_modules, 1 do
if not pcall(require, chad_modules[i]) then
error("Error loading " .. chad_modules[i] .. "\n")
end
end
require("colorizer").setup()
require("neoscroll").setup() -- smooth scroll
-- lsp stuff
require "nvim-lspconfig"
require "compe-completion"
local cmd = vim.cmd
local g = vim.g
g.mapleader = " "
g.auto_save = 0
-- colorscheme related stuff
cmd "syntax on"
local base16 = require "base16"
base16(base16.themes["onedark"], true)
require "highlights"
-- blankline
g.indentLine_enabled = 1
g.indent_blankline_char = "▏"
g.indent_blankline_filetype_exclude = {"help", "terminal", "dashboard"}
g.indent_blankline_buftype_exclude = {"terminal"}
g.indent_blankline_show_trailing_blankline_indent = false
g.indent_blankline_show_first_indent_level = false
require "treesitter-nvim"
require "mappings"
require "telescope-nvim"
require "nvimTree" -- file tree stuff
require "file-icons"
-- git signs , lsp symbols etc
require "gitsigns-nvim"
require("nvim-autopairs").setup()
require("lspkind").init()
-- hide line numbers in terminal windows
vim.api.nvim_exec([[
au BufEnter term://* setlocal nonumber
]], false)
require "zenmode"
require "whichkey"
require "dashboard"
require("mappings").misc()
-49
View File
@@ -1,49 +0,0 @@
#!/bin/sh
get_platform() {
case "$(uname -s)" in
Linux*) platform=Linux ;;
Darwin*) platform=Mac ;;
CYGWIN*) platform=Cygwin ;;
MINGW*) platform=MinGw ;;
*) platform="UNKNOWN:${unameOut}" ;;
esac
echo $platform
}
echo "installing packer"
if [ ! -d ~/.local/share/nvim/site/pack/packer ]; then
echo "Installing packer"
git clone https://github.com/wbthomason/packer.nvim \
~/.local/share/nvim/site/pack/packer/start/packer.nvim
echo
echo "packer installed!"
echo
fi
echo "Linking config"
echo "old nvim config will be deleted so watchout! :0"
echo
# copying config
rm -rf ~/.config/nvim/ && mkdir -p ~/.config/nvim
cp -r init.lua ~/.config/nvim && cp -r lua ~/.config/nvim
# change shell in nvim config
read -p "which shell do you use?: " shellname
echo "$shellname"
if [ "$(get_platform)" = "Mac" ]; then
gsed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua
else
sed -i "s/bash/$shellname/g" ~/.config/nvim/lua/mappings.lua
fi
echo "shell changed to $shellname on nvim successfully!"
echo
echo "neovim will open with some errors , just press enter" && sleep 1
# install all plugins
nvim +PackerInstall
+158
View File
@@ -0,0 +1,158 @@
-- IMPORTANT NOTE : This is user config
local M = {}
M.ui = {
theme = "onedark",
-- theme toggle
theme_toggler = false,
fav_themes = {
"onedark",
"gruvchad",
},
italic_comments = false,
-- Enable this only if your terminal has the colorscheme set which nvchad uses
-- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal
transparency = false,
hidden_statusline = {
-- these are filetypes, not pattern matched
"NvimTree",
-- "terminal",
},
statusline_style = "default", -- default, round , slant , block , arrow
}
M.options = {
permanent_undo = true,
ruler = false,
hidden = true,
ignorecase = true,
mouse = "a",
cmdheight = 1,
updatetime = 250,
timeoutlen = 400,
clipboard = "unnamedplus",
number = true,
-- relative numbers in normal mode tool at the bottom of options.lua
relativenumber = false,
numberwidth = 2,
expandtab = true,
shiftwidth = 2,
smartindent = true,
mapleader = " ",
autosave = false,
enable_insertNav = true, -- navigation in insertmode
-- used for updater
update_url = "https://github.com/NvChad/NvChad",
update_branch = "main",
}
-- enable and disable plugins (false for disable)
M.plugin_status = {
-- UI
nvim_bufferline = true,
galaxyline = true,
nvim_colorizer = true,
dashboard_nvim = true,
blankline = true,
truezen_nvim = true,
better_esc = true,
-- lsp stuff
lspkind = true,
lspsignature = true,
-- git stuff
gitsigns = true,
vim_fugitive = true,
-- misc
neoformat = true,
vim_matchup = true,
autosave_nvim = true,
nvim_comment = true,
neoscroll_nvim = true,
telescope_media = true,
cheatsheet = true,
}
-- make sure you dont use same keys twice
M.mappings = {
-- plugin specific
truezen = {
ataraxisMode = "<leader>zz",
minimalisticmode = "<leader>zm",
focusmode = "<leader>zf",
},
comment_nvim = {
comment_toggle = "<leader>/",
},
nvimtree = {
treetoggle = "<C-n>", -- file manager
},
neoformat = {
format = "<leader>fm",
},
dashboard = {
open = "<leader>db",
newfile = "<leader>fn",
bookmarks = "<leader>bm",
sessionload = "<leader>l",
sessionsave = "<leader>s",
},
telescope = {
live_grep = "<leader>fw",
git_status = "<leader>gt",
git_commits = "<leader>cm",
find_files = "<leader>ff",
buffers = "<leader>fb",
help_tags = "<leader>fh",
oldfiles = "<leader>fo",
themes = "<leader>th",
},
telescope_media = {
media_files = "<leader>fp",
},
chadsheet = {
default_keys = "<leader>dk",
user_keys = "<leader>uk",
},
bufferline = {
new_buffer = "<S-t>",
newtab = "<C-t>b",
close = "<S-x>", -- close a buffer with custom func in utils.lua
cycleNext = "<TAB>", -- next buffer
cyclePrev = "<S-Tab>", -- previous buffer
},
fugitive = {
Git = "<leader>gs",
diffget_2 = "<leader>gh",
diffget_3 = "<leader>gl",
git_blame = "<leader>gb",
},
terms = { -- below are NvChad mappings, not plugin mappings
esc_termmode = "jk",
esc_hide_termmode = "JK",
pick_term = "<leader>W", -- note: this is a telescope extension
new_wind = "<leader>w",
new_vert = "<leader>v",
new_hori = "<leader>h",
},
-- navigation in insert mode
insert_nav = {
forward = "<C-l>",
backward = "<C-h>",
top_of_line = "<C-a>",
end_of_line = "<C-e>",
prev_line = "<C-j>",
next_line = "<C-k>",
},
misc = {
copywhole_file = "<C-a>",
toggle_linenr = "<leader>n", -- show or hide line number
theme_toggle = "<leader>x",
update_nvchad = "<leader>uu",
},
}
return M
-74
View File
@@ -1,74 +0,0 @@
vim.o.completeopt = "menuone,noselect"
require "compe".setup {
enabled = true,
autocomplete = true,
debug = false,
min_length = 1,
preselect = "enable",
throttle_time = 80,
source_timeout = 200,
incomplete_delay = 400,
max_abbr_width = 100,
max_kind_width = 100,
max_menu_width = 100,
documentation = true,
source = {
buffer = {kind = "﬘", true},
vsnip = {kind = "﬌"}, --replace to what sign you prefer
nvim_lsp = true
}
}
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local check_back_space = function()
local col = vim.fn.col(".") - 1
if col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then
return true
else
return false
end
end
-- tab completion
_G.tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-n>"
elseif check_back_space() then
return t "<Tab>"
else
return vim.fn["compe#complete"]()
end
end
_G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-p>"
elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
return t "<Plug>(vsnip-jump-prev)"
else
return t "<S-Tab>"
end
end
-- mappings
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
function _G.completions()
local npairs = require("nvim-autopairs")
if vim.fn.pumvisible() == 1 then
if vim.fn.complete_info()["selected"] ~= -1 then
return vim.fn["compe#confirm"]("<CR>")
end
end
return npairs.check_break_line_char()
end
vim.api.nvim_set_keymap("i", "<CR>", "v:lua.completions()", {expr = true})
-28
View File
@@ -1,28 +0,0 @@
local g = vim.g
g.dashboard_default_executive = "telescope"
g.dashboard_custom_header = {
" ",
" ",
" ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ",
" ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
" ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
" ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ",
" ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ",
" ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ",
" ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ",
" ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ",
" ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ",
" ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ",
" ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ",
" "
}
g.dashboard_custom_section = {
a = {description = {" Find File SPC f f"}, command = "Telescope find_files"},
b = {description = {" Recents SPC f o"}, command = "Telescope oldfiles"},
c = {description = {" Find Word SPC f w"}, command = "Telescope live_grep"},
d = {description = {"洛 New File SPC f n"}, command = "DashboardNewFile"},
e = {description = {"󰓏 Bookmarks SPC f b"}, command = "Telescope marks"},
f = {description = {" Load Last Session SPC f s"}, command = "SessionLoad"}
}
+159
View File
@@ -0,0 +1,159 @@
-- IMPORTANT NOTE : This is default config, so dont change anything here. (check chadrc.lua instead)
local M = {}
M.ui = {
theme = "onedark",
-- theme toggle
theme_toggler = false,
fav_themes = {
"onedark",
"gruvchad",
},
italic_comments = false,
-- Enable this only if your terminal has the colorscheme set which nvchad uses
-- For Ex : if you have onedark set in nvchad , set onedark's bg color on your terminal
transparency = false,
hidden_statusline = {
-- these are filetypes, not pattern matched
"NvimTree",
"terminal",
},
statusline_style = "default", -- default, round , slant , block , arrow
}
M.options = {
permanent_undo = true,
ruler = false,
hidden = true,
ignorecase = true,
mouse = "a",
cmdheight = 1,
updatetime = 250,
timeoutlen = 400,
clipboard = "unnamedplus",
number = true,
relativenumber = false,
numberwidth = 2,
expandtab = true,
shiftwidth = 2,
smartindent = true,
mapleader = " ",
autosave = false,
enable_insertNav = true, -- navigation in insertmode
-- used for updater
update_url = "https://github.com/NvChad/NvChad",
update_branch = "main",
}
-- enable and disable plugins (false for disable)
M.plugin_status = {
-- UI
nvim_bufferline = true,
galaxyline = true,
nvim_colorizer = true,
dashboard_nvim = true,
blankline = true,
truezen_nvim = true,
better_esc = true,
-- lsp stuff
lspkind = true,
lspsignature = true,
-- git stuff
gitsigns = true,
vim_fugitive = true,
-- misc
neoformat = true,
vim_matchup = true,
autosave_nvim = true,
nvim_comment = true,
neoscroll_nvim = true,
telescope_media = true,
cheatsheet = true,
}
-- make sure you dont use same keys twice
M.mappings = {
-- plugin specific
truezen = {
ataraxisMode = "<leader>zz",
minimalisticmode = "<leader>zm",
focusmode = "<leader>zf",
},
comment_nvim = {
comment_toggle = "<leader>/",
},
nvimtree = {
treetoggle = "<C-n>", -- file manager
},
neoformat = {
format = "<leader>fm",
},
dashboard = {
open = "<leader>db",
newfile = "<leader>fn",
bookmarks = "<leader>bm",
sessionload = "<leader>l",
sessionsave = "<leader>s",
},
telescope = {
live_grep = "<leader>fw",
git_status = "<leader>gt",
git_commits = "<leader>cm",
find_files = "<leader>ff",
buffers = "<leader>fb",
help_tags = "<leader>fh",
oldfiles = "<leader>fo",
themes = "<leader>th",
},
telescope_media = {
media_files = "<leader>fp",
},
chadsheet = {
default_keys = "<leader>dk",
user_keys = "<leader>uk",
},
bufferline = {
new_buffer = "<S-t>",
newtab = "<C-t>b",
close = "<S-x>", -- close a buffer with custom func in utils.lua
cycleNext = "<TAB>", -- next buffer
cyclePrev = "<S-Tab>", -- previous buffer
},
fugitive = {
Git = "<leader>gs",
diffget_2 = "<leader>gh",
diffget_3 = "<leader>gl",
git_blame = "<leader>gb",
},
terms = { -- below are NvChad mappings, not plugin mappings
esc_termmode = "jk",
esc_hide_termmode = "JK",
pick_term = "<leader>W", -- note: this is a telescope extension
new_wind = "<leader>w",
new_vert = "<leader>v",
new_hori = "<leader>h",
}, -- navigation in insert mode
insert_nav = {
forward = "<C-l>",
backward = "<C-h>",
top_of_line = "<C-a>",
end_of_line = "<C-e>",
prev_line = "<C-j>",
next_line = "<C-k>",
},
-- non plugin
misc = {
esc_Termmode = "jk", -- get out of terminal mode
close_buffer = "<S-x>", -- close current focused buffer
copywhole_file = "<C-a>",
toggle_linenr = "<leader>n", -- show or hide line number
theme_toggle = "<leader>x",
update_nvchad = "<leader>uu",
},
}
return M
-111
View File
@@ -1,111 +0,0 @@
local colors = require "themes/onedark"
require "nvim-web-devicons".setup {
override = {
html = {
icon = "",
color = colors.baby_pink,
name = "html"
},
css = {
icon = "",
color = colors.blue,
name = "css"
},
js = {
icon = "",
color = colors.sun,
name = "js"
},
ts = {
icon = "ﯤ",
color = colors.teal,
name = "ts"
},
kt = {
icon = "󱈙",
color = colors.orange,
name = "kt"
},
png = {
icon = "",
color = colors.dark_purple,
name = "png"
},
jpg = {
icon = "",
color = colors.dark_purple,
name = "jpg"
},
jpeg = {
icon = "",
color = "colors.dark_purple",
name = "jpeg"
},
mp3 = {
icon = "",
color = colors.white,
name = "mp3"
},
mp4 = {
icon = "",
color = colors.white,
name = "mp4"
},
out = {
icon = "",
color = colors.white,
name = "out"
},
Dockerfile = {
icon = "",
color = colors.cyan,
name = "Dockerfile"
},
rb = {
icon = "",
color = colors.pink,
name = "rb"
},
vue = {
icon = "﵂",
color = colors.vibrant_green,
name = "vue"
},
py = {
icon = "",
color = colors.cyan,
name = "py"
},
toml = {
icon = "",
color = colors.blue,
name = "toml"
},
lock = {
icon = "",
color = colors.red,
name = "lock"
},
zip = {
icon = "",
color = colors.sun,
name = "zip"
},
xz = {
icon = "",
color = colors.sun,
name = "xz"
},
deb = {
icon = "",
color = colors.cyan,
name = "deb"
},
rpm = {
icon = "",
color = colors.orange,
name = "rpm"
}
}
}
-27
View File
@@ -1,27 +0,0 @@
require("gitsigns").setup {
signs = {
add = {hl = "DiffAdd", text = "▌", numhl = "GitSignsAddNr"},
change = {hl = "DiffChange", text = "▌", numhl = "GitSignsChangeNr"},
delete = {hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr"},
topdelete = {hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr"},
changedelete = {hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr"}
},
numhl = false,
keymaps = {
-- Default keymap options
noremap = true,
buffer = true,
["n ]c"] = {expr = true, '&diff ? \']c\' : \'<cmd>lua require"gitsigns".next_hunk()<CR>\''},
["n [c"] = {expr = true, '&diff ? \'[c\' : \'<cmd>lua require"gitsigns".prev_hunk()<CR>\''},
["n <leader>hs"] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
["n <leader>hu"] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
["n <leader>hr"] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
["n <leader>hp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
["n <leader>hb"] = '<cmd>lua require"gitsigns".blame_line()<CR>'
},
watch_index = {
interval = 100
},
sign_priority = 5,
status_formatter = nil -- Use default
}
+44 -46
View File
@@ -1,6 +1,7 @@
local cmd = vim.cmd
local colors = require "themes/onedark"
local global_theme = "themes/" .. vim.g.nvchad_theme
local colors = require(global_theme)
local white = colors.white
local darker_black = colors.darker_black
@@ -8,8 +9,6 @@ local black = colors.black
local black2 = colors.black2
local one_bg = colors.one_bg
local one_bg2 = colors.one_bg2
local one_bg3 = colors.one_bg3
local light_grey = colors.light_grey
local grey = colors.grey
local grey_fg = colors.grey_fg
local red = colors.red
@@ -19,19 +18,21 @@ local nord_blue = colors.nord_blue
local blue = colors.blue
local yellow = colors.yellow
local purple = colors.purple
local pmenu_bg = colors.pmenu_bg
local folder_bg = colors.folder_bg
-- for guifg , bg
local function fg(group, color)
cmd("hi " .. group .. " guifg=" .. color)
cmd("hi " .. group .. " guifg=" .. color)
end
local function bg(group, color)
cmd("hi " .. group .. " guibg=" .. color)
cmd("hi " .. group .. " guibg=" .. color)
end
local function fg_bg(group, fgcol, bgcol)
cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol)
cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol)
end
-- blankline
@@ -40,15 +41,25 @@ fg("IndentBlanklineChar", line)
-- misc --
fg("LineNr", grey)
fg("Comment", grey)
-- Comments
local ui = require("utils").load_config().ui
if ui.italic_comments then
cmd("hi Comment gui=italic guifg=" .. grey_fg)
else
fg("Comment", grey_fg)
end
fg("NvimInternalError", red)
fg("VertSplit", line)
fg("EndOfBuffer", black)
-- fg_bg("Visual",light_grey, colors.lightbg)
-- Pmenu
bg("Pmenu", one_bg)
bg("PmenuSbar", one_bg2)
bg("PmenuSel", green)
bg("PmenuSel", pmenu_bg)
bg("PmenuThumb", nord_blue)
-- inactive statuslines as thin splitlines
@@ -60,19 +71,24 @@ fg("cursorlinenr", white)
-- git signs ---
fg_bg("DiffAdd", nord_blue, "none")
fg_bg("DiffChange", one_bg2, "none")
fg_bg("DiffChange", grey_fg, "none")
fg_bg("DiffModified", nord_blue, "none")
-- NvimTree
fg("NvimTreeFolderIcon", blue)
fg("NvimTreeFolderName", blue)
fg("NvimTreeFolderIcon", folder_bg)
fg("NvimTreeFolderName", folder_bg)
fg("NvimTreeGitDirty", red)
fg("NvimTreeOpenedFolderName", blue)
fg("NvimTreeEmptyFolderName", blue)
fg("NvimTreeIndentMarker", one_bg2)
fg("NvimTreeVertSplit", darker_black)
bg("NvimTreeVertSplit", darker_black)
fg("NvimTreeEndOfBuffer", darker_black)
fg("NvimTreeRootFolder", darker_black)
cmd("hi NvimTreeRootFolder gui=underline guifg=" .. red)
bg("NvimTreeNormal", darker_black)
fg_bg("NvimTreeStatuslineNc", darker_black, darker_black)
fg_bg("NvimTreeWindowPicker", red, black2)
-- telescope
fg("TelescopeBorder", line)
@@ -96,42 +112,24 @@ fg("LspDiagnosticsVirtualTextInformation", green)
fg("LspDiagnosticsSignHint", purple)
fg("LspDiagnosticsVirtualTextHint", purple)
-- bufferline
fg_bg("BufferLineFill", grey_fg, black2)
fg_bg("BufferLineBackground", light_grey, black2)
fg_bg("BufferLineBufferVisible", light_grey, black2)
fg_bg("BufferLineBufferSelected", white, black)
cmd "hi BufferLineBufferSelected gui=bold"
-- tabs
fg_bg("BufferLineTab", light_grey, one_bg3)
fg_bg("BufferLineTabSelected", black2, nord_blue)
fg_bg("BufferLineTabClose", red, black)
fg_bg("BufferLineIndicator", black2, black2)
fg_bg("BufferLineIndicatorSelected", black, black)
-- separators
fg_bg("BufferLineSeparator", line, black2)
fg_bg("BufferLineSeparatorVisible", line, black2)
fg_bg("BufferLineSeparatorSelected", black, black2)
-- modified buffers
fg_bg("BufferLineModified", red, black2)
fg_bg("BufferLineModifiedVisible", red, black2)
fg_bg("BufferLineModifiedSelected", green, black)
-- close buttons
fg_bg("BufferLineCLoseButtonVisible", light_grey, black2)
fg_bg("BufferLineCLoseButton", light_grey, black2)
fg_bg("BufferLineCLoseButtonSelected", red, black)
-- dashboard
fg("DashboardHeader", grey_fg)
fg("DashboardCenter", grey_fg)
fg("DashboardShortcut", grey_fg)
fg("DashboardFooter", black)
fg("DashboardFooter", grey_fg)
if require("utils").load_config().ui.transparency then
bg("Normal", "NONE")
bg("Folded", "NONE")
fg("Folded", "NONE")
bg("NvimTreeNormal", "NONE")
bg("NvimTreeVertSplit", "NONE")
fg("NvimTreeVertSplit", grey)
bg("NvimTreeStatusLineNC", "NONE")
fg("Comment", grey)
end
-- For floating windows
bg("NormalFloat", one_bg)
fg("FloatBorder", blue)
+178 -25
View File
@@ -1,35 +1,188 @@
local function map(mode, lhs, rhs, opts)
local options = {noremap = true}
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
local user_map = require("utils").load_config().mappings
local miscMap = user_map.misc
local cmd = vim.cmd
local function map(mode, lhs, rhs, opts)
local options = { noremap = true, silent = true }
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
local M = {}
local opt = {}
-- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them!
--[[ remove this line
-- these mappings will only be called during initialization
M.misc = function()
-- dont copy any deleted text , this is disabled by default so uncomment the below mappings if you want them
-- map("n", "dd", [=[ "_dd ]=], opt)
-- map("v", "dd", [=[ "_dd ]=], opt)
-- map("v", "x", [=[ "_x ]=], opt)
-- todo: this should be configurable via chadrc
map("n", "dd", [=[ "_dd ]=], opt)
map("v", "dd", [=[ "_dd ]=], opt)
map("v", "x", [=[ "_x ]=], opt)
-- Don't copy the replaced text after pasting in visual mode
map("v", "p", '"_dP', opt)
this line too ]]
-- OPEN TERMINALS --
map("n", "<C-l>", [[<Cmd>vnew term://bash <CR>]], opt) -- term over right
map("n", "<C-x>", [[<Cmd> split term://bash | resize 10 <CR>]], opt) -- term bottom
map("n", "<C-t>t", [[<Cmd> tabnew | term <CR>]], opt) -- term newtab
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
-- http://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
-- empty mode is same as using :map
map("", "j", 'v:count ? "j" : "gj"', { expr = true })
map("", "k", 'v:count ? "k" : "gk"', { expr = true })
map("", "<Down>", 'v:count ? "j" : "gj"', { expr = true })
map("", "<Up>", 'v:count ? "k" : "gk"', { expr = true })
-- COPY EVERYTHING --
map("n", "<C-a>", [[ <Cmd> %y+<CR>]], opt)
-- copy whole file content
map("n", miscMap.copywhole_file, ":%y+<CR>", opt)
-- toggle numbers ---
map("n", "<leader>n", [[ <Cmd> set nu!<CR>]], opt)
-- toggle numbers
map("n", miscMap.toggle_linenr, ":set nu!<CR>", opt)
-- toggle truezen.nvim's ataraxis and minimalist mode
map("n", "<leader>z", [[ <Cmd> TZAtaraxis<CR>]], opt)
map("n", "<leader>m", [[ <Cmd> TZMinimalist<CR>]], opt)
-- terminals
local function terms()
local m = user_map.terms
map("n", "<C-s>", [[ <Cmd> w <CR>]], opt)
-- vim.cmd("inoremap jh <Esc>")
-- get out of terminal mode
map("t", m.esc_termmode, "<C-\\><C-n>", opt)
-- hide a term from within terminal mode
map("t", m.esc_hide_termmode, "<C-\\><C-n> :lua require('utils').close_buffer() <CR>", opt)
-- pick a hidden term
map("n", m.pick_term, ":Telescope terms <CR>", opt)
-- Open terminals
-- TODO this opens on top of an existing vert/hori term, fixme
map("n", m.new_wind, ":execute 'terminal' | let b:term_type = 'wind' | startinsert <CR>", opt)
map("n", m.new_vert, ":execute 'vnew +terminal' | let b:term_type = 'vert' | startinsert <CR>", opt)
map("n", m.new_hori, ":execute 15 .. 'new +terminal' | let b:term_type = 'hori' | startinsert <CR>", opt)
end
terms()
-- ctrl + s to save file
map("n", "<C-s>", ":w <CR>", opt)
-- use ESC to turn off search highlighting
map("n", "<Esc>", ":noh<CR>", opt)
-- navigation within insert mode
local check_insertNav = require("utils").load_config().options.enable_insertNav
if check_insertNav == true then
local m = user_map.insert_nav
map("i", m.forward, "<Right>", opt)
map("i", m.backward, "<Left>", opt)
map("i", m.top_of_line, "<ESC>^i", opt)
map("i", m.end_of_line, "<End>", opt)
map("i", m.next_line, "<Up>", opt)
map("i", m.prev_line, "<Down>", opt)
end
-- check the theme toggler
local theme_toggler = require("utils").load_config().ui.theme_toggler
if theme_toggler == true then
local m = user_map.misc.theme_toggle
map("n", m, ":lua require('utils').toggle_theme(require('utils').load_config().ui.fav_themes)<CR>", opt)
end
-- Packer commands till because we are not loading it at startup
cmd "silent! command PackerCompile lua require 'pluginList' require('packer').compile()"
cmd "silent! command PackerInstall lua require 'pluginList' require('packer').install()"
cmd "silent! command PackerStatus lua require 'pluginList' require('packer').status()"
cmd "silent! command PackerSync lua require 'pluginList' require('packer').sync()"
cmd "silent! command PackerUpdate lua require 'pluginList' require('packer').update()"
-- add NvChadUpdate command and mapping
cmd "silent! command! NvChadUpdate lua require('utils').update_nvchad()"
map("n", user_map.misc.update_nvchad, ":NvChadUpdate<CR>", opt)
end
M.bufferline = function()
local m = user_map.bufferline
map("n", m.new_buffer, ":enew<CR>", opt) -- new buffer
map("n", m.newtab, ":tabnew<CR>", opt) -- new tab
map("n", m.close, ":lua require('utils').close_buffer() <CR>", opt) -- close buffer
-- move between tabs
map("n", m.cycleNext, ":BufferLineCycleNext<CR>", opt)
map("n", m.cyclePrev, ":BufferLineCyclePrev<CR>", opt)
end
M.chadsheet = function()
local m = user_map.chadsheet
map("n", m.default_keys, ":lua require('cheatsheet').show_cheatsheet_telescope()<CR>", opt)
map(
"n",
m.user_keys,
":lua require('cheatsheet').show_cheatsheet_telescope{bundled_cheatsheets = false, bundled_plugin_cheatsheets = false }<CR>",
opt
)
end
M.comment_nvim = function()
local m = user_map.comment_nvim.comment_toggle
map("n", m, ":CommentToggle<CR>", opt)
map("v", m, ":CommentToggle<CR>", opt)
end
M.dashboard = function()
local m = user_map.dashboard
map("n", m.open, ":Dashboard<CR>", opt)
map("n", m.newfile, ":DashboardNewFile<CR>", opt)
map("n", m.bookmarks, ":DashboardJumpMarks<CR>", opt)
map("n", m.sessionload, ":SessionLoad<CR>", opt)
map("n", m.sessionsave, ":SessionSave<CR>", opt)
end
M.fugitive = function()
local m = user_map.fugitive
map("n", m.Git, ":Git<CR>", opt)
map("n", m.diffget_2, ":diffget //2<CR>", opt)
map("n", m.diffget_3, ":diffget //3<CR>", opt)
map("n", m.git_blame, ":Git blame<CR>", opt)
end
M.nvimtree = function()
local m = user_map.nvimtree.treetoggle
map("n", m, ":NvimTreeToggle<CR>", opt)
end
M.neoformat = function()
local m = user_map.neoformat.format
map("n", m, ":Neoformat<CR>", opt)
end
M.truezen = function()
local m = user_map.truezen
map("n", m.ataraxisMode, ":TZAtaraxis<CR>", opt)
map("n", m.minimalisticmode, ":TZMinimalist<CR>", opt)
map("n", m.focusmode, ":TZFocus<CR>", opt)
end
M.telescope = function()
local m = user_map.telescope
map("n", m.live_grep, ":Telescope live_grep<CR>", opt)
map("n", m.git_status, ":Telescope git_status <CR>", opt)
map("n", m.git_commits, ":Telescope git_commits <CR>", opt)
map("n", m.find_files, ":Telescope find_files <CR>", opt)
map("n", m.buffers, ":Telescope buffers<CR>", opt)
map("n", m.help_tags, ":Telescope help_tags<CR>", opt)
map("n", m.oldfiles, ":Telescope oldfiles<CR>", opt)
map("n", m.themes, ":Telescope themes<CR>", opt)
end
M.telescope_media = function()
local m = user_map.telescope_media
map("n", m.media_files, ":Telescope media_files <CR>", opt)
end
return M
-45
View File
@@ -1,45 +0,0 @@
local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
local function opt(scope, key, value)
scopes[scope][key] = value
if scope ~= "o" then
scopes["o"][key] = value
end
end
opt("o", "hidden", true)
opt("o", "ignorecase", true)
opt("o", "splitbelow", true)
opt("o", "splitright", true)
opt("o", "termguicolors", true)
opt("w", "number", true)
opt("o", "numberwidth", 2)
opt("w", "cul", true)
opt("o", "mouse", "a")
opt("w", "signcolumn", "yes")
opt("o", "cmdheight", 1)
opt("o", "updatetime", 250) -- update interval for gitsigns
opt("o", "clipboard", "unnamedplus")
opt("o", "timeoutlen", 500)
-- for indenline
opt("b", "expandtab", true)
opt("b", "shiftwidth", 2)
local M = {}
function M.is_buffer_empty()
-- Check whether the current buffer is empty
return vim.fn.empty(vim.fn.expand("%:t")) == 1
end
function M.has_width_gt(cols)
-- Check if the windows width is greater than a given number of columns
return vim.fn.winwidth(0) / 2 > cols
end
-- file extension specific tabbing
vim.cmd([[autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4]])
return M
-90
View File
@@ -1,90 +0,0 @@
function on_attach(client, bufnr)
local function buf_set_keymap(...)
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
local function buf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
-- Mappings.
local opts = {noremap = true, silent = true}
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
buf_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
buf_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
buf_set_keymap("n", "<space>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
buf_set_keymap("n", "<space>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
buf_set_keymap("n", "<space>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts)
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
elseif client.resolved_capabilities.document_range_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
end
end
-- lspInstall + lspconfig stuff
local function setup_servers()
require "lspinstall".setup()
local lspconf = require("lspconfig")
local servers = require "lspinstall".installed_servers()
for _, lang in pairs(servers) do
if lang ~= "lua" then
lspconf[lang].setup {
on_attach = on_attach,
root_dir = vim.loop.cwd
}
elseif lang == "lua" then
lspconf[lang].setup {
root_dir = function()
return vim.loop.cwd()
end,
settings = {
Lua = {
diagnostics = {
globals = {"vim"}
},
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true
}
},
telemetry = {
enable = false
}
}
}
}
end
end
end
setup_servers()
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
require "lspinstall".post_install_hook = function()
setup_servers() -- reload installed servers
vim.cmd("bufdo e") -- this triggers the FileType autocmd that starts the server
end
-- replace the default lsp diagnostic letters with prettier symbols
vim.fn.sign_define("LspDiagnosticsSignError", {text = "", numhl = "LspDiagnosticsDefaultError"})
vim.fn.sign_define("LspDiagnosticsSignWarning", {text = "", numhl = "LspDiagnosticsDefaultWarning"})
vim.fn.sign_define("LspDiagnosticsSignInformation", {text = "", numhl = "LspDiagnosticsDefaultInformation"})
vim.fn.sign_define("LspDiagnosticsSignHint", {text = "", numhl = "LspDiagnosticsDefaultHint"})
-93
View File
@@ -1,93 +0,0 @@
local g = vim.g
vim.o.termguicolors = true
g.nvim_tree_side = "left"
g.nvim_tree_width = 25
g.nvim_tree_ignore = {".git", "node_modules", ".cache"}
g.nvim_tree_auto_open = 0
g.nvim_tree_auto_close = 0
g.nvim_tree_quit_on_open = 0
g.nvim_tree_follow = 1
g.nvim_tree_indent_markers = 1
g.nvim_tree_hide_dotfiles = 1
g.nvim_tree_git_hl = 1
g.nvim_tree_root_folder_modifier = ":t"
g.nvim_tree_tab_open = 0
g.nvim_tree_allow_resize = 1
g.nvim_tree_show_icons = {
git = 1,
folders = 1,
files = 1
}
g.nvim_tree_icons = {
default = "",
symlink = "",
git = {
unstaged = "✗",
staged = "✓",
unmerged = "",
renamed = "➜",
untracked = "★",
deleted = "",
ignored = "◌"
},
folder = {
default = "",
open = "",
symlink = "",
empty = "",
empty_open = "",
symlink_open = ""
}
}
-- Mappings for nvimtree
vim.api.nvim_set_keymap(
"n",
"<C-n>",
":NvimTreeToggle<CR>",
{
noremap = true,
silent = true
}
)
local tree_cb = require "nvim-tree.config".nvim_tree_callback
g.nvim_tree_bindings = {
["u"] = ":lua require'some_module'.some_function()<cr>",
-- default mappings
["<CR>"] = tree_cb("edit"),
["o"] = tree_cb("edit"),
["<2-LeftMouse>"] = tree_cb("edit"),
["<2-RightMouse>"] = tree_cb("cd"),
["<C-]>"] = tree_cb("cd"),
["<C-v>"] = tree_cb("vsplit"),
["<C-x>"] = tree_cb("split"),
["<C-t>"] = tree_cb("tabnew"),
["<"] = tree_cb("prev_sibling"),
[">"] = tree_cb("next_sibling"),
["<BS>"] = tree_cb("close_node"),
["<S-CR>"] = tree_cb("close_node"),
["<Tab>"] = tree_cb("preview"),
["I"] = tree_cb("toggle_ignored"),
["H"] = tree_cb("toggle_dotfiles"),
["R"] = tree_cb("refresh"),
["a"] = tree_cb("create"),
["d"] = tree_cb("remove"),
["r"] = tree_cb("rename"),
["<C-r>"] = tree_cb("full_rename"),
["x"] = tree_cb("cut"),
["c"] = tree_cb("copy"),
["p"] = tree_cb("paste"),
["y"] = tree_cb("copy_name"),
["Y"] = tree_cb("copy_path"),
["gy"] = tree_cb("copy_absolute_path"),
["[c"] = tree_cb("prev_git_item"),
["]c"] = tree_cb("next_git_item"),
["-"] = tree_cb("dir_up"),
["q"] = tree_cb("close")
}
+88
View File
@@ -0,0 +1,88 @@
local opt = vim.opt
local g = vim.g
-- export user config as a global varibale
g.nvchad_user_config = "chadrc"
local options = require("utils").load_config().options
opt.completeopt = { "menuone", "noselect" }
opt.undofile = options.permanent_undo
opt.ruler = options.ruler
opt.hidden = options.hidden
opt.ignorecase = options.ignorecase
opt.splitbelow = true
opt.splitright = true
opt.termguicolors = true
opt.cul = true
opt.mouse = options.mouse
opt.signcolumn = "yes"
opt.cmdheight = options.cmdheight
opt.updatetime = options.updatetime -- update interval for gitsigns
opt.timeoutlen = options.timeoutlen
opt.clipboard = options.clipboard
-- disable nvim intro
opt.shortmess:append "sI"
-- disable tilde on end of buffer: https://github.com/ neovim/neovim/pull/8546#issuecomment-643643758
opt.fillchars = { eob = " " }
-- Numbers
opt.number = options.number
opt.numberwidth = options.numberwidth
opt.relativenumber = options.relativenumber
-- Indenline
opt.expandtab = options.expandtab
opt.shiftwidth = options.shiftwidth
opt.smartindent = options.smartindent
-- go to previous/next line with h,l,left arrow and right arrow
-- when cursor reaches end/beginning of line
opt.whichwrap:append "<>hl"
g.mapleader = options.mapleader
g.auto_save = options.autosave
-- disable builtin vim plugins
local disabled_built_ins = {
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"gzip",
"zip",
"zipPlugin",
"tar",
"tarPlugin",
"getscript",
"getscriptPlugin",
"vimball",
"vimballPlugin",
"2html_plugin",
"logipat",
"rrhelper",
"spellfile_plugin",
"matchit",
}
for _, plugin in pairs(disabled_built_ins) do
g["loaded_" .. plugin] = 1
end
-- Use relative & absolute line numbers in 'n' & 'i' modes respectively
-- vim.cmd[[ au InsertEnter * set norelativenumber ]]
-- vim.cmd[[ au InsertLeave * set relativenumber ]]
-- Don't show any numbers inside terminals
vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]]
-- Don't show status line on certain windows
vim.cmd [[ au TermOpen term://* setfiletype terminal ]]
vim.cmd [[ let hidden_statusline = luaeval('require("utils").load_config().ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]]
-- Open a file from its last left off position
-- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
-- File extension specific tabbing
-- vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]]
+45
View File
@@ -0,0 +1,45 @@
local cmd = vim.cmd
cmd "packadd packer.nvim"
local present, packer = pcall(require, "packer")
if not present then
local packer_path = vim.fn.stdpath "data" .. "/site/pack/packer/opt/packer.nvim"
print "Cloning packer.."
-- remove the dir before cloning
vim.fn.delete(packer_path, "rf")
vim.fn.system {
"git",
"clone",
"https://github.com/wbthomason/packer.nvim",
"--depth",
"20",
packer_path,
}
cmd "packadd packer.nvim"
present, packer = pcall(require, "packer")
if present then
print "Packer cloned successfully."
else
error("Couldn't clone packer !\nPacker path: " .. packer_path)
end
end
return packer.init {
display = {
open_fn = function()
return require("packer.util").float { border = "single" }
end,
prompt_border = "single",
},
git = {
clone_timeout = 600, -- Timeout, in seconds, for git clones
},
auto_clean = true,
compile_on_sync = true,
-- auto_reload_compiled = true
}
+309 -46
View File
@@ -1,54 +1,317 @@
local packer = require("packer")
local plugin_status = require("utils").load_config().plugin_status
local present, _ = pcall(require, "packerInit")
local packer
if present then
packer = require "packer"
else
return false
end
local use = packer.use
-- using { } for using different branch , loading plugin with certain commands etc
return packer.startup(
function()
use "wbthomason/packer.nvim"
return packer.startup(function()
use {
"wbthomason/packer.nvim",
event = "VimEnter",
}
-- color related stuff
use "siduck76/nvim-base16.lua"
use "norcalli/nvim-colorizer.lua"
use {
"jdhao/better-escape.vim",
disable = not plugin_status.better_esc,
event = "InsertEnter",
config = function()
require("plugins.others").escape()
end,
}
-- lang stuff
use "nvim-treesitter/nvim-treesitter"
use "neovim/nvim-lspconfig"
use "hrsh7th/nvim-compe"
use "onsails/lspkind-nvim"
use "sbdchd/neoformat"
use "nvim-lua/plenary.nvim"
use "kabouzeid/nvim-lspinstall"
use {
"glepnir/galaxyline.nvim",
disable = not plugin_status.galaxyline,
after = "nvim-web-devicons",
config = function()
require "plugins.statusline"
end,
}
use {
"akinsho/nvim-bufferline.lua",
disable = not plugin_status.nvim_bufferline,
after = "galaxyline.nvim",
config = function()
require "plugins.bufferline"
end,
setup = function()
require("mappings").bufferline()
end,
}
use "lewis6991/gitsigns.nvim"
use "akinsho/nvim-bufferline.lua"
use "glepnir/galaxyline.nvim"
use "windwp/nvim-autopairs"
use "alvan/vim-closetag"
-- color related stuff
use {
"NvChad/nvim-base16.lua",
after = "packer.nvim",
config = function()
require "theme"
end,
}
-- snippet support
use "hrsh7th/vim-vsnip"
use "rafamadriz/friendly-snippets"
use {
"norcalli/nvim-colorizer.lua",
disable = not plugin_status.nvim_colorizer,
event = "BufRead",
config = function()
require("plugins.others").colorizer()
end,
}
-- file managing , picker etc
use "kyazdani42/nvim-tree.lua"
use "kyazdani42/nvim-web-devicons"
use "ryanoasis/vim-devicons"
use "nvim-telescope/telescope.nvim"
use "nvim-telescope/telescope-media-files.nvim"
use "nvim-lua/popup.nvim"
-- lsp stuff
use {
"nvim-treesitter/nvim-treesitter",
event = "BufRead",
config = function()
require "plugins.treesitter"
end,
}
-- misc
use "glepnir/dashboard-nvim"
use "tweekmonster/startuptime.vim"
use "907th/vim-auto-save"
use "karb94/neoscroll.nvim"
use "kdav5758/TrueZen.nvim"
use "folke/which-key.nvim"
use {"lukas-reineke/indent-blankline.nvim", branch = "lua"}
end,
{
display = {
border = {"┌", "─", "┐", "│", "┘", "─", "└", "│"}
}
}
)
use {
"kabouzeid/nvim-lspinstall",
event = "BufRead",
}
use {
"neovim/nvim-lspconfig",
after = "nvim-lspinstall",
config = function()
require "plugins.lspconfig"
end,
}
use {
"onsails/lspkind-nvim",
disable = not plugin_status.lspkind,
event = "BufEnter",
config = function()
require("plugins.others").lspkind()
end,
}
use {
"ray-x/lsp_signature.nvim",
disable = not plugin_status.lspsignature,
after = "nvim-lspconfig",
config = function()
require("plugins.others").signature()
end,
}
-- load compe in insert mode only
use {
"hrsh7th/nvim-compe",
event = "InsertEnter",
config = function()
require "plugins.compe"
end,
wants = "LuaSnip",
requires = {
{
"L3MON4D3/LuaSnip",
wants = "friendly-snippets",
event = "InsertCharPre",
config = function()
require "plugins.luasnip"
end,
},
{
"rafamadriz/friendly-snippets",
event = "InsertCharPre",
},
},
}
use {
"sbdchd/neoformat",
disable = not plugin_status.neoformat,
cmd = "Neoformat",
setup = function()
require("mappings").neoformat()
end,
}
-- file managing , picker etc
use {
"kyazdani42/nvim-tree.lua",
cmd = "NvimTreeToggle",
config = function()
require "plugins.nvimtree"
end,
setup = function()
require("mappings").nvimtree()
end,
}
use {
"kyazdani42/nvim-web-devicons",
after = "nvim-base16.lua",
config = function()
require "plugins.icons"
end,
}
use {
"nvim-lua/plenary.nvim",
after = "nvim-bufferline.lua",
}
use {
"nvim-lua/popup.nvim",
after = "plenary.nvim",
}
use {
"nvim-telescope/telescope.nvim",
after = "plenary.nvim",
requires = {
{
"nvim-telescope/telescope-fzf-native.nvim",
run = "make",
},
{
"nvim-telescope/telescope-media-files.nvim",
disable = not plugin_status.telescope_media,
setup = function()
require("mappings").telescope_media()
end,
},
{
"sudormrfbin/cheatsheet.nvim",
disable = not plugin_status.cheatsheet,
event = "VimEnter",
after = "telescope.nvim",
config = function()
require "plugins.chadsheet"
end,
setup = function()
require("mappings").chadsheet()
end,
},
},
config = function()
require "plugins.telescope"
end,
setup = function()
require("mappings").telescope()
end,
}
-- git stuff
use {
"lewis6991/gitsigns.nvim",
disable = not plugin_status.gitsigns,
after = "plenary.nvim",
config = function()
require "plugins.gitsigns"
end,
}
-- misc plugins
use {
"windwp/nvim-autopairs",
after = "nvim-compe",
config = function()
require "plugins.autopairs"
end,
}
use {
"andymass/vim-matchup",
disable = not plugin_status.vim_matchup,
event = "CursorMoved",
}
use {
"terrortylor/nvim-comment",
disable = not plugin_status.nvim_comment,
cmd = "CommentToggle",
config = function()
require("plugins.others").comment()
end,
setup = function()
require("mappings").comment_nvim()
end,
}
use {
"glepnir/dashboard-nvim",
disable = not plugin_status.dashboard_nvim,
cmd = {
"Dashboard",
"DashboardNewFile",
"DashboardJumpMarks",
"SessionLoad",
"SessionSave",
},
setup = function()
require "plugins.dashboard"
require("mappings").dashboard()
end,
}
-- load autosave only if its globally enabled
use {
disable = not plugin_status.autosave_nvim,
"Pocco81/AutoSave.nvim",
config = function()
require "plugins.autosave"
end,
cond = function()
return vim.g.auto_save == true
end,
}
-- smooth scroll
use {
"karb94/neoscroll.nvim",
disable = not plugin_status.neoscroll_nvim,
event = "WinScrolled",
config = function()
require("plugins.others").neoscroll()
end,
}
use {
"Pocco81/TrueZen.nvim",
disable = not plugin_status.truezen_nvim,
cmd = {
"TZAtaraxis",
"TZMinimalist",
"TZFocus",
},
config = function()
require "plugins.zenmode"
end,
setup = function()
require("mappings").truezen()
end,
}
-- use "alvan/vim-closetag" -- for html autoclosing tag
use {
"lukas-reineke/indent-blankline.nvim",
disable = not plugin_status.blankline,
event = "BufRead",
setup = function()
require("plugins.others").blankline()
end,
}
use {
"tpope/vim-fugitive",
disable = not plugin_status.vim_fugitive,
cmd = {
"Git",
},
setup = function()
require("mappings").fugitive()
end,
}
end)
+12
View File
@@ -0,0 +1,12 @@
local present1, autopairs = pcall(require, "nvim-autopairs")
local present2, autopairs_completion = pcall(require, "nvim-autopairs.completion.compe")
if not (present1 or present2) then
return
end
autopairs.setup()
autopairs_completion.setup {
map_cr = true,
map_complete = true, -- insert () func completion
}
+19
View File
@@ -0,0 +1,19 @@
-- autosave.nvim plugin disabled by default
local present, autosave = pcall(require, "autosave")
if not present then
return
end
autosave.setup {
enabled = vim.g.auto_save, -- takes boolean value from init.lua
execution_message = "autosaved at : " .. vim.fn.strftime "%H:%M:%S",
events = { "InsertLeave", "TextChanged" },
conditions = {
exists = true,
filetype_is_not = {},
modifiable = true,
},
write_all_buffers = false,
on_off_commands = true,
clean_command_line_interval = 2500,
}
+123
View File
@@ -0,0 +1,123 @@
local global_theme = "themes/" .. vim.g.nvchad_theme
local colors = require(global_theme)
local present, bufferline = pcall(require, "bufferline")
if not present then
return
end
bufferline.setup {
options = {
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
buffer_close_icon = "",
modified_icon = "",
close_icon = "",
left_trunc_marker = "",
right_trunc_marker = "",
max_name_length = 14,
max_prefix_length = 13,
tab_size = 20,
show_tab_indicators = true,
enforce_regular_tabs = false,
view = "multiwindow",
show_buffer_close_icons = true,
separator_style = "thin",
mappings = true,
always_show_bufferline = true,
custom_filter = function(buf_number)
-- Func to filter out our managed/persistent split terms
local present_type, type = pcall(function()
return vim.api.nvim_buf_get_var(buf_number, "term_type")
end)
if present_type then
if type == "vert" then
return false
elseif type == "hori" then
return false
else
return true
end
else
return true
end
end,
},
highlights = {
fill = {
guifg = colors.grey_fg,
guibg = colors.black2,
},
background = {
guifg = colors.grey_fg,
guibg = colors.black2,
},
-- buffers
buffer_visible = {
guifg = colors.light_grey,
guibg = colors.black2,
},
buffer_selected = {
guifg = colors.white,
guibg = colors.black,
gui = "bold",
},
-- tabs
tab = {
guifg = colors.light_grey,
guibg = colors.one_bg3,
},
tab_selected = {
guifg = colors.black2,
guibg = colors.nord_blue,
},
tab_close = {
guifg = colors.red,
guibg = colors.black,
},
indicator_selected = {
guifg = colors.black,
guibg = colors.black,
},
-- separators
separator = {
guifg = colors.black2,
guibg = colors.black2,
},
separator_visible = {
guifg = colors.black2,
guibg = colors.black2,
},
separator_selected = {
guifg = colors.black2,
guibg = colors.black2,
},
-- modified
modified = {
guifg = colors.red,
guibg = colors.black2,
},
modified_visible = {
guifg = colors.red,
guibg = colors.black2,
},
modified_selected = {
guifg = colors.green,
guibg = colors.black,
},
-- close buttons
close_button = {
guifg = colors.light_grey,
guibg = colors.black2,
},
close_button_visible = {
guifg = colors.light_grey,
guibg = colors.black2,
},
close_button_selected = {
guifg = colors.red,
guibg = colors.black,
},
},
}
+25
View File
@@ -0,0 +1,25 @@
local present, chadsheet = pcall(require, "cheatsheet")
if not present then
return
end
local mappings = require("utils").load_config().mappings
-- add user mappings to the cheetsheet
for section, data in pairs(mappings) do
for description, keymap in pairs(data) do
chadsheet.add_cheat(description, keymap, section)
end
end
require("cheatsheet").setup {
bundled_cheatsheets = {
enabled = { "default" },
disabled = { "unicode", "nerd-fonts" },
},
bundled_plugin_cheatsheets = false,
include_only_installed_plugins = true,
}
+25
View File
@@ -0,0 +1,25 @@
local present, compe = pcall(require, "compe")
if not present then
return
end
compe.setup {
enabled = true,
autocomplete = true,
debug = false,
min_length = 1,
preselect = "enable",
throttle_time = 80,
source_timeout = 200,
incomplete_delay = 400,
max_abbr_width = 100,
max_kind_width = 100,
max_menu_width = 100,
documentation = true,
source = {
buffer = { kind = "﬘", true },
luasnip = { kind = "﬌", true },
nvim_lsp = true,
nvim_lua = true,
},
}
+40
View File
@@ -0,0 +1,40 @@
local g = vim.g
local fn = vim.fn
local plugins_count = fn.len(fn.globpath("~/.local/share/nvim/site/pack/packer/start", "*", 0, 1))
g.dashboard_disable_at_vimenter = 1 -- dashboard is disabled by default
g.dashboard_disable_statusline = 1
g.dashboard_default_executive = "telescope"
g.dashboard_custom_header = {
" ",
" ",
" ",
" ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ",
" ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
" ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
" ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ",
" ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ",
" ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ",
" ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ",
" ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ",
" ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ",
" ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ",
" ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ",
" ",
}
g.dashboard_custom_section = {
a = { description = { " Find File SPC f f" }, command = "Telescope find_files" },
b = { description = { " Recents SPC f o" }, command = "Telescope oldfiles" },
c = { description = { " Find Word SPC f w" }, command = "Telescope live_grep" },
d = { description = { "洛 New File SPC f n" }, command = "DashboardNewFile" },
e = { description = { " Bookmarks SPC b m" }, command = "Telescope marks" },
f = { description = { " Load Last Session SPC s l" }, command = "SessionLoad" },
}
g.dashboard_custom_footer = {
" ",
-- "NvChad Loaded " .. plugins_count .. " plugins",
"NvChad v0.5",
}
+32
View File
@@ -0,0 +1,32 @@
local present, gitsigns = pcall(require, "gitsigns")
if not present then
return
end
gitsigns.setup {
signs = {
add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" },
change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" },
delete = { hl = "DiffDelete", text = "_", numhl = "GitSignsDeleteNr" },
topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" },
changedelete = { hl = "DiffChange", text = "~", numhl = "GitSignsChangeNr" },
},
numhl = false,
keymaps = {
-- Default keymap options
noremap = true,
buffer = true,
["n ]c"] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns\".next_hunk()<CR>'" },
["n [c"] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns\".prev_hunk()<CR>'" },
["n <leader>hs"] = '<cmd>lua require"gitsigns".stage_hunk()<CR>',
["n <leader>hu"] = '<cmd>lua require"gitsigns".undo_stage_hunk()<CR>',
["n <leader>hr"] = '<cmd>lua require"gitsigns".reset_hunk()<CR>',
["n <leader>hp"] = '<cmd>lua require"gitsigns".preview_hunk()<CR>',
["n <leader>hb"] = '<cmd>lua require"gitsigns".blame_line()<CR>',
},
watch_index = {
interval = 100,
},
sign_priority = 5,
status_formatter = nil, -- Use default
}
+122
View File
@@ -0,0 +1,122 @@
local present, icons = pcall(require, "nvim-web-devicons")
if not present then
return
end
local global_theme = "themes/" .. vim.g.nvchad_theme
local colors = require(global_theme)
icons.setup {
override = {
html = {
icon = "",
color = colors.baby_pink,
name = "html",
},
css = {
icon = "",
color = colors.blue,
name = "css",
},
js = {
icon = "",
color = colors.sun,
name = "js",
},
ts = {
icon = "ﯤ",
color = colors.teal,
name = "ts",
},
kt = {
icon = "󱈙",
color = colors.orange,
name = "kt",
},
png = {
icon = "",
color = colors.dark_purple,
name = "png",
},
jpg = {
icon = "",
color = colors.dark_purple,
name = "jpg",
},
jpeg = {
icon = "",
color = colors.dark_purple,
name = "jpeg",
},
mp3 = {
icon = "",
color = colors.white,
name = "mp3",
},
mp4 = {
icon = "",
color = colors.white,
name = "mp4",
},
out = {
icon = "",
color = colors.white,
name = "out",
},
Dockerfile = {
icon = "",
color = colors.cyan,
name = "Dockerfile",
},
rb = {
icon = "",
color = colors.pink,
name = "rb",
},
vue = {
icon = "﵂",
color = colors.vibrant_green,
name = "vue",
},
py = {
icon = "",
color = colors.cyan,
name = "py",
},
toml = {
icon = "",
color = colors.blue,
name = "toml",
},
lock = {
icon = "",
color = colors.red,
name = "lock",
},
zip = {
icon = "",
color = colors.sun,
name = "zip",
},
xz = {
icon = "",
color = colors.sun,
name = "xz",
},
deb = {
icon = "",
color = colors.cyan,
name = "deb",
},
rpm = {
icon = "",
color = colors.orange,
name = "rpm",
},
lua = {
icon = "",
color = colors.blue,
name = "lua",
},
},
}
+123
View File
@@ -0,0 +1,123 @@
local present1, lspconfig = pcall(require, "lspconfig")
local present2, lspinstall = pcall(require, "lspinstall")
if not (present1 or present2) then
return
end
local function on_attach(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
local opts = { noremap = true, silent = true }
local function buf_set_keymap(...)
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
-- Mappings.
buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
buf_set_keymap("n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
buf_set_keymap("n", "<space>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
buf_set_keymap("n", "<space>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", opts)
buf_set_keymap("n", "<space>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", opts)
buf_set_keymap("n", "<space>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts)
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
elseif client.resolved_capabilities.document_range_formatting then
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR>", opts)
end
end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
-- lspInstall + lspconfig stuff
local function setup_servers()
lspinstall.setup()
local servers = lspinstall.installed_servers()
for _, lang in pairs(servers) do
if lang ~= "lua" then
lspconfig[lang].setup {
on_attach = on_attach,
capabilities = capabilities,
root_dir = vim.loop.cwd,
}
elseif lang == "lua" then
lspconfig[lang].setup {
root_dir = vim.loop.cwd,
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
},
maxPreload = 100000,
preloadFileSize = 10000,
},
telemetry = {
enable = false,
},
},
},
}
end
end
end
setup_servers()
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim
lspinstall.post_install_hook = function()
setup_servers() -- reload installed servers
vim.cmd "bufdo e"
end
-- replace the default lsp diagnostic symbols
function lspSymbol(name, icon)
vim.fn.sign_define("LspDiagnosticsSign" .. name, { text = icon, numhl = "LspDiagnosticsDefaul" .. name })
end
lspSymbol("Error", "")
lspSymbol("Warning", "")
lspSymbol("Information", "")
lspSymbol("Hint", "")
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = {
prefix = "",
spacing = 0,
},
signs = true,
underline = true,
-- set this to true if you want diagnostics to show in insert mode
update_in_insert = false,
})
-- suppress error messages from lang servers
vim.notify = function(msg, log_level, _opts)
if msg:match "exit code" then
return
end
if log_level == vim.log.levels.ERROR then
vim.api.nvim_err_writeln(msg)
else
vim.api.nvim_echo({ { msg } }, true, {})
end
end
+66
View File
@@ -0,0 +1,66 @@
local present, luasnip = pcall(require, "luasnip")
if not present then
return
end
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local check_back_space = function()
local col = vim.fn.col "." - 1
if col == 0 or vim.fn.getline("."):sub(col, col):match "%s" then
return true
else
return false
end
end
_G.tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-n>"
elseif luasnip and luasnip.expand_or_jumpable() then
return t "<Plug>luasnip-expand-or-jump"
elseif check_back_space() then
return t "<Tab>"
else
return vim.fn["compe#complete"]()
end
end
_G.s_tab_complete = function()
if vim.fn.pumvisible() == 1 then
return t "<C-p>"
elseif luasnip and luasnip.jumpable(-1) then
return t "<Plug>luasnip-jump-prev"
else
return t "<S-Tab>"
end
end
_G.completions = function()
local npairs
if not pcall(function()
npairs = require "nvim-autopairs"
end) then
return
end
if vim.fn.pumvisible() == 1 then
if vim.fn.complete_info()["selected"] ~= -1 then
return vim.fn["compe#confirm"] "<CR>"
end
end
return npairs.check_break_line_char()
end
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", { expr = true })
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", { expr = true })
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", { expr = true })
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", { expr = true })
vim.api.nvim_set_keymap("i", "<CR>", "v:lua.completions()", { expr = true })
luasnip.config.set_config {
history = true,
updateevents = "TextChanged,TextChangedI",
}
require("luasnip/loaders/from_vscode").load()
+95
View File
@@ -0,0 +1,95 @@
local present, tree_c = pcall(require, "nvim-tree.config")
if not present then
return
end
local tree_cb = tree_c.nvim_tree_callback
local g = vim.g
vim.o.termguicolors = true
g.nvim_tree_side = "left"
g.nvim_tree_width = 25
g.nvim_tree_ignore = { ".git", "node_modules", ".cache" }
g.nvim_tree_gitignore = 1
g.nvim_tree_auto_ignore_ft = { "dashboard" } -- don't open tree on specific fiypes.
g.nvim_tree_auto_open = 0
g.nvim_tree_auto_close = 0 -- closes tree when it's the last window
g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened
g.nvim_tree_follow = 1
g.nvim_tree_indent_markers = 1
g.nvim_tree_hide_dotfiles = 1
g.nvim_tree_git_hl = 1
g.nvim_tree_highlight_opened_files = 0
g.nvim_tree_root_folder_modifier = table.concat { ":t:gs?$?/..", string.rep(" ", 1000), "?:gs?^??" }
g.nvim_tree_tab_open = 0
g.nvim_tree_allow_resize = 1
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
g.nvim_tree_disable_netrw = 1
g.nvim_tree_hijack_netrw = 0
g.nvim_tree_update_cwd = 1
g.nvim_tree_show_icons = {
git = 1,
folders = 1,
files = 1,
-- folder_arrows= 1
}
g.nvim_tree_icons = {
default = "",
symlink = "",
git = {
unstaged = "✗",
staged = "✓",
unmerged = "",
renamed = "➜",
untracked = "★",
deleted = "",
ignored = "◌",
},
folder = {
-- disable indent_markers option to get arrows working or if you want both arrows and indent then just add the arrow icons in front ofthe default and opened folders below!
-- arrow_open = "",
-- arrow_closed = "",
default = "",
open = "",
empty = "", -- 
empty_open = "",
symlink = "",
symlink_open = "",
},
}
g.nvim_tree_bindings = {
{ key = { "<CR>", "o", "<2-LeftMouse>" }, cb = tree_cb "edit" },
{ key = { "<2-RightMouse>", "<C-]>" }, cb = tree_cb "cd" },
{ key = "<C-v>", cb = tree_cb "vsplit" },
{ key = "<C-x>", cb = tree_cb "split" },
{ key = "<C-t>", cb = tree_cb "tabnew" },
{ key = "<", cb = tree_cb "prev_sibling" },
{ key = ">", cb = tree_cb "next_sibling" },
{ key = "P", cb = tree_cb "parent_node" },
{ key = "<BS>", cb = tree_cb "close_node" },
{ key = "<S-CR>", cb = tree_cb "close_node" },
{ key = "<Tab>", cb = tree_cb "preview" },
{ key = "K", cb = tree_cb "first_sibling" },
{ key = "J", cb = tree_cb "last_sibling" },
{ key = "I", cb = tree_cb "toggle_ignored" },
{ key = "H", cb = tree_cb "toggle_dotfiles" },
{ key = "R", cb = tree_cb "refresh" },
{ key = "a", cb = tree_cb "create" },
{ key = "d", cb = tree_cb "remove" },
{ key = "r", cb = tree_cb "rename" },
{ key = "<C->", cb = tree_cb "full_rename" },
{ key = "x", cb = tree_cb "cut" },
{ key = "c", cb = tree_cb "copy" },
{ key = "p", cb = tree_cb "paste" },
{ key = "y", cb = tree_cb "copy_name" },
{ key = "Y", cb = tree_cb "copy_path" },
{ key = "gy", cb = tree_cb "copy_absolute_path" },
{ key = "[c", cb = tree_cb "prev_git_item" },
{ key = "}c", cb = tree_cb "next_git_item" },
{ key = "-", cb = tree_cb "dir_up" },
{ key = "q", cb = tree_cb "close" },
{ key = "g?", cb = tree_cb "toggle_help" },
}
+71
View File
@@ -0,0 +1,71 @@
local M = {}
M.colorizer = function()
local present, colorizer = pcall(require, "colorizer")
if present then
colorizer.setup()
vim.cmd "ColorizerReloadAllBuffers"
end
end
M.comment = function()
local present, nvim_comment = pcall(require, "nvim_comment")
if present then
nvim_comment.setup()
end
end
M.escape = function()
vim.g.better_escape_interval = 300
vim.g.better_escape_shortcut = { "jk" }
end
M.lspkind = function()
local present, lspkind = pcall(require, "lspkind")
if present then
lspkind.init()
end
end
M.neoscroll = function()
pcall(function()
require("neoscroll").setup()
end)
end
M.blankline = function()
vim.g.indentLine_enabled = 1
vim.g.indent_blankline_char = "▏"
vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard", "packer" }
vim.g.indent_blankline_buftype_exclude = { "terminal" }
vim.g.indent_blankline_show_trailing_blankline_indent = false
vim.g.indent_blankline_show_first_indent_level = false
end
M.signature = function()
local present, lspsignature = pcall(require, "lsp_signature")
if present then
lspsignature.setup {
bind = true,
doc_lines = 2,
floating_window = true,
fix_pos = true,
hint_enable = true,
hint_prefix = "",
hint_scheme = "String",
use_lspsaga = false,
hi_parameter = "Search",
max_height = 22,
max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width
handler_opts = {
border = "single", -- double, single, shadow, none
},
zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom
padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc
}
end
end
return M
+309
View File
@@ -0,0 +1,309 @@
local global_theme = "themes/" .. require("utils").load_config().ui.theme
local colors = require(global_theme)
local present1, gl = pcall(require, "galaxyline")
local present2, condition = pcall(require, "galaxyline.condition")
if not (present1 or present2) then
return
end
local gls = gl.section
gl.short_line_list = { " " }
local icon_styles = {
default = {
left = "",
right = "",
main_icon = "",
vi_mode_icon = "",
position_icon = "",
},
round = {
left = "",
right = "",
main_icon = "",
vi_mode_icon = "",
position_icon = "",
},
slant = {
left = "",
right = "",
main_icon = "",
vi_mode_icon = "",
position_icon = "",
},
block = {
left = " ",
right = " ",
main_icon = "",
vi_mode_icon = "",
position_icon = "",
},
arrow = {
left = "",
right = "",
main_icon = "",
vi_mode_icon = "",
position_icon = "",
},
}
local user_statusline_style = require("utils").load_config().ui.statusline_style
local statusline_style = icon_styles[user_statusline_style]
local left_separator = statusline_style.left
local right_separator = statusline_style.right
gls.left[1] = {
FirstElement = {
provider = function()
return "▋"
end,
highlight = { colors.nord_blue, colors.nord_blue },
},
}
gls.left[2] = {
statusIcon = {
provider = function()
return statusline_style.main_icon
end,
highlight = { colors.statusline_bg, colors.nord_blue },
separator = right_separator,
separator_highlight = { colors.nord_blue, colors.one_bg2 },
},
}
gls.left[3] = {
left_arow2 = {
provider = function() end,
separator = right_separator .. " ",
separator_highlight = { colors.one_bg2, colors.lightbg },
},
}
gls.left[4] = {
FileIcon = {
provider = "FileIcon",
condition = condition.buffer_not_empty,
highlight = { colors.white, colors.lightbg },
},
}
gls.left[5] = {
FileName = {
provider = function()
local fileinfo = require "galaxyline.provider_fileinfo"
if vim.api.nvim_buf_get_name(0):len() == 0 then
return ""
end
return fileinfo.get_current_file_name("", "")
end,
highlight = { colors.white, colors.lightbg },
separator = right_separator,
separator_highlight = { colors.lightbg, colors.lightbg2 },
},
}
gls.left[6] = {
current_dir = {
provider = function()
local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
return "" .. dir_name .. " "
end,
highlight = { colors.grey_fg2, colors.lightbg2 },
separator = right_separator,
separator_highlight = { colors.lightbg2, colors.statusline_bg },
},
}
local checkwidth = function()
local squeeze_width = vim.fn.winwidth(0) / 2
if squeeze_width > 30 then
return true
end
return false
end
gls.left[7] = {
DiffAdd = {
provider = "DiffAdd",
condition = checkwidth,
icon = "",
highlight = { colors.white, colors.statusline_bg },
},
}
gls.left[8] = {
DiffModified = {
provider = "DiffModified",
condition = checkwidth,
icon = "",
highlight = { colors.grey_fg2, colors.statusline_bg },
},
}
gls.left[9] = {
DiffRemove = {
provider = "DiffRemove",
condition = checkwidth,
icon = "",
highlight = { colors.grey_fg2, colors.statusline_bg },
},
}
gls.left[10] = {
DiagnosticError = {
provider = "DiagnosticError",
icon = "",
highlight = { colors.red, colors.statusline_bg },
},
}
gls.left[11] = {
DiagnosticWarn = {
provider = "DiagnosticWarn",
icon = "",
highlight = { colors.yellow, colors.statusline_bg },
},
}
gls.right[1] = {
lsp_status = {
provider = function()
local clients = vim.lsp.get_active_clients()
if next(clients) ~= nil then
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return " " .. "" .. " LSP"
end
end
return ""
else
return ""
end
end,
highlight = { colors.grey_fg2, colors.statusline_bg },
},
}
gls.right[2] = {
GitIcon = {
provider = function()
return ""
end,
condition = require("galaxyline.condition").check_git_workspace,
highlight = { colors.grey_fg2, colors.statusline_bg },
separator = " ",
separator_highlight = { colors.statusline_bg, colors.statusline_bg },
},
}
gls.right[3] = {
GitBranch = {
provider = "GitBranch",
condition = require("galaxyline.condition").check_git_workspace,
highlight = { colors.grey_fg2, colors.statusline_bg },
},
}
local mode_colors = {
[110] = { "NORMAL", colors.red },
[105] = { "INSERT", colors.dark_purple },
[99] = { "COMMAND", colors.pink },
[116] = { "TERMINAL", colors.green },
[118] = { "VISUAL", colors.cyan },
[22] = { "V-BLOCK", colors.cyan },
[86] = { "V_LINE", colors.cyan },
[82] = { "REPLACE", colors.orange },
[115] = { "SELECT", colors.nord_blue },
[83] = { "S-LINE", colors.nord_blue },
}
local mode = function(n)
return mode_colors[vim.fn.mode():byte()][n]
end
gls.right[4] = {
left_arrow = {
provider = function() end,
separator = " " .. left_separator,
separator_highlight = { colors.one_bg2, colors.statusline_bg },
},
}
gls.right[5] = {
left_round = {
provider = function()
vim.cmd("hi Galaxyleft_round guifg=" .. mode(2))
return left_separator
end,
highlight = { "GalaxyViMode", colors.one_bg2 },
},
}
gls.right[6] = {
viMode_icon = {
provider = function()
vim.cmd("hi GalaxyviMode_icon guibg=" .. mode(2))
return statusline_style.vi_mode_icon
end,
highlight = { colors.statusline_bg, colors.red },
},
}
gls.right[7] = {
ViMode = {
provider = function()
vim.cmd("hi GalaxyViMode guifg=" .. mode(2))
return " " .. mode(1) .. " "
end,
highlight = { "GalaxyViMode", colors.lightbg },
},
}
gls.right[8] = {
left_arrow2 = {
provider = function() end,
separator = left_separator,
separator_highlight = { colors.grey, colors.lightbg },
},
}
gls.right[9] = {
some_RoundIcon = {
provider = function()
return statusline_style.position_icon
end,
separator = left_separator,
separator_highlight = { colors.green, colors.grey },
highlight = { colors.lightbg, colors.green },
},
}
gls.right[10] = {
line_percentage = {
provider = function()
local current_line = vim.fn.line "."
local total_line = vim.fn.line "$"
if current_line == 1 then
return " Top "
elseif current_line == vim.fn.line "$" then
return " Bot "
end
local result, _ = math.modf((current_line / total_line) * 100)
return " " .. result .. "% "
end,
highlight = { colors.green, colors.lightbg },
},
}
+85
View File
@@ -0,0 +1,85 @@
local present, telescope = pcall(require, "telescope")
if not present then
return
end
telescope.setup {
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case",
},
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "descending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
results_width = 0.8,
},
vertical = {
mirror = false,
},
width = 0.87,
height = 0.80,
preview_cutoff = 120,
},
file_sorter = require("telescope.sorters").get_fuzzy_file,
file_ignore_patterns = {},
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = { "absolute" },
winblend = 0,
border = {},
borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
color_devicons = true,
use_less = true,
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker,
},
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = false, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
},
media_files = {
filetypes = { "png", "webp", "jpg", "jpeg" },
find_cmd = "rg", -- find command (defaults to `fd`)
},
},
}
-- NvChad pickers
-- load the theme_switcher extension
require("telescope").load_extension "themes"
-- load the term_picker extension
require("telescope").load_extension "terms"
if not pcall(function()
telescope.load_extension "fzf"
telescope.load_extension "media_files"
end) then
-- This should only trigger when in need of PackerSync, so better do it
print "After completion of PackerCompile, restart neovim."
-- Trigger packer compile on PackerComplete, so it properly waits for PackerSync
vim.cmd 'autocmd User PackerComplete ++once lua print "Waiting for PackerCompile.." require("packer").compile()'
vim.cmd 'autocmd User PackerCompileDone ++once echo "Packer Compile done, restart neovim."'
require "pluginList"
require("packer").update("telescope-fzf-native.nvim", "telescope-media-files.nvim")
end
+15
View File
@@ -0,0 +1,15 @@
local present, ts_config = pcall(require, "nvim-treesitter.configs")
if not present then
return
end
ts_config.setup {
ensure_installed = {
"bash",
"lua",
},
highlight = {
enable = true,
use_languagetree = true,
},
}
+68
View File
@@ -0,0 +1,68 @@
local present, true_zen = pcall(require, "true-zen")
if not present then
return
end
true_zen.setup {
ui = {
bottom = {
laststatus = 0,
ruler = false,
showmode = false,
showcmd = false,
cmdheight = 1,
},
top = {
showtabline = 0,
},
left = {
number = false,
relativenumber = false,
signcolumn = "no",
},
},
modes = {
ataraxis = {
left_padding = 32,
right_padding = 32,
top_padding = 1,
bottom_padding = 1,
ideal_writing_area_width = { 0 },
auto_padding = true,
keep_default_fold_fillchars = true,
custome_bg = "",
bg_configuration = true,
affected_higroups = {
NonText = {},
FoldColumn = {},
ColorColumn = {},
VertSplit = {},
StatusLine = {},
StatusLineNC = {},
SignColumn = {},
},
},
focus = {
margin_of_error = 5,
focus_method = "experimental",
},
},
integrations = {
vim_gitgutter = false,
galaxyline = true,
tmux = false,
gitsigns = false,
nvim_bufferline = true,
limelight = false,
vim_airline = false,
vim_powerline = false,
vim_signify = false,
express_line = false,
lualine = false,
},
misc = {
on_off_commands = false,
ui_elements_commands = false,
cursor_by_mode = false,
},
}
-204
View File
@@ -1,204 +0,0 @@
local gl = require("galaxyline")
local gls = gl.section
local condition = require("galaxyline.condition")
gl.short_line_list = {" "}
local colors = require "themes/onedark"
gls.left[1] = {
FirstElement = {
provider = function() return '▋' end,
highlight = { colors.nord_blue, colors.nord_blue }
},
}
gls.left[2] = {
statusIcon = {
provider = function()
return ""
end,
highlight = {colors.statusline_bg, colors.nord_blue},
separator = "",
separator_highlight = {colors.nord_blue, colors.lightbg}
}
}
gls.left[3] = {
FileIcon = {
provider = "FileIcon",
condition = condition.buffer_not_empty,
highlight = {colors.white, colors.lightbg}
}
}
gls.left[4] = {
FileName = {
provider = {"FileName"},
condition = condition.buffer_not_empty,
highlight = {colors.white, colors.lightbg},
separator = "",
separator_highlight = {colors.lightbg, colors.lightbg2}
}
}
gls.left[5] = {
current_dir = {
provider = function()
local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
return "" .. dir_name .. " "
end,
highlight = {colors.grey_fg2, colors.lightbg2},
separator = "",
separator_highlight = {colors.lightbg2, colors.statusline_bg}
}
}
local checkwidth = function()
local squeeze_width = vim.fn.winwidth(0) / 2
if squeeze_width > 30 then
return true
end
return false
end
gls.left[6] = {
DiffAdd = {
provider = "DiffAdd",
condition = checkwidth,
icon = "",
highlight = {colors.white, colors.statusline_bg}
}
}
gls.left[7] = {
DiffModified = {
provider = "DiffModified",
condition = checkwidth,
icon = "",
highlight = {colors.grey_fg2, colors.statusline_bg}
}
}
gls.left[8] = {
DiffRemove = {
provider = "DiffRemove",
condition = checkwidth,
icon = "",
highlight = {colors.grey_fg2, colors.statusline_bg}
}
}
gls.left[9] = {
DiagnosticError = {
provider = "DiagnosticError",
icon = "",
highlight = {colors.red, colors.statusline_bg}
}
}
gls.left[10] = {
DiagnosticWarn = {
provider = "DiagnosticWarn",
icon = "",
highlight = {colors.yellow, colors.statusline_bg}
}
}
gls.right[1] = {
lsp_status = {
provider = function()
local clients = vim.lsp.get_active_clients()
if next(clients) ~= nil then
return " " .. "" .. " LSP "
else
return ""
end
end,
highlight = {colors.grey_fg2, colors.statusline_bg}
}
}
gls.right[2] = {
GitIcon = {
provider = function()
return ""
end,
condition = require("galaxyline.provider_vcs").check_git_workspace,
highlight = {colors.grey_fg2, colors.lightbg},
separator = "",
separator_highlight = {colors.lightbg, colors.statusline_bg}
}
}
gls.right[3] = {
GitBranch = {
provider = "GitBranch",
condition = require("galaxyline.provider_vcs").check_git_workspace,
highlight = {colors.grey_fg2, colors.lightbg}
}
}
gls.right[4] = {
viMode_icon = {
provider = function()
return ""
end,
highlight = {colors.statusline_bg, colors.red},
separator = "",
separator_highlight = {colors.red, colors.lightbg}
}
}
gls.right[5] = {
ViMode = {
provider = function()
local alias = {
n = "Normal",
i = "Insert",
c = "Command",
V = "Visual",
[""] = "Visual",
v = "Visual",
R = "Replace"
}
local current_Mode = alias[vim.fn.mode()]
if current_Mode == nil then
return " Terminal "
else
return " " .. current_Mode .. " "
end
end,
highlight = {colors.red, colors.lightbg}
}
}
gls.right[6] = {
some_icon = {
provider = function()
return ""
end,
separator = "",
separator_highlight = {colors.green, colors.lightbg},
highlight = {colors.lightbg, colors.green}
}
}
gls.right[7] = {
line_percentage = {
provider = function()
local current_line = vim.fn.line(".")
local total_line = vim.fn.line("$")
if current_line == 1 then
return " Top "
elseif current_line == vim.fn.line("$") then
return " Bot "
end
local result, _ = math.modf((current_line / total_line) * 100)
return " " .. result .. "% "
end,
highlight = {colors.green, colors.lightbg}
}
}
-82
View File
@@ -1,82 +0,0 @@
require("telescope").setup {
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case"
},
prompt_position = "bottom",
prompt_prefix = "",
selection_caret = "",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "descending",
layout_strategy = "horizontal",
layout_defaults = {
horizontal = {
mirror = false,
preview_width = 0.5
},
vertical = {
mirror = false
}
},
file_sorter = require "telescope.sorters".get_fuzzy_file,
file_ignore_patterns = {},
generic_sorter = require "telescope.sorters".get_generic_fuzzy_sorter,
shorten_path = true,
winblend = 0,
width = 0.75,
preview_cutoff = 120,
results_height = 1,
results_width = 0.8,
border = {},
borderchars = {"─", "│", "─", "│", "╭", "╮", "╯", "╰"},
color_devicons = true,
use_less = true,
set_env = {["COLORTERM"] = "truecolor"}, -- default = nil,
file_previewer = require "telescope.previewers".vim_buffer_cat.new,
grep_previewer = require "telescope.previewers".vim_buffer_vimgrep.new,
qflist_previewer = require "telescope.previewers".vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require "telescope.previewers".buffer_previewer_maker
},
extensions = {
media_files = {
filetypes = {"png", "webp", "jpg", "jpeg"},
find_cmd = "rg" -- find command (defaults to `fd`)
}
}
}
require("telescope").load_extension("media_files")
local opt = {noremap = true, silent = true}
vim.g.mapleader = " "
-- mappings
vim.api.nvim_set_keymap("n", "<Leader>ff", [[<Cmd>lua require('telescope.builtin').find_files()<CR>]], opt)
vim.api.nvim_set_keymap(
"n",
"<Leader>fp",
[[<Cmd>lua require('telescope').extensions.media_files.media_files()<CR>]],
opt
)
vim.api.nvim_set_keymap("n", "<Leader>fb", [[<Cmd>lua require('telescope.builtin').buffers()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fh", [[<Cmd>lua require('telescope.builtin').help_tags()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fo", [[<Cmd>lua require('telescope.builtin').oldfiles()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fm", [[<Cmd> Neoformat<CR>]], opt)
-- dashboard stuff
vim.api.nvim_set_keymap("n", "<Leader>fw", [[<Cmd> Telescope live_grep<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fn", [[<Cmd> DashboardNewFile<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fb", [[<Cmd> DashboardJumpMarks<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fl", [[<Cmd> SessionLoad<CR>]], opt)
vim.api.nvim_set_keymap("n", "<Leader>fs", [[<Cmd> SessionSave<CR>]], opt)
+143
View File
@@ -0,0 +1,143 @@
-- This file can be loaded as a telescope extension
local M = {}
-- Custom theme picker
-- Most of the code is copied from telescope buffer builtin
-- Src: https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/internal.lua
M.term_picker = function(opts)
local pickers, finders, previewers, make_entry, actions, action_state, utils, conf
if pcall(require, "telescope") then
pickers = require "telescope.pickers"
finders = require "telescope.finders"
previewers = require "telescope.previewers"
make_entry = require "telescope.make_entry"
actions = require "telescope.actions"
action_state = require "telescope.actions.state"
utils = require "telescope.utils"
conf = require("telescope.config").values
else
error "Cannot find telescope!"
end
local filter = vim.tbl_filter
local local_utils = require "utils"
-- buffer number and name
local bufnr = vim.api.nvim_get_current_buf()
local bufname = vim.api.nvim_buf_get_name(bufnr)
local bufnrs = filter(function(b)
local present_type, type = pcall(function()
return vim.api.nvim_buf_get_var(b, "term_type")
end)
if not present_type then
-- let's only terms that we created
return false
end
-- if 1 ~= vim.fn.buflisted(b) then
-- return false
-- end
-- only hide unloaded buffers if opts.show_all_buffers is false, keep them listed if true or nil
if opts.show_all_buffers == false and not vim.api.nvim_buf_is_loaded(b) then
return false
end
if opts.ignore_current_buffer and b == vim.api.nvim_get_current_buf() then
return false
end
return true
end, vim.api.nvim_list_bufs())
if not next(bufnrs) then
return
end
if opts.sort_mru then
table.sort(bufnrs, function(a, b)
return vim.fn.getbufinfo(a)[1].lastused > vim.fn.getbufinfo(b)[1].lastused
end)
end
local buffers = {}
local default_selection_idx = 1
for _, bufnr in ipairs(bufnrs) do
local flag = bufnr == vim.fn.bufnr "" and "%" or (bufnr == vim.fn.bufnr "#" and "#" or " ")
if opts.sort_lastused and not opts.ignore_current_buffer and flag == "#" then
default_selection_idx = 2
end
local element = {
bufnr = bufnr,
flag = flag,
info = vim.fn.getbufinfo(bufnr)[1],
}
if opts.sort_lastused and (flag == "#" or flag == "%") then
local idx = ((buffers[1] ~= nil and buffers[1].flag == "%") and 2 or 1)
table.insert(buffers, idx, element)
else
table.insert(buffers, element)
end
end
if not opts.bufnr_width then
local max_bufnr = math.max(unpack(bufnrs))
opts.bufnr_width = #tostring(max_bufnr)
end
pickers.new(opts, {
prompt_title = "Terminal buffers",
finder = finders.new_table {
results = buffers,
entry_maker = opts.entry_maker or make_entry.gen_from_buffer(opts),
},
previewer = conf.grep_previewer(opts),
sorter = conf.generic_sorter(opts),
default_selection_index = default_selection_idx,
attach_mappings = function(prompt_bufnr)
actions.select_default:replace(function()
local entry = action_state.get_selected_entry()
actions.close(prompt_bufnr)
local buf = entry.bufnr
local chad_term, type = pcall(function()
return vim.api.nvim_buf_get_var(buf, "term_type")
end)
-- TODO buffer checks/error detection (make sure we do get a buf)
if chad_term then
if type == "wind" then
-- swtich to term buff & show in bufferline
vim.cmd(string.format("b %d | setlocal bl", buf))
-- vim.cmd('startinsert') TODO fix this
elseif type == "vert" then
vim.cmd(string.format("vsp #%d", buf))
-- vim.cmd('startinsert') TODO fix this
elseif type == "hori" then
-- TODO change 15 to a chad config var number
vim.cmd(string.format("15 sp #%d ", buf))
-- vim.cmd('startinsert') TODO fix this
end
end
end)
return true
end,
}):find()
end
-- register term picker as terms to telescope
local present, telescope = pcall(require, "telescope")
if present then
return telescope.register_extension {
exports = {
terms = M.term_picker,
},
}
else
error "Cannot find telescope!"
end
+142
View File
@@ -0,0 +1,142 @@
-- This file can be loaded as a telescope extension
local M = {}
-- Custom theme picker
-- Most of the code is copied from telescope colorscheme plugin, mostly for preview creation
M.theme_switcher = function(opts)
local pickers, finders, previewers, actions, action_state, utils, conf
if pcall(require, "telescope") then
pickers = require "telescope.pickers"
finders = require "telescope.finders"
previewers = require "telescope.previewers"
actions = require "telescope.actions"
action_state = require "telescope.actions.state"
utils = require "telescope.utils"
conf = require("telescope.config").values
else
error "Cannot find telescope!"
end
local local_utils = require "utils"
local reload_theme = local_utils.reload_theme
-- get a table of available themes
local themes = local_utils.list_themes()
if next(themes) ~= nil then
-- save this to use it for later to restore if theme not changed
local current_theme = vim.g.nvchad_theme
local new_theme = ""
local change = false
-- buffer number and name
local bufnr = vim.api.nvim_get_current_buf()
local bufname = vim.api.nvim_buf_get_name(bufnr)
local previewer
-- in case its not a normal buffer
if vim.fn.buflisted(bufnr) ~= 1 then
local deleted = false
local function del_win(win_id)
if win_id and vim.api.nvim_win_is_valid(win_id) then
utils.buf_delete(vim.api.nvim_win_get_buf(win_id))
pcall(vim.api.nvim_win_close, win_id, true)
end
end
previewer = previewers.new {
preview_fn = function(_, entry, status)
if not deleted then
deleted = true
del_win(status.preview_win)
del_win(status.preview_border_win)
end
reload_theme(entry.value)
end,
}
else
-- show current buffer content in previewer
previewer = previewers.new_buffer_previewer {
get_buffer_by_name = function()
return bufname
end,
define_preview = function(self, entry)
if vim.loop.fs_stat(bufname) then
conf.buffer_previewer_maker(bufname, self.state.bufnr, { bufname = self.state.bufname })
else
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
vim.api.nvim_buf_set_lines(self.state.bufnr, 0, -1, false, lines)
end
reload_theme(entry.value)
end,
}
end
local picker = pickers.new {
prompt_title = "Set NvChad color",
finder = finders.new_table(themes),
previewer = previewer,
sorter = conf.generic_sorter(opts),
attach_mappings = function()
actions.select_default:replace(
-- if a entry is selected, change current_theme to that
function(prompt_bufnr)
local selection = action_state.get_selected_entry()
new_theme = selection.value
change = true
actions.close(prompt_bufnr)
end
)
return true
end,
}
-- rewrite picker.close_windows
local close_windows = picker.close_windows
picker.close_windows = function(status)
close_windows(status)
-- now apply the theme, if success, then ask for default theme change
local final_theme
if change then
final_theme = new_theme
else
final_theme = current_theme
end
if reload_theme(final_theme) then
if change then
-- ask for confirmation to set as default theme
local ans = string.lower(vim.fn.input("Set " .. new_theme .. " as default theme ? [y/N] ")) == "y"
local_utils.clear_cmdline()
if ans then
local_utils.change_theme(current_theme, final_theme)
else
-- will be used in restoring nvchad theme var
final_theme = current_theme
end
end
else
final_theme = current_theme
end
-- set nvchad_theme global var
vim.g.nvchad_theme = final_theme
end
-- launch the telescope picker
picker:find()
else
print("No themes found in " .. vim.fn.stdpath "config" .. "/lua/themes")
end
end
-- register theme swticher as themes to telescope
local present, telescope = pcall(require, "telescope")
if present then
return telescope.register_extension {
exports = {
themes = M.theme_switcher,
},
}
else
error "Cannot find telescope!"
end
+12
View File
@@ -0,0 +1,12 @@
local chad_theme = require("utils").load_config().ui.theme
vim.g.nvchad_theme = chad_theme
local present, base16 = pcall(require, "base16")
if present then
base16(base16.themes(chad_theme), true)
require "highlights"
return true
else
return false
end
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#F8F8F2",
darker_black = "#232531",
black = "#282A36", -- nvim bg
black2 = "#303341",
one_bg = "#373844", -- real bg of onedark
one_bg2 = "#44475a",
one_bg3 = "#565761",
grey = "#41434f",
grey_fg = "#5a5c68",
grey_fg2 = "#5a5c68",
light_grey = "#636571",
red = "#E95678",
baby_pink = "#DE8C92",
pink = "#FF79C6",
line = "#373844", -- for lines like vertsplit
green = "#69ff94",
vibrant_green = "#69FF94",
nord_blue = "#b389ef",
blue = "#BD93F9",
yellow = "#F1FA8C",
sun = "#FFFFA5",
purple = "#BD93F9",
dark_purple = "#BD93F9",
teal = "#0088cc",
orange = "#FFB86C",
cyan = "#8BE9FD",
statusline_bg = "#2b2d39",
lightbg = "#343642",
lightbg2 = "#2f313d",
pmenu_bg = "#b389ef",
folder_bg = "#BD93F9",
}
return colors
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#fff9e8",
darker_black = "#272f35",
black = "#2b3339", -- nvim bg
black2 = "#323a40",
one_bg = "#333b41",
one_bg2 = "#363e44",
one_bg3 = "#3a4248",
grey = "#4a5258",
grey_fg = "#50585e",
grey_fg2 = "#545c62",
light_grey = "#586066",
red = "#e67e80",
baby_pink = "#ce8196",
pink = "#ff75a0",
line = "#3a4248", -- for lines like vertsplit
green = "#83c092",
vibrant_green = "#a7c080",
nord_blue = "#78b4ac",
blue = "#7fbbb3",
yellow = "#dbbc7f",
sun = "#d1b171",
purple = "#b4bbc8",
dark_purple = "#d699b6",
teal = "#69a59d",
orange = "#e69875",
cyan = "#95d1c9",
statusline_bg = "#2e363c",
lightbg = "#3d454b",
lightbg2 = "#333b41",
pmenu_bg = "#83c092",
folder_bg = "#7fbbb3",
}
return colors
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#c7b89d",
darker_black = "#1e2122",
black = "#222526", -- nvim bg
black2 = "#26292a",
one_bg = "#2b2e2f",
one_bg2 = "#2f3233",
one_bg3 = "#313435",
grey = "#46494a",
grey_fg = "#5d6061",
grey_fg2 = "#5b5e5f",
light_grey = "#585b5c",
red = "#ec6b64",
baby_pink = "#ce8196",
pink = "#ff75a0",
line = "#2c2f30", -- for lines like vertsplit
green = "#89b482",
vibrant_green = "#a9b665",
nord_blue = "#6f8faf",
blue = "#6d8dad",
yellow = "#d6b676",
sun = "#d1b171",
purple = "#b4bbc8",
dark_purple = "#cc7f94",
teal = "#749689",
orange = "#e78a4e",
cyan = "#82b3a8",
statusline_bg = "#252829",
lightbg = "#2d3139",
lightbg2 = "#262a32",
pmenu_bg = "#89b482",
folder_bg = "#6d8dad",
}
return colors
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#b5bcc9",
darker_black = "#10171e",
black = "#131a21", -- nvim bg
black2 = "#1a2128",
one_bg = "#1e252c",
one_bg2 = "#272e35",
one_bg3 = "#2a3138",
grey = "#363d44",
grey_fg = "#4e555c",
grey_fg2 = "#51585f",
light_grey = "#545b62",
red = "#ef8891",
baby_pink = "#fca2aa",
pink = "#fca2af",
line = "#20272e", -- for lines like vertsplit
green = "#9ce5c0",
vibrant_green = "#a5d4af",
blue = "#99aee5",
nord_blue = "#9aa8cf",
yellow = "#fbdf90",
sun = "#fbdf9a",
purple = "#d7c1ed",
dark_purple = "#ccaced",
teal = "#92dbb6",
orange = "#EDA685",
cyan = "#b5c3ea",
statusline_bg = "#181f26",
lightbg = "#222930",
lightbg2 = "#1d242b",
pmenu_bg = "#ef8891",
folder_bg = "#99aee5",
}
return colors
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#b0b0b0",
darker_black = "#171d23",
black = "#1a2026", -- nvim bg
black2 = "#20262c",
one_bg = "#242a30",
one_bg2 = "#292f35",
one_bg3 = "#2e343a",
grey = "#42484e",
grey_fg = "#474d53",
grey_fg2 = "#50565c",
light_grey = "#565c62",
red = "#ac8a8c",
baby_pink = "#de878f",
pink = "#e89199",
line = "#2d3339", -- for lines like vertsplit
green = "#8aac8b",
vibrant_green = "#9ec49f",
blue = "#6b8bab",
nord_blue = "#7797b7",
yellow = "#c4c19e",
sun = "#aca98a",
purple = "#a39ec4",
dark_purple = "#8f8aac",
teal = "#7c9cbc",
orange = "#e39a83",
cyan = "#9aafe6",
statusline_bg = "#1e242a",
lightbg = "#2d3339",
lightbg2 = "#252b31",
pmenu_bg = "#8aac8b",
folder_bg = "#6b8bab",
}
return colors
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#abb2bf",
darker_black = "#2a303c",
black = "#2E3440", -- nvim bg
black2 = "#343a46",
one_bg = "#373d49",
one_bg2 = "#464c58",
one_bg3 = "#494f5b",
grey = "#4b515d",
grey_fg = "#565c68",
grey_fg2 = "#606672",
light_grey = "#646a76",
red = "#BF616A",
baby_pink = "#de878f",
pink = "#d57780",
line = "#3a404c", -- for lines like vertsplit
green = "#A3BE8C",
vibrant_green = "#afca98",
blue = "#7797b7",
nord_blue = "#81A1C1",
yellow = "#EBCB8B",
sun = "#e1c181",
purple = "#aab1be",
dark_purple = "#B48EAD",
teal = "#6484a4",
orange = "#e39a83",
cyan = "#9aafe6",
statusline_bg = "#333945",
lightbg = "#3f4551",
lightbg2 = "#393f4b",
pmenu_bg = "#A3BE8C",
folder_bg = "#7797b7",
}
return colors
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#54555b",
darker_black = "#f5f5f5",
black = "#fafafa", -- nvim bg
black2 = "#f1f1f1",
one_bg = "#f0f0f0", -- real bg of onedark
one_bg2 = "#ececec",
one_bg3 = "#e7e7e7",
grey = "#cbcbcb",
grey_fg = "#c6c6c6",
grey_fg2 = "#b7b7b7",
light_grey = "#b7b7b7",
red = "#e6676e",
baby_pink = "#F07178",
pink = "#ff75a0",
line = "#e9e9e9", -- for lines like vertsplit
green = "#7b90c7",
vibrant_green = "#7eca9c",
nord_blue = "#5e5f65",
blue = "#28a2f4",
yellow = "#7e7e7e",
sun = "#dea95f",
purple = "#a28dcd",
dark_purple = "#8e79b9",
teal = "#519ABA",
orange = "#FF6A00",
cyan = "#a3b8ef",
statusline_bg = "#f0f0f0",
lightbg = "#d6d6d6",
lightbg2 = "#5e5f65",
pmenu_bg = "#5e5f65",
folder_bg = "#6C6C6C",
}
return colors
+31 -29
View File
@@ -1,33 +1,35 @@
local colors = {
white = "#abb2bf",
darker_black = "#1b1f27",
black = "#1e222a", -- nvim bg
black2 = "#252931",
one_bg = "#282c34", -- real bg of onedark
one_bg2 = "#353b45",
one_bg3 = "#30343c",
grey = "#42464e",
grey_fg = "#565c64",
grey_fg2 = "#6f737b",
light_grey = "#6f737b",
red = "#d47d85",
baby_pink = "#DE8C92",
pink = "#ff75a0",
line = "#2a2e36", -- for lines like vertsplit
green = "#A3BE8C",
vibrant_green = "#7eca9c",
nord_blue = "#81A1C1",
blue = "#61afef",
yellow = "#e7c787",
sun = "#EBCB8B",
purple = "#b4bbc8",
dark_purple = "#c882e7",
teal = "#519ABA",
orange = "#fca2aa",
cyan = "#a3b8ef",
statusline_bg = "#22262e",
lightbg = "#2d3139",
lightbg2 = "#262a32"
white = "#abb2bf",
darker_black = "#1b1f27",
black = "#1e222a", -- nvim bg
black2 = "#252931",
one_bg = "#282c34", -- real bg of onedark
one_bg2 = "#353b45",
one_bg3 = "#30343c",
grey = "#42464e",
grey_fg = "#565c64",
grey_fg2 = "#6f737b",
light_grey = "#6f737b",
red = "#d47d85",
baby_pink = "#DE8C92",
pink = "#ff75a0",
line = "#2a2e36", -- for lines like vertsplit
green = "#A3BE8C",
vibrant_green = "#7eca9c",
nord_blue = "#81A1C1",
blue = "#61afef",
yellow = "#e7c787",
sun = "#EBCB8B",
purple = "#b4bbc8",
dark_purple = "#c882e7",
teal = "#519ABA",
orange = "#fca2aa",
cyan = "#a3b8ef",
statusline_bg = "#22262e",
lightbg = "#2d3139",
lightbg2 = "#262a32",
pmenu_bg = "#A3BE8C",
folder_bg = "#61afef",
}
return colors
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#c0caf5",
darker_black = "#151621",
black = "#171823", -- nvim bg
black2 = "#20212c",
one_bg = "#242530",
one_bg2 = "#292a35",
one_bg3 = "#353b45",
grey = "#40486a",
grey_fg = "#4a5274",
grey_fg2 = "#4f5779",
light_grey = "#545c7e",
red = "#f7768e",
baby_pink = "#DE8C92",
pink = "#ff75a0",
line = "#242530", -- for lines like vertsplit
green = "#9ece6a",
vibrant_green = "#73daca",
nord_blue = "#80a8fd",
blue = "#7aa2f7",
yellow = "#e7c787",
sun = "#EBCB8B",
purple = "#bb9af7",
dark_purple = "#9d7cd8",
teal = "#0db9d7",
orange = "#ff9e64",
cyan = "#7dcfff",
statusline_bg = "#1d1e29",
lightbg = "#252631",
lightbg2 = "#22232e",
pmenu_bg = "#7aa2f7",
folder_bg = "#7aa2f7",
}
return colors
+35
View File
@@ -0,0 +1,35 @@
local colors = {
white = "#C5C8C2",
darker_black = "#191b1d",
black = "#1d1f21", -- nvim bg
black2 = "#232527",
one_bg = "#363a41",
one_bg2 = "#353b45",
one_bg3 = "#30343c",
grey = "#434547",
grey_fg = "#545B68",
grey_fg2 = "#616875",
light_grey = "#676e7b",
red = "#cc6666",
baby_pink = "#FF6E79",
pink = "#ff9ca3",
line = "#27292b", -- for lines like vertsplit
green = "#a4b595",
vibrant_green = "#a3b991",
nord_blue = "#728da8",
blue = "#6f8dab",
yellow = "#d7bd8d",
sun = "#e4c180",
purple = "#b4bbc8",
dark_purple = "#b290ac",
teal = "#8abdb6",
orange = "#DE935F",
cyan = "#70c0b1",
statusline_bg = "#212326",
lightbg = "#373B41",
lightbg2 = "#2D3035",
pmenu_bg = "#a4b595",
folder_bg = "#6f8dab",
}
return colors
-31
View File
@@ -1,31 +0,0 @@
require "bufferline".setup {
options = {
offsets = {{filetype = "NvimTree", text = "", padding = 1}},
buffer_close_icon = "",
modified_icon = "",
close_icon = "",
left_trunc_marker = "",
right_trunc_marker = "",
max_name_length = 14,
max_prefix_length = 13,
tab_size = 20,
show_tab_indicators = true,
enforce_regular_tabs = false,
view = "multiwindow",
show_buffer_close_icons = true,
separator_style = "thin",
mappings = "true"
}
}
local opt = {silent = true}
local map = vim.api.nvim_set_keymap
vim.g.mapleader = " "
-- MAPPINGS
map("n", "<S-t>", [[<Cmd>tabnew<CR>]], opt) -- new tab
map("n", "<S-x>", [[<Cmd>bdelete<CR>]], opt) -- close tab
-- move between tabs
map("n", "<TAB>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
map("n", "<S-TAB>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)
-17
View File
@@ -1,17 +0,0 @@
local ts_config = require("nvim-treesitter.configs")
ts_config.setup {
ensure_installed = {
"javascript",
"html",
"css",
"bash",
"lua",
"json",
"python"
},
highlight = {
enable = true,
use_languagetree = true
}
}
+500
View File
@@ -0,0 +1,500 @@
local M = {}
-- 1st arg as current theme, 2nd as new theme
M.change_theme = function(current_theme, new_theme)
if current_theme == nil or new_theme == nil then
print "Error: Provide current and new theme name"
return false
end
if current_theme == new_theme then
return
end
local user_config = vim.g.nvchad_user_config
local file = vim.fn.stdpath "config" .. "/lua/" .. user_config .. ".lua"
-- store in data variable
local data = assert(M.file("r", file))
-- escape characters which can be parsed as magic chars
current_theme = current_theme:gsub("%p", "%%%0")
new_theme = new_theme:gsub("%p", "%%%0")
local find = "theme = .?" .. current_theme .. ".?"
local replace = 'theme = "' .. new_theme .. '"'
local content = string.gsub(data, find, replace)
-- see if the find string exists in file
if content == data then
print("Error: Cannot change default theme with " .. new_theme .. ", edit " .. file .. " manually")
return false
else
assert(M.file("w", file, content))
end
end
M.clear_cmdline = function()
vim.defer_fn(function()
vim.cmd "echo"
end, 0)
end
M.close_buffer = function(bufexpr, force)
-- This is a modification of a NeoVim plugin from
-- Author: ojroques - Olivier Roques
-- Src: https://github.com/ojroques/nvim-bufdel
-- (Author has okayed copy-paste)
-- Options
local opts = {
next = "cycle", -- how to retrieve the next buffer
quit = false, -- exit when last buffer is deleted
--TODO make this a chadrc flag/option
}
-- ----------------
-- Helper functions
-- ----------------
-- Switch to buffer 'buf' on each window from list 'windows'
local function switch_buffer(windows, buf)
local cur_win = vim.fn.winnr()
for _, winid in ipairs(windows) do
vim.cmd(string.format("%d wincmd w", vim.fn.win_id2win(winid)))
vim.cmd(string.format("buffer %d", buf))
end
vim.cmd(string.format("%d wincmd w", cur_win)) -- return to original window
end
-- Select the first buffer with a number greater than given buffer
local function get_next_buf(buf)
local next = vim.fn.bufnr "#"
if opts.next == "alternate" and vim.fn.buflisted(next) == 1 then
return next
end
for i = 0, vim.fn.bufnr "$" - 1 do
next = (buf + i) % vim.fn.bufnr "$" + 1 -- will loop back to 1
if vim.fn.buflisted(next) == 1 then
return next
end
end
end
-- ----------------
-- End helper functions
-- ----------------
local buf = vim.fn.bufnr()
if vim.fn.buflisted(buf) == 0 then -- exit if buffer number is invalid
return
end
if #vim.fn.getbufinfo { buflisted = 1 } < 2 then
if opts.quit then
-- exit when there is only one buffer left
if force then
vim.cmd "qall!"
else
vim.cmd "confirm qall"
end
return
end
local chad_term, type = pcall(function()
return vim.api.nvim_buf_get_var(buf, "term_type")
end)
if chad_term then
-- Must be a window type
vim.cmd(string.format("setlocal nobl", buf))
vim.cmd "enew"
return
end
-- don't exit and create a new empty buffer
vim.cmd "enew"
vim.cmd "bp"
end
local next_buf = get_next_buf(buf)
local windows = vim.fn.getbufinfo(buf)[1].windows
-- force deletion of terminal buffers to avoid the prompt
if force or vim.fn.getbufvar(buf, "&buftype") == "terminal" then
local chad_term, type = pcall(function()
return vim.api.nvim_buf_get_var(buf, "term_type")
end)
-- TODO this scope is error prone, make resilient
if chad_term then
if type == "wind" then
-- hide from bufferline
vim.cmd(string.format("%d bufdo setlocal nobl", buf))
-- swtich to another buff
-- TODO switch to next bufffer, this works too
vim.cmd "BufferLineCycleNext"
else
local cur_win = vim.fn.winnr()
-- we can close this window
vim.cmd(string.format("%d wincmd c", cur_win))
return
end
else
switch_buffer(windows, next_buf)
vim.cmd(string.format("bd! %d", buf))
end
else
switch_buffer(windows, next_buf)
vim.cmd(string.format("silent! confirm bd %d", buf))
end
-- revert buffer switches if user has canceled deletion
if vim.fn.buflisted(buf) == 1 then
switch_buffer(windows, buf)
end
end
-- wrapper to use vim.api.nvim_echo
-- table of {string, highlight}
-- e.g echo({{"Hello", "Title"}, {"World"}})
M.echo = function(opts)
if opts == nil or type(opts) ~= "table" then
return
end
vim.api.nvim_echo(opts, false, {})
end
-- 1st arg - r or w
-- 2nd arg - file path
-- 3rd arg - content if 1st arg is w
-- return file data on read, nothing on write
M.file = function(mode, filepath, content)
local data
local fd = assert(vim.loop.fs_open(filepath, mode, 438))
local stat = assert(vim.loop.fs_fstat(fd))
if stat.type ~= "file" then
data = false
else
if mode == "r" then
data = assert(vim.loop.fs_read(fd, stat.size, 0))
else
assert(vim.loop.fs_write(fd, content, 0))
data = true
end
end
assert(vim.loop.fs_close(fd))
return data
end
-- return a table of available themes
M.list_themes = function(return_type)
local themes = {}
-- folder where theme files are stored
local themes_folder = vim.fn.stdpath "config" .. "/lua/themes"
-- list all the contents of the folder and filter out files with .lua extension, then append to themes table
local fd = vim.loop.fs_scandir(themes_folder)
if fd then
while true do
local name, typ = vim.loop.fs_scandir_next(fd)
if name == nil then
break
end
if typ ~= "directory" and string.find(name, ".lua") then
-- return the table values as keys if specified
if return_type == "keys_as_value" then
themes[vim.fn.fnamemodify(name, ":r")] = true
else
table.insert(themes, vim.fn.fnamemodify(name, ":r"))
end
end
end
end
return themes
end
-- Base code: https://gist.github.com/revolucas/184aec7998a6be5d2f61b984fac1d7f7
-- Changes over it: preserving table 1 contents and also update with table b, without duplicating
-- 1st arg - base table, 2nd arg - table to merge
M.merge_table = function(into, from)
-- make sure both are table
if type(into) ~= "table" or type(from) ~= "table" then
return into
end
local stack, seen = {}, {}
local table1, table2 = into, from
while true do
for k, v in pairs(table2) do
if type(v) == "table" and type(table1[k]) == "table" then
table.insert(stack, { table1[k], table2[k] })
else
local present = seen[v] or false
if not present then
if type(k) == "number" then
-- add the value to seen table until value is found
-- only do when key is number we just want to append to subtables
-- todo: maybe improve this
for _, value in pairs(table1) do
if value == v then
present = true
break
end
end
seen[v] = true
if not present then
table1[#table1 + 1] = v
end
else
table1[k] = v
end
end
end
end
if #stack > 0 then
local t = stack[#stack]
table1, table2 = t[1], t[2]
stack[#stack] = nil
else
break
end
end
return into
end
-- load config
-- 1st arg = boolean - whether to force reload
-- Modifies _G._NVCHAD_CONFIG global variable
M.load_config = function(reload)
-- only do the stuff below one time, otherwise just return the set config
if _G._NVCHAD_CONFIG_CONTENTS ~= nil and not (reload or false) then
return _G._NVCHAD_CONFIG_CONTENTS
end
-- don't enclose in pcall, it better break when default config is faulty
_G._NVCHAD_CONFIG_CONTENTS = require "default_config"
-- user config is not required to run nvchad but a optional
-- Make sure the config doesn't break the whole system if user config is not present or in bad state or not a table
-- print warning texts if user config file is present
local config_name = vim.g.nvchad_user_config or "chadrc"
local config_file = vim.fn.stdpath "config" .. "/lua/" .. config_name .. ".lua"
-- check if the user config is present
if vim.fn.empty(vim.fn.glob(config_file)) < 1 then
local present, config = pcall(require, config_name)
if present then
-- make sure the returned value is table
if type(config) == "table" then
-- data = require(config_name)
_G._NVCHAD_CONFIG_CONTENTS = require("utils").merge_table(_G._NVCHAD_CONFIG_CONTENTS, config)
else
print("Warning: " .. config_name .. " sourced successfully but did not return a lua table.")
end
else
print("Warning: " .. config_file .. " is present but sourcing failed.")
end
end
return _G._NVCHAD_CONFIG_CONTENTS
end
-- reload a plugin ( will try to load even if not loaded)
-- can take a string or list ( table )
-- return true or false
M.reload_plugin = function(plugins)
local status = true
local function _reload_plugin(plugin)
local loaded = package.loaded[plugin]
if loaded then
package.loaded[plugin] = nil
end
if not pcall(require, plugin) then
print("Error: Cannot load " .. plugin .. " plugin!")
status = false
end
end
if type(plugins) == "string" then
_reload_plugin(plugins)
elseif type(plugins) == "table" then
for _, plugin in ipairs(plugins) do
_reload_plugin(plugin)
end
end
return status
end
-- reload themes without restarting vim
-- if no theme name given then reload the current theme
M.reload_theme = function(theme_name)
local reload_plugin = require("utils").reload_plugin
-- if theme name is empty or nil, then reload the current theme
if theme_name == nil or theme_name == "" then
theme_name = vim.g.nvchad_theme
end
if not pcall(require, "themes/" .. theme_name) then
print("No such theme ( " .. theme_name .. " )")
return false
end
vim.g.nvchad_theme = theme_name
-- reload the base16 theme
local ok, base16 = pcall(require, "base16")
if not ok then
print "Error: Cannot load base16 plugin!"
return false
end
base16(base16.themes(theme_name), true)
if
not reload_plugin {
"highlights",
"plugins.bufferline",
"galaxyline",
"plugins.statusline",
}
then
print "Error: Not able to reload all plugins."
return false
end
-- yes, this is very hacky, but due to new_async in
-- https://github.com/glepnir/galaxyline.nvim/blob/main/lua/galaxyline/provider.lua#L5-L36
-- it doesn't work properly and some statusline stuff dissapears
local vcs = require "galaxyline.provider_vcs"
local fileinfo = require "galaxyline.provider_fileinfo"
local buffer = require "galaxyline.provider_buffer"
local extension = require "galaxyline.provider_extensions"
local whitespace = require "galaxyline.provider_whitespace"
local lspclient = require "galaxyline.provider_lsp"
_G.galaxyline_providers = {
BufferIcon = buffer.get_buffer_type_icon,
BufferNumber = buffer.get_buffer_number,
FileTypeName = buffer.get_buffer_filetype,
GitBranch = vcs.get_git_branch,
DiffAdd = vcs.diff_add,
DiffModified = vcs.diff_modified,
DiffRemove = vcs.diff_remove,
LineColumn = fileinfo.line_column,
FileFormat = fileinfo.get_file_format,
FileEncode = fileinfo.get_file_encode,
FileSize = fileinfo.get_file_size,
FileIcon = fileinfo.get_file_icon,
FileName = fileinfo.get_current_file_name,
SFileName = fileinfo.filename_in_special_buffer,
LinePercent = fileinfo.current_line_percent,
ScrollBar = extension.scrollbar_instance,
VistaPlugin = extension.vista_nearest,
WhiteSpace = whitespace.get_item,
GetLspClient = lspclient.get_lsp_client,
}
local diagnostic = require "galaxyline.provider_diagnostic"
_G.galaxyline_providers.DiagnosticError = diagnostic.get_diagnostic_error
_G.galaxyline_providers.DiagnosticWarn = diagnostic.get_diagnostic_warn
_G.galaxyline_providers.DiagnosticHint = diagnostic.get_diagnostic_hint
_G.galaxyline_providers.DiagnosticInfo = diagnostic.get_diagnostic_info
return true
end
-- toggle between 2 themes
-- argument should be a table with 2 theme names
M.toggle_theme = function(themes)
local current_theme = vim.g.current_nvchad_theme or vim.g.nvchad_theme
for _, name in ipairs(themes) do
if name ~= current_theme then
if require("utils").reload_theme(name) then
-- open a buffer and close it to reload the statusline
vim.cmd "new|bwipeout"
vim.g.current_nvchad_theme = name
if M.change_theme(vim.g.nvchad_theme, name) then
vim.g.nvchad_theme = name
end
end
end
end
end
-- update nvchad
M.update_nvchad = function()
-- in all the comments below, config means user config
local config_path = vim.fn.stdpath "config"
local config_name = vim.g.nvchad_user_config or "chadrc"
local config_file = config_path .. "/lua/" .. config_name .. ".lua"
-- generate a random file name
local config_file_backup = config_path .. "/" .. config_name .. ".lua.bak." .. math.random()
local utils = require "utils"
local echo = utils.echo
local current_config = utils.load_config()
local update_url = current_config.options.update_url or "https://github.com/NvChad/NvChad"
local update_branch = current_config.options.update_branch or "main"
-- ask the user for confirmation to update because we are going to run git reset --hard
echo { { "Url: ", "Title" }, { update_url } }
echo { { "Branch: ", "Title" }, { update_branch } }
echo {
{ "\nUpdater will run", "WarningMsg" },
{ " git reset --hard " },
{
"in config folder, so changes to existing repo files except ",
"WarningMsg",
},
{ config_name },
{ " will be lost!\n\nUpdate NvChad ? [y/N]", "WarningMsg" },
}
local ans = string.lower(vim.fn.input "-> ") == "y"
utils.clear_cmdline()
if not ans then
echo { { "Update cancelled!", "Title" } }
return
end
-- first try to fetch contents of config, this will make sure it is readable and taking backup of its contents
local config_contents = utils.file("r", config_file)
-- also make a local backup in ~/.config/nvim, will be removed when config is succesfully restored
utils.file("w", config_file_backup, config_contents)
-- write original config file with its contents, will make sure charc is writable, this maybe overkill but a little precaution always helps
utils.file("w", config_file, config_contents)
-- function that will executed when git commands are done
local function update_exit(_, code)
-- restore config file irrespective of whether git commands were succesfull or not
if pcall(function()
utils.file("w", config_file, config_contents)
end) then
-- config restored succesfully, remove backup file that was created
if not pcall(os.remove, config_file_backup) then
echo { { "Warning: Failed to remove backup chadrc, remove manually.", "WarningMsg" } }
echo { { "Path: ", "WarningMsg" }, { config_file_backup } }
end
else
echo { { "Error: Restoring " .. config_name .. " failed.\n", "ErrorMsg" } }
echo { { "Backed up " .. config_name .. " path: " .. config_file_backup .. "\n\n", "None" } }
end
-- close the terminal buffer only if update was success, as in case of error, we need the error message
if code == 0 then
vim.cmd "bd!"
echo { { "NvChad succesfully updated.\n", "String" } }
else
echo { { "Error: NvChad Update failed.\n", "ErrorMsg" } }
end
end
-- git commands that will executed, reset in case config was modfied
-- use --ff-only to not mess up if the local repo is outdated
local update_script = table.concat({
"git reset --hard && git pull --set-upstream",
update_url,
update_branch,
"--ff-only",
}, " ")
-- open a new buffer
vim.cmd "new"
-- finally open the pseudo terminal buffer
vim.fn.termopen(update_script, {
-- change dir to config path so we don't need to move in script
cwd = config_path,
on_exit = update_exit,
})
end
return M
-45
View File
@@ -1,45 +0,0 @@
require("which-key").setup {
plugins = {
marks = true, -- shows a list of your marks on ' and `
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
-- No actual key bindings are created
spelling = {
enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
suggestions = 20 -- how many suggestions should be shown in the list?
},
presets = {
operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
motions = true, -- adds help for motions
text_objects = true, -- help for text objects triggered after entering an operator
windows = true, -- default bindings on <c-w>
nav = true, -- misc bindings to work with windows
z = true, -- bindings for folds, spelling and others prefixed with z
g = true -- bindings for prefixed with g
}
},
-- add operators that will trigger motion and text object completion
-- to enable all native operators, set the preset / operators plugin above
operators = {gc = "Comments"},
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "➜", -- symbol used between a key and it's label
group = "+" -- symbol prepended to a group
},
window = {
border = "none", -- none, single, double, shadow
position = "bottom", -- bottom, top
margin = {1, 0, 1, 0}, -- extra window margin [top, right, bottom, left]
padding = {2, 2, 2, 2} -- extra window padding [top, right, bottom, left]
},
layout = {
height = {min = 4, max = 25}, -- min and max height of the columns
width = {min = 20, max = 50}, -- min and max width of the columns
spacing = 3 -- spacing between columns
},
ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
hidden = {"<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
show_help = true, -- show help message on the command line when the popup is visible
triggers = "auto" -- automatically setup triggers
-- triggers = {"<leader>"} -- or specifiy a list manually
}
-47
View File
@@ -1,47 +0,0 @@
local true_zen = require("true-zen")
true_zen.setup(
{
true_false_commands = false,
cursor_by_mode = false,
before_minimalist_mode_shown = true,
before_minimalist_mode_hidden = true,
after_minimalist_mode_shown = true,
after_minimalist_mode_hidden = true,
bottom = {
hidden_laststatus = 0,
hidden_ruler = false,
hidden_showmode = false,
hidden_showcmd = false,
hidden_cmdheight = 1,
shown_laststatus = 2,
shown_ruler = true,
shown_showmode = false,
shown_showcmd = false,
shown_cmdheight = 1
},
top = {
hidden_showtabline = 0,
shown_showtabline = 2
},
left = {
hidden_number = false,
hidden_relativenumber = false,
hidden_signcolumn = "no",
shown_number = true,
shown_relativenumber = false,
shown_signcolumn = "yes"
},
ataraxis = {
just_do_it_for_me = false,
left_padding = 37,
right_padding = 37,
top_padding = 2,
bottom_padding = 2,
custome_bg = "#1e222a"
},
integrations = {
integration_galaxyline = true
}
}
)