Clean up the neovim config

This commit is contained in:
Anas Elgarhy 2022-05-12 16:32:10 +02:00
parent 32ee90ef6f
commit bce43311f3
39 changed files with 20 additions and 3436 deletions

View File

@ -1,161 +0,0 @@
# [CONTRIBUTING](https://nvchad.github.io/contribute)
## NvChad install for contributors
If you wish to contribute to NvChad, you should:
1. [create a fork on GitHub](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
2. clone your fork to your machine
- For ssh:
```shell
$ git clone git@github.com:<YOUR GITHUB USERNAME>/NvChad.git ~/.config/nvim
```
- For https:
```shell
$ git clone https://github.com/<YOUR GITHUB USERNAME>/NvChad.git ~/.config/nvim
```
3. [add a new remote repo to track](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams)
- this means you can push/pull as normal to your own repo, but also easily track & update from the NvChad repo
- for ssh:
```shell
$ git remote add upstream git@github.com:NvChad/NvChad.git
```
- for https:
```shell
$ git remote add upstream https://github.com/NvChad/NvChad.git
```
4. any time you create a branch to do some work, use
```shell
$ git fetch upstream && git checkout -b dev-myFEAT upstream/main
```
5. only use the **--rebase** flag to update your dev branch
- this means that there are no `Merge NvChad/main into devBranch` commits, which are to be avoided
```shell
$ git pull upstream --rebase
```
## Things to know before contributing
- When making a PR (pull request), please be very descriptive about what you've done!
- PR titles should be formatted with 'fix', 'chore' or 'feat'. ex: `feat: add new plugin`
- PRs should follow the pull request formats where applicable
- We are open to all PRs, but may decline some for a myriad of reasons. Though don't be discouraged! We'll still be open to discussions.
- PR's are always welcomed however NvChad aims to be less bloated. So PR's regarding existing plugin's enhancement and creating new features with existing plugins itself ( without adding a new plugin), bug fixes and corrections are more encouraged.
- NvChad won't keep adding more and more features (like adding new plugins most likely) as requested if they feel unneeded and aren't usable by the majority!! If you think the plugin you want to be added is very useful and many NvChaders would find it useful, then such feature's PR is welcomed!
- But adding specific features like adding config for [wakatime](https://github.com/wakatime/vim-wakatime) etc will be added in this [chad user configs](https://github.com/NvChad/NvChad/wiki/Chad-user-configs). This lets the user select the things only they want ( adding configs from extra configs ).
## How to remove or edit commits from your PR
> You may have been directed here to remove a commit such as a merge commit: `Merge NvChad/main into devBranch` from your PR
> As these commands edit your git history, you may need to **force push** with `git push origin --force`
1. Run the following:
```
$ git rebase -i HEAD~<NUMBER OF COMMITS TO GO BACK>
```
<details><summary>Example</summary>
<p>
```shell
$ git rebase -i HEAD~4
```
```shell
pick 28b2dcb statusline add lsp status
pick dad9a39 feat: Added lsp radial progress
pick 68f72f1 add clickable btn for exiting nvim
pick b281b53 avoid using q! for quitting vim
# Rebase 52b655b..b281b53 onto 52b655b (4 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
```
</p>
</details>
2. Change the `pick` commands to whatever you wish, you may wish to `d` `drop` or `e` `edit` a commit. Then save & quit this git file to run it.
<details><summary>Example</summary>
<p>
```shell {3,4}
pick 28b2dcb statusline add lsp status
pick dad9a39 feat: Added lsp radial progress
edit 68f72f1 add clickable btn for exiting nvim
d b281b53 avoid using q! for quitting vim
# Rebase 52b655b..b281b53 onto 52b655b (4 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
```
</p>
</details>
3. If you picked `drop` you are done, if you picked `edit` then edit your files, then run:
```shell
$ git add <files>
```
4. Once you have edited & added your files, run:
```shell
$ git rebase --continue
```
5. You will likely need to push using:
```shell
$ git push origin --force
```
## Help
For help with contributing and anything else nvChad related join the [discord](https://discord.gg/VyPxsGArXc)

View File

@ -1,3 +0,0 @@
patreon: siduck
ko_fi: siduck
custom: ["https://www.buymeacoffee.com/siduck", "https://www.paypal.com/paypalme/siduck76"]

View File

@ -1,32 +0,0 @@
---
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.

View File

@ -1,8 +0,0 @@
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."

View File

@ -1,23 +0,0 @@
---
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

View File

@ -1,14 +0,0 @@
Fixes Issue # (If it doesn't fix an issue then delete this line)
Features Added:
- Plugin Name (Add links if possible too)
Reasoning:
List why the feature is needed
Speed (If applicable):
Show the impact on the speed of nvChad
Other:
Anything else relevant goes here

View File

@ -1,16 +0,0 @@
(Make sure your title is either: 'fix', 'chore', or 'feat' then your title. ex: `fix: add new plugin`)
Fixes Issue # (If it doesn't fix an issue then delete this line)
Plugins Added:
- [Plugin Name](Plugin Link)
- [Plugin Name](Plugin Link)
Reasoning:
List why the plugin(s) should be added
Speed:
Show the impact on the speed of nvChad
Other:
Anything else relevant goes here

View File

@ -1,168 +0,0 @@
<h1 align="center">NvChad</h1>
<div align="center">
<a href="https://nvchad.github.io/">Home</a>
<span></span>
<a href="https://nvchad.github.io/getting-started/setup">Install</a>
<span></span>
<a href="https://nvchad.github.io/contribute">Contribute</a>
<span></span>
<a href="https://github.com/NvChad/NvChad#gift_heart-support">Support</a>
<span></span>
<a href="https://nvchad.github.io/Extras">Extras</a>
<p></p>
</div>
<div align="center">
[![Super Linter](https://img.shields.io/github/workflow/status/NvChad/NvChad/Super-Linter/main?style=flat-square&logo=github&label=Build&color=8DBBE9)]()
<a href="https://github.com/NvChad/NvChad/blob/main/LICENSE"
><img
src="https://img.shields.io/github/license/NvChad/NvChad?style=flat-square&logo=GNU&label=License&color=df967f"
alt="License"
/>
[![Neovim Minimum Version](https://img.shields.io/badge/Neovim-0.7.0-blueviolet.svg?style=flat-square&logo=Neovim&color=90E59A&logoColor=white)](https://github.com/neovim/neovim)
[![GitHub Issues](https://img.shields.io/github/issues/NvChad/NvChad.svg?style=flat-square&label=Issues&color=d77982)](https://github.com/NvChad/NvChad/issues)
[![Discord](https://img.shields.io/discord/869557815780470834?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/gADmkJb9Fb)
[![Matrix](https://img.shields.io/badge/Matrix-40aa8b.svg?style=flat-square&logo=Matrix&logoColor=white)](https://matrix.to/#/#nvchad:matrix.org)
[![Telegram](https://img.shields.io/badge/Telegram-blue.svg?style=flat-square&logo=Telegram&logoColor=white)](https://t.me/DE_WM)
</div>
## Showcase
<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/dashboard-nvim.png"><hr>
<img src="https://cdn.discordapp.com/attachments/610012460828852229/853933487295299584/unknown.png"><hr>
<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/initialNvim1.png"><hr>
<img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/initialNvim.png"><hr>
## Theme Showcase
<details><summary> <b>Images (Click to expand!)</b></summary>
![onedark](https://user-images.githubusercontent.com/59060246/130129880-59ab1ad5-9aa6-4f50-9ddd-d8dde0c16257.png)
![nord](https://user-images.githubusercontent.com/59060246/130129890-c01117df-ac3d-40dd-b95d-2681c2461bb4.png)
![gruvchad](https://user-images.githubusercontent.com/59060246/130129897-a68b1585-f42d-4325-8482-102dd2fe1e9e.png)
![everforest](https://user-images.githubusercontent.com/59060246/130129901-5e582f3e-b776-4d0c-9790-be5ae738b5a8.png)
</details>
## Very useful plugins used
<details><summary> <b>Images (Click to expand!)</b></summary>
<h3> Nvim-tree.lua </h3>
Fast file tree:
<kbd><img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/nvimtree.png"></kbd><hr>
<h3> Telescope-nvim </h3>
A fuzzy file finder, picker, sorter, previewer and much more:
<kbd><img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/tel.png"></kbd>
<h3> Indent-blankline.nvim </h3>
Adds indentline:
<kbd><img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/blanklineNvim.png"></kbd><hr>
<h3> Feline.nvim </h3>
Highly configurable statusline plugin:
<kbd><img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/statusline.png"></kbd><hr>
<h3> Nvim-bufferline.lua </h3>
Better tab implementation:
<kbd><img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/bufferline.png"></kbd><hr>
<h3> Nvim-web-devicons </h3>
Lua fork of Vim Devicons which offers more file icon customisability:
<kbd><img src="https://raw.githubusercontent.com/siduck/dotfiles/all/rice%20flex/image.png"></kbd><hr>
<h3> Nvim-treesitter </h3
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/siduck/dotfiles/all/rice%20flex/woTree.png"></kbd><hr>
</details>
## Credits
- [Elianiva](https://github.com/elianiva) helped me with NeoVim Lua related issues many times, NvChad wouldn't exist without his help at all.
- @lorvethe for making the beautiful NvChad logo.
## Features
- Many beautiful themes to choose from.
- Fast plugin loading.
- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua).
- Managing tabs, buffers with [bufferline.nvim](https://github.com/akinsho/bufferline.nvim).
- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons).
- Pretty and functional statusline with [feline.nvim](https://github.com/Famiu/feline.nvim).
- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) .
- NeoVim Lsp configuration with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig).
- Autocompletion with [nvim-cmp](https://github.com/hrsh7th/nvim-cmp).
- File searching, previewing image and text files and more with [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim).
- Syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter).
- Autoclosing braces and html tags with [nvim-autopairs](https://github.com/windwp/nvim-autopairs).
- Indentlines with [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim).
- Useful snippets with [LuaSnip](https://github.com/L3MON4D3/LuaSnip).
## Bloat
To everyone who thinks that NvChad is bloat: Bloat means different things to everyone.
NvChad has 38 plugins installed by default, yet it is still very fast because it uses the Packer plugin manager. Packer.nvim allows you to lazy load plugins, meaning they only get loaded when absolutely required. Furthermore, you can disable plugins you don't use in `chadrc.lua`.
<img src = "https://chadpaste.com/f/kdmxdabxbk.png">
# TODO
NvChad is focusing more on improving its already existing plugins and features instead of adding more plugins. Things you can do to help currently are:
- Improving base plugins configurations
- Debloating the config.
- Adding more themes.
## Try NvChad in a Docker container
This will leave your current Neovim configuration untouched. Once you exit Neovim, the image is deleted.
```zsh
docker run -w /root -it --rm alpine:edge sh -uelic '
apk add git nodejs neovim ripgrep alpine-sdk --update
git clone https://github.com/NvChad/NvChad ~/.config/nvim
nvim -c "autocmd User PackerComplete quitall" -c "PackerSync"
nvim
'
```
## Chadributors
<a href="https://github.com/NvChad/NvChad/graphs/contributors">
<img src="https://contrib.rocks/image?repo=NvChad/NvChad"/>
</a>
## Warning
If you have an issue with a plugin in NvChad, first you should report it to NvChad to see if it's an issue with it.
## :gift_heart: Support
I'm (@siduck) really very sorry to remove the previous charity links but I had to do it for various reasons. A lot has been going here regarding financial issues and I do need some support if it's possible from your end. I haven't graduated yet and it would be great to earn some stuff as that'd help me with daily minor expenses. If you like NvChad and would like to support it via donation then I'll gladly accept it. Dont worry! NvChad will still stay alive & active without your donations! I will remove the sponsor button and re-add the charity links once I get a job, probably a year or two.
[![kofi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/siduck)
[![paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/siduck76)
[![buymeacoffee](https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/siduck)
[![patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://www.patreon.com/siduck)

View File

@ -1,22 +0,0 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
exempt-all-issue-assignees: true # doesn't close an issue if someone was assigned to it.
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
exempt-all-pr-assignees: true # doesn't close a pr if someone was assigned to it.
days-before-issue-stale: 30
days-before-pr-stale: 45
days-before-issue-close: 5
days-before-pr-close: 10

View File

@ -1,3 +0,0 @@
plugin
custom
spell

View File

@ -1,6 +0,0 @@
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 3
quote_style = "AutoPreferDouble"
no_call_parentheses = true

View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,28 +0,0 @@
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json", ".git/", ".hg/"],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
},
"bash": {
"command": "bash-language-server",
"args": ["start"],
"filetypes": ["sh"]
},
"arduino":{
"command":"/path/to/arduino-language-server",
"rootPatterns":["*.ino"],
"filetypes":["arduino"],
"args":["-cli", "/path/to/arduino-cli", "-clangd", "/path/to/clangd", "-cli-config", "/path/to/arduino-cli.yaml"]
},
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
}

View File

@ -1,9 +0,0 @@
-- example file i.e lua/custom/init.lua
-- MAPPINGS
local map = nvchad.map
map("n", "<leader>cc", ":Telescope <CR>")
map("n", "<leader>q", ":q <CR>")
-- require("my autocmds file") or just declare them here

View File

@ -1,31 +0,0 @@
local present, impatient = pcall(require, "impatient")
if present then
impatient.enable_profile()
end
local core_modules = {
"core.utils",
"core.options",
"core.autocmds",
"core.mappings",
}
for _, module in ipairs(core_modules) do
local ok, err = pcall(require, module)
if not ok then
error("Error loading " .. module .. "\n\n" .. err)
end
end
-- check if custom init.lua file exists
if vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/init.lua") == 1 then
-- try to call custom init, if not successful, show error
local ok, err = pcall(require, "custom")
if not ok then
vim.notify("Error loading custom/init.lua\n\n" .. err)
end
return
end

View File

@ -1,69 +0,0 @@
set number
set relativenumber
set autoindent
set tabstop=4
set shiftwidth=4
set smarttab
set softtabstop=4
set encoding=UTF-8
set clipboard+=unnamedplus " Allow nvim to copy/paste from/to the clipboard"
syntax on " Enable syntax highlighting
set wildmode=longest,list,full " Enable autocompletion
" Install vim-plug if not already installed
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
echo "Downloading junegunn/vim-plug to manage plugins..."
silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim
autocmd VimEnter * PlugInstall
endif
" Plugins
call plug#begin()
Plug 'https://github.com/wakatime/vim-wakatime' " wakatime plugin
Plug 'https://github.com/github/copilot.vim' " Copilot
Plug 'https://github.com/vim-scripts/Gist.vim' " Gits plugin
Plug 'https://github.com/folke/todo-comments.nvim' " Highlight todo comments
Plug 'https://github.com/tpope/vim-surround' " Surround
Plug 'https://github.com/tpope/vim-commentary' " Commenting gcc &gc
Plug 'https://github.com/preservim/nerdtree' " File tree
Plug 'https://github.com/preservim/tagbar' " Tagbar
Plug 'https://github.com/terryma/vim-multiple-cursors' " Multiple cursors
Plug 'https://github.com/vim-airline/vim-airline' " Status bar theme
Plug 'https://github.com/nvim-lua/plenary.nvim' " Plenary
Plug 'https://github.com/nvim-telescope/telescope.nvim' " Finder
Plug 'https://github.com/tmux-plugins/vim-tmux' " Tmux plugin
call plug#end()
" NERDTree keybindings
nnoremap <C-f> :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-l> :call CocActionAsync('jumpDefinition')<CR>
" air-line
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" airline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ' LN '
let g:airline_symbols.colnr = ' CN '
" Vim sence (discord) settings
let g:vimsence_small_text = 'NeoVim'
let g:vimsence_small_image = 'neovim'
let g:vimsence_editing_details = 'Editing: {}'
let g:vimsence_editing_state = 'Working on: {}'
let g:vimsence_file_explorer_text = 'In NERDTree'
let g:vimsence_file_explorer_details = 'Looking for files'
let g:vimsence_custom_icons = {'filetype': 'iconname'}

View File

@ -1,73 +0,0 @@
local autocmd = vim.api.nvim_create_autocmd
-- Disable statusline in dashboard
autocmd("FileType", {
pattern = "alpha",
callback = function()
vim.opt.laststatus = 0
end,
})
autocmd("BufUnload", {
buffer = 0,
callback = function()
vim.opt.laststatus = 3
end,
})
-- Uncomment this if you want to open nvim with a dir
-- autocmd("BufEnter", {
-- callback = function()
-- if vim.api.nvim_buf_get_option(0, "buftype") ~= "terminal" then
-- vim.cmd "lcd %:p:h"
-- end
-- end,
-- })
-- Use relative & absolute line numbers in 'n' & 'i' modes respectively
-- autocmd("InsertEnter", {
-- callback = function()
-- vim.opt.relativenumber = false
-- end,
-- })
-- autocmd("InsertLeave", {
-- callback = function()
-- vim.opt.relativenumber = true
-- end,
-- })
-- Open a file from its last left off position
-- autocmd("BufReadPost", {
-- callback = function()
-- if not vim.fn.expand("%:p"):match ".git" and vim.fn.line "'\"" > 1 and vim.fn.line "'\"" <= vim.fn.line "$" then
-- vim.cmd "normal! g'\""
-- vim.cmd "normal zz"
-- end
-- end,
-- })
-- File extension specific tabbing
-- autocmd("Filetype", {
-- pattern = "python",
-- callback = function()
-- vim.opt_local.expandtab = true
-- vim.opt_local.tabstop = 4
-- vim.opt_local.shiftwidth = 4
-- vim.opt_local.softtabstop = 4
-- end,
-- })
-- Highlight yanked text
-- autocmd("TextYankPost", {
-- callback = function()
-- vim.highlight.on_yank { higroup = "Visual", timeout = 200 }
-- end,
-- })
-- Enable spellchecking in markdown, text and gitcommit files
-- autocmd("FileType", {
-- pattern = { "gitcommit", "markdown", "text" },
-- callback = function()
-- vim.opt_local.spell = true
-- end,
-- })

View File

@ -1,55 +0,0 @@
-- IMPORTANT NOTE : This is default config, so dont change anything here.
-- chadrc overrides this file
local M = {}
M.options = {
-- load your options here or load module with options1
user = function() end,
nvChad = {
-- updater
update_url = "https://github.com/NvChad/NvChad",
update_branch = "main",
},
}
---- UI -----
M.ui = {
hl_override = {},
changed_themes = {},
colors = {}, -- dynamically generated, never edit this in chadrc
theme_toggle = { "onedark", "one_light" },
theme = "onedark", -- default theme
transparency = false,
}
M.plugins = {
override = {},
remove = {},
options = {
packer = {
init_file = "plugins.packerInit",
snapshot = nil,
},
lspconfig = {
setup_lspconf = "", -- path of lspconfig file
},
statusline = {
separator_style = "default", -- default/round/slant/block/arrow
},
},
-- add, modify, remove plugins
user = {},
}
-- non plugin only
M.mappings = {
misc = function() end,
}
return M

View File

@ -1,201 +0,0 @@
local map = nvchad.map
local cmd = vim.cmd
local user_cmd = vim.api.nvim_create_user_command
-- This is a wrapper function made to disable a plugin mapping from chadrc
-- If keys are nil, false or empty string, then the mapping will be not applied
-- Useful when one wants to use that keymap for any other purpose
-- Don't copy the replaced text after pasting in visual mode
-- https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text#Alternative_mapping_for_paste
map("v", "p", 'p:let @+=@0<CR>:let @"=@0<CR>', { silent = true })
-- Allow moving the cursor through wrapped lines with j, k, <Up> and <Down>
-- http<cmd> ://www.reddit.com/r/vim/comments/2k4cbr/problem_with_gj_and_gk/
-- empty mode is same as using <cmd> :map
-- also don't use g[j|k] when in operator pending mode, so it doesn't alter d, y or c behaviour
map({ "n", "x", "o" }, "j", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
map({ "n", "x", "o" }, "k", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
map("", "<Down>", 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', { expr = true })
map("", "<Up>", 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', { expr = true })
-- use ESC to turn off search highlighting
map("n", "<Esc>", "<cmd> :noh <CR>")
-- move cursor within insert mode
map("i", "<C-h>", "<Left>")
map("i", "<C-e>", "<End>")
map("i", "<C-l>", "<Right>")
map("i", "<C-j>", "<Down>")
map("i", "<C-k>", "<Up>")
map("i", "<C-a>", "<ESC>^i")
-- navigation between windows
map("n", "<C-h>", "<C-w>h")
map("n", "<C-l>", "<C-w>l")
map("n", "<C-k>", "<C-w>k")
map("n", "<C-j>", "<C-w>j")
map("n", "<leader>x", function()
nvchad.close_buffer()
end)
map("n", "<C-c>", "<cmd> :%y+ <CR>") -- copy whole file content
map("n", "<S-t>", "<cmd> :enew <CR>") -- new buffer
map("n", "<C-t>b", "<cmd> :tabnew <CR>") -- new tabs
map("n", "<leader>n", "<cmd> :set nu! <CR>")
map("n", "<leader>rn", "<cmd> :set rnu! <CR>") -- relative line numbers
map("n", "<C-s>", "<cmd> :w <CR>") -- ctrl + s to save file
-- terminal mappings
-- get out of terminal mode
map("t", { "jk" }, "<C-\\><C-n>")
-- Add Packer commands because we are not loading it at startup
local packer_cmd = function(callback)
return function()
require "plugins"
require("packer")[callback]()
end
end
-- snapshot stuff
user_cmd("PackerSnapshot", function(info)
require "plugins"
require("packer").snapshot(info.args)
end, { nargs = "+" })
user_cmd("PackerSnapshotDelete", function(info)
require "plugins"
require("packer.snapshot").delete(info.args)
end, { nargs = "+" })
user_cmd("PackerSnapshotRollback", function(info)
require "plugins"
require("packer").rollback(info.args)
end, { nargs = "+" })
user_cmd("PackerClean", packer_cmd "clean", {})
user_cmd("PackerCompile", packer_cmd "compile", {})
user_cmd("PackerInstall", packer_cmd "install", {})
user_cmd("PackerStatus", packer_cmd "status", {})
user_cmd("PackerSync", packer_cmd "sync", {})
user_cmd("PackerUpdate", packer_cmd "update", {})
-- add NvChadUpdate command and mapping
cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()"
map("n", "<leader>uu", "<cmd> :NvChadUpdate <CR>")
-- load overriden misc mappings
nvchad.load_config().mappings.misc()
local M = {}
-- below are all plugin related mappings
M.bufferline = function()
map("n", "<TAB>", "<cmd> :BufferLineCycleNext <CR>")
map("n", "<S-Tab>", "<cmd> :BufferLineCyclePrev <CR>")
end
M.comment = function()
map("n", "<leader>/", "<cmd> :lua require('Comment.api').toggle_current_linewise()<CR>")
map("v", "<leader>/", "<esc><cmd> :lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())<CR>")
end
M.lspconfig = function()
-- See `<cmd> :help vim.lsp.*` for documentation on any of the below functions
map("n", "gD", function()
vim.lsp.buf.declaration()
end)
map("n", "gd", function()
vim.lsp.buf.definition()
end)
map("n", "K", function()
vim.lsp.buf.hover()
end)
map("n", "gi", function()
vim.lsp.buf.implementation()
end)
map("n", "<C-k>", function()
vim.lsp.buf.signature_help()
end)
map("n", "<leader>D", function()
vim.lsp.buf.type_definition()
end)
map("n", "<leader>ra", function()
vim.lsp.buf.rename()
end)
map("n", "<leader>ca", function()
vim.lsp.buf.code_action()
end)
map("n", "gr", function()
vim.lsp.buf.references()
end)
map("n", "<leader>f", function()
vim.diagnostic.open_float()
end)
map("n", "[d", function()
vim.diagnostic.goto_prev()
end)
map("n", "d]", function()
vim.diagnostic.goto_next()
end)
map("n", "<leader>q", function()
vim.diagnostic.setloclist()
end)
map("n", "<leader>fm", function()
vim.lsp.buf.formatting()
end)
map("n", "<leader>wa", function()
vim.lsp.buf.add_workspace_folder()
end)
map("n", "<leader>wr", function()
vim.lsp.buf.remove_workspace_folder()
end)
map("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end)
end
M.nvimtree = function()
map("n", "<C-n>", "<cmd> :NvimTreeToggle <CR>")
map("n", "<leader>e", "<cmd> :NvimTreeFocus <CR>")
end
M.telescope = function()
map("n", "<leader>fb", "<cmd> :Telescope buffers <CR>")
map("n", "<leader>ff", "<cmd> :Telescope find_files <CR>")
map("n", "<leader>fa", "<cmd> :Telescope find_files follow=true no_ignore=true hidden=true <CR>")
map("n", "<leader>cm", "<cmd> :Telescope git_commits <CR>")
map("n", "<leader>gt", "<cmd> :Telescope git_status <CR>")
map("n", "<leader>fh", "<cmd> :Telescope help_tags <CR>")
map("n", "<leader>fw", "<cmd> :Telescope live_grep <CR>")
map("n", "<leader>fo", "<cmd> :Telescope oldfiles <CR>")
map("n", "<leader>th", "<cmd> :Telescope themes <CR>")
map("n", "<leader>tk", "<cmd> :Telescope keymaps <CR>")
-- pick a hidden term
map("n", "<leader>W", "<cmd> :Telescope terms <CR>")
end
return M

View File

@ -1,87 +0,0 @@
local opt = vim.opt
local g = vim.g
-- use filetype.lua instead of filetype.vim
g.did_load_filetypes = 0
g.do_filetype_lua = 1
g.toggle_theme_icon = ""
opt.confirm = true
opt.laststatus = 3 -- global statusline
opt.title = true
opt.clipboard = "unnamedplus"
opt.cmdheight = 1
opt.cul = true -- cursor line
-- Indentline
opt.expandtab = true
opt.shiftwidth = 2
opt.smartindent = true
-- disable tilde on end of buffer: https://github.com/neovim/neovim/pull/8546#issuecomment-643643758
opt.fillchars = { eob = " " }
opt.hidden = true
opt.ignorecase = true
opt.smartcase = true
opt.mouse = "a"
-- Numbers
opt.number = true
opt.numberwidth = 2
opt.relativenumber = false
opt.ruler = false
-- disable nvim intro
opt.shortmess:append "sI"
opt.signcolumn = "yes"
opt.splitbelow = true
opt.splitright = true
opt.tabstop = 8
opt.termguicolors = true
opt.timeoutlen = 400
opt.undofile = true
-- interval for writing swap file to disk, also used by gitsigns
opt.updatetime = 250
-- 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 = " "
-- disable some builtin vim plugins
local default_plugins = {
"2html_plugin",
"getscript",
"getscriptPlugin",
"gzip",
"logipat",
"netrw",
"netrwPlugin",
"netrwSettings",
"netrwFileHandlers",
"matchit",
"tar",
"tarPlugin",
"rrhelper",
"spellfile_plugin",
"vimball",
"vimballPlugin",
"zip",
"zipPlugin",
}
for _, plugin in pairs(default_plugins) do
g["loaded_" .. plugin] = 1
end
vim.schedule(function()
vim.opt.shadafile = vim.fn.expand "$HOME" .. "/.local/share/nvim/shada/main.shada"
vim.cmd [[ silent! rsh ]]
end)
-- load user options if the file exists
nvchad.load_config().options.user()

View File

@ -1,117 +0,0 @@
_G.nvchad = {}
nvchad.close_buffer = function(force)
if vim.bo.buftype == "terminal" then
vim.api.nvim_win_hide(0)
return
end
local fileExists = vim.fn.filereadable(vim.fn.expand "%p")
local modified = vim.api.nvim_buf_get_option(vim.fn.bufnr(), "modified")
-- if file doesnt exist & its modified
if fileExists == 0 and modified then
print "no file name? add it now!"
return
end
force = force or not vim.bo.buflisted or vim.bo.buftype == "nofile"
-- if not force, change to prev buf and then close current
local close_cmd = force and ":bd!" or ":bp | bd" .. vim.fn.bufnr()
vim.cmd(close_cmd)
end
nvchad.load_config = function()
local conf = require "core.default_config"
-- attempt to load and merge a user config
local chadrc_exists = vim.fn.filereadable(vim.fn.stdpath "config" .. "/lua/custom/chadrc.lua") == 1
if chadrc_exists then
-- merge user config if it exists and is a table; otherwise display an error
local user_config = require "custom.chadrc"
if type(user_config) == "table" then
conf = vim.tbl_deep_extend("force", conf, user_config)
else
error "User config (chadrc.lua) *must* return a table!"
end
end
return conf
end
nvchad.map = function(mode, keys, command, opt)
local options = { silent = true }
if opt then
options = vim.tbl_extend("force", options, opt)
end
if type(keys) == "table" then
for _, keymap in ipairs(keys) do
nvchad.map(mode, keymap, command, opt)
end
return
end
vim.keymap.set(mode, keys, command, opt)
end
-- load plugin after entering vim ui
nvchad.packer_lazy_load = function(plugin, timer)
if plugin then
timer = timer or 0
vim.defer_fn(function()
require("packer").loader(plugin)
end, timer)
end
end
-- remove plugins defined in chadrc
nvchad.remove_default_plugins = function(plugins)
local removals = nvchad.load_config().plugins.remove or {}
if not vim.tbl_isempty(removals) then
for _, plugin in pairs(removals) do
plugins[plugin] = nil
end
end
return plugins
end
-- merge default/user plugin tables
nvchad.plugin_list = function(default_plugins)
local user_plugins = nvchad.load_config().plugins.user
-- require if string is present
local ok
if type(user_plugins) == "string" then
ok, user_plugins = pcall(require, user_plugins)
if ok and not type(user_plugins) == "table" then
user_plugins = {}
end
end
-- merge default + user plugin table
default_plugins = vim.tbl_deep_extend("force", default_plugins, user_plugins)
local final_table = {}
for key, _ in pairs(default_plugins) do
default_plugins[key][1] = key
final_table[#final_table + 1] = default_plugins[key]
end
return final_table
end
nvchad.load_override = function(default_table, plugin_name)
local user_table = nvchad.load_config().plugins.override[plugin_name]
if type(user_table) == "table" then
default_table = vim.tbl_deep_extend("force", default_table, user_table)
else
default_table = default_table
end
return default_table
end

View File

@ -0,0 +1,9 @@
-- example file i.e lua/custom/init.lua
-- MAPPINGS
vim.api.nvim_set_keymap("i", "<C-J>", 'copilot#Accept("<CR>")', { silent = true, expr = true })
-- Github copilot config
vim.g.copilot_no_tab_map = true

View File

@ -0,0 +1,11 @@
-- My plugins
return {
["kovetskiy/sxhkd-vim"] = {},
["wakatime/vim-wakatime"] = {},
["github/copilot.vim"] = {},
}

View File

@ -1,90 +0,0 @@
local present, alpha = pcall(require, "alpha")
if not present then
return
end
local function button(sc, txt, keybind)
local sc_ = sc:gsub("%s", ""):gsub("SPC", "<leader>")
local opts = {
position = "center",
text = txt,
shortcut = sc,
cursor = 5,
width = 36,
align_shortcut = "right",
hl = "AlphaButtons",
}
if keybind then
opts.keymap = { "n", sc_, keybind, { noremap = true, silent = true } }
end
return {
type = "button",
val = txt,
on_press = function()
local key = vim.api.nvim_replace_termcodes(sc_, true, false, true)
vim.api.nvim_feedkeys(key, "normal", false)
end,
opts = opts,
}
end
local options = {}
local ascii = {
" ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ",
" ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
" ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
" ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ",
" ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ",
" ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ",
" ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ",
" ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ",
" ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ",
" ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ",
" ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ",
}
options.header = {
type = "text",
val = ascii,
opts = {
position = "center",
hl = "AlphaHeader",
},
}
options.buttons = {
type = "group",
val = {
button("SPC f f", " Find File ", ":Telescope find_files<CR>"),
button("SPC f o", " Recent File ", ":Telescope oldfiles<CR>"),
button("SPC f w", " Find Word ", ":Telescope live_grep<CR>"),
button("SPC b m", " Bookmarks ", ":Telescope marks<CR>"),
button("SPC t h", " Themes ", ":Telescope themes<CR>"),
button("SPC e s", " Settings", ":e $MYVIMRC | :cd %:p:h <CR>"),
},
opts = {
spacing = 1,
},
}
options = nvchad.load_override(options, "goolord/alpha-nvim")
-- dynamic header padding
local fn = vim.fn
local marginTopPercent = 0.3
local headerPadding = fn.max { 2, fn.floor(fn.winheight(0) * marginTopPercent) }
alpha.setup {
layout = {
{ type = "padding", val = headerPadding },
options.header,
{ type = "padding", val = 2 },
options.buttons,
},
opts = {},
}

View File

@ -1,70 +0,0 @@
local present, bufferline = pcall(require, "bufferline")
if not present then
return
end
vim.cmd [[
function! Toggle_theme(a,b,c,d)
lua require('base46').toggle_theme()
endfunction
function! Quit_vim(a,b,c,d)
qa
endfunction
]]
local options = {
options = {
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
buffer_close_icon = "",
modified_icon = "",
close_icon = "",
show_close_icon = false,
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",
always_show_bufferline = true,
diagnostics = false,
themable = true,
custom_areas = {
right = function()
return {
{ text = "%@Toggle_theme@" .. vim.g.toggle_theme_icon .. "%X" },
{ text = "%@Quit_vim@  %X" },
}
end,
},
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
end
return true
end
return true
end,
},
}
-- check for any override
options = nvchad.load_override(options, "akinsho/bufferline.nvim")
bufferline.setup(options)

View File

@ -1,98 +0,0 @@
local present, cmp = pcall(require, "cmp")
if not present then
return
end
vim.opt.completeopt = "menuone,noselect"
local function border(hl_name)
return {
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
{ "", hl_name },
}
end
local cmp_window = require "cmp.utils.window"
function cmp_window:has_scrollbar()
return false
end
local options = {
window = {
completion = {
border = border "CmpBorder",
},
documentation = {
border = border "CmpDocBorder",
},
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
formatting = {
format = function(_, vim_item)
local icons = require "plugins.configs.lspkind_icons"
vim_item.kind = string.format("%s %s", icons[vim_item.kind], vim_item.kind)
return vim_item
end,
},
mapping = {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require("luasnip").jumpable(-1) then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
else
fallback()
end
end, {
"i",
"s",
}),
},
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "nvim_lua" },
{ name = "path" },
},
}
-- check for any override
options = nvchad.load_override(options, "hrsh7th/nvim-cmp")
cmp.setup(options)

View File

@ -1,123 +0,0 @@
local present, devicons = pcall(require, "nvim-web-devicons")
if not present then
return
end
local options = {
override = {
c = {
icon = "",
name = "c",
},
css = {
icon = "",
name = "css",
},
deb = {
icon = "",
name = "deb",
},
Dockerfile = {
icon = "",
name = "Dockerfile",
},
html = {
icon = "",
name = "html",
},
jpeg = {
icon = "",
name = "jpeg",
},
jpg = {
icon = "",
name = "jpg",
},
js = {
icon = "",
name = "js",
},
kt = {
icon = "󱈙",
name = "kt",
},
lock = {
icon = "",
name = "lock",
},
lua = {
icon = "",
name = "lua",
},
mp3 = {
icon = "",
name = "mp3",
},
mp4 = {
icon = "",
name = "mp4",
},
out = {
icon = "",
name = "out",
},
png = {
icon = "",
name = "png",
},
py = {
icon = "",
name = "py",
},
["robots.txt"] = {
icon = "",
name = "robots",
},
toml = {
icon = "",
name = "toml",
},
ts = {
icon = "",
name = "ts",
},
ttf = {
icon = "",
name = "TrueTypeFont",
},
rb = {
icon = "",
name = "rb",
},
rpm = {
icon = "",
name = "rpm",
},
vue = {
icon = "",
name = "vue",
},
woff = {
icon = "",
name = "WebOpenFontFormat",
},
woff2 = {
icon = "",
name = "WebOpenFontFormat2",
},
xz = {
icon = "",
name = "xz",
},
zip = {
icon = "",
name = "zip",
},
},
}
-- check for any override
options = nvchad.load_override(options, "kyazdani42/nvim-web-devicons")
devicons.setup(options)

View File

@ -1,36 +0,0 @@
local present, lsp_installer = pcall(require, "nvim-lsp-installer")
if not present then
return
end
local options = {
-- ensure_installed is not needed as automatic_installation is enabled
-- then any lsp server you setup by lspconfig is going to get installed automatically!
-- ensure_installed = { "lua" },
automatic_installation = true,
ui = {
icons = {
server_installed = "",
server_pending = "",
server_uninstalled = "",
},
keymaps = {
toggle_server_expand = "<CR>",
install_server = "i",
update_server = "u",
check_server_version = "c",
update_all_servers = "U",
check_outdated_servers = "C",
uninstall_server = "X",
},
},
max_concurrent_installers = 20,
}
options = nvchad.load_override(options, "williamboman/nvim-lsp-installer")
lsp_installer.setup(options)

View File

@ -1,66 +0,0 @@
local present, lspconfig = pcall(require, "lspconfig")
if not present then
return
end
local M = {}
require("plugins.configs.others").lsp_handlers()
function M.on_attach(client, _)
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
require("core.mappings").lspconfig()
end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem = {
documentationFormat = { "markdown", "plaintext" },
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
},
}
lspconfig.sumneko_lua.setup {
on_attach = M.on_attach,
capabilities = capabilities,
settings = {
Lua = {
diagnostics = {
globals = { "vim", "nvchad" },
},
workspace = {
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
},
maxPreload = 100000,
preloadFileSize = 10000,
},
},
},
}
-- requires a file containing user's lspconfigs
local addlsp_confs = nvchad.load_config().plugins.options.lspconfig.setup_lspconf
if #addlsp_confs ~= 0 then
require(addlsp_confs).setup_lsp(M.on_attach, capabilities)
end
return M

View File

@ -1,29 +0,0 @@
local icons = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
return icons

View File

@ -1,85 +0,0 @@
local present, nvimtree = pcall(require, "nvim-tree")
if not present then
return
end
-- globals must be set prior to requiring nvim-tree to function
local g = vim.g
g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names
g.nvim_tree_git_hl = 1
g.nvim_tree_highlight_opened_files = 0
g.nvim_tree_show_icons = {
folders = 1,
files = 1,
git = 1,
folder_arrows = 1,
}
g.nvim_tree_icons = {
default = "",
symlink = "",
git = {
deleted = "",
ignored = "",
renamed = "",
staged = "",
unmerged = "",
unstaged = "",
untracked = "",
},
folder = {
default = "",
empty = "",
empty_open = "",
open = "",
symlink = "",
symlink_open = "",
arrow_open = "",
arrow_closed = "",
},
}
local options = {
filters = {
dotfiles = false,
exclude = { "custom" },
},
disable_netrw = true,
hijack_netrw = true,
ignore_ft_on_setup = { "dashboard" },
open_on_tab = false,
hijack_cursor = true,
hijack_unnamed_buffer_when_opening = false,
update_cwd = true,
update_focused_file = {
enable = true,
update_cwd = false,
},
view = {
side = "left",
width = 25,
hide_root_folder = true,
},
git = {
enable = false,
ignore = true,
},
actions = {
open_file = {
resize_window = true,
},
},
renderer = {
indent_markers = {
enable = false,
},
},
}
-- check for any override
options = nvchad.load_override(options, "kyazdani42/nvim-tree.lua")
nvimtree.setup(options)

View File

@ -1,43 +0,0 @@
local present, nvterm = pcall(require, "nvterm")
if not present then
return
end
local options = {
terminals = {
list = {},
type_opts = {
float = {
relative = "editor",
row = 0.3,
col = 0.25,
width = 0.5,
height = 0.4,
border = "single",
},
horizontal = { location = "rightbelow", split_ratio = 0.3 },
vertical = { location = "rightbelow", split_ratio = 0.5 },
},
},
behavior = {
close_on_exit = true,
auto_insert = true,
},
mappings = {
toggle = {
float = "<A-i>",
horizontal = "<A-h>",
vertical = "<A-v>",
},
new = {
horizontal = "<leader>h",
vertical = "<leader>v",
},
},
enable_new_mappings = true,
}
options = nvchad.load_override(options, "NvChad/nvterm")
nvterm.setup(options)

View File

@ -1,214 +0,0 @@
local M = {}
M.autopairs = function()
local present1, autopairs = pcall(require, "nvim-autopairs")
local present2, cmp = pcall(require, "cmp")
if not present1 and present2 then
return
end
autopairs.setup {
fast_wrap = {},
disable_filetype = { "TelescopePrompt", "vim" },
}
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
end
M.better_escape = function()
local present, escape = pcall(require, "better_escape")
if not present then
return
end
local options = {
mapping = { "jk" }, -- a table with mappings to use
timeout = vim.o.timeoutlen,
clear_empty_lines = false, -- clear line after escaping if there is only whitespace
keys = "<Esc>",
}
options = nvchad.load_override(options, "max397574/better-escape.nvim")
escape.setup(options)
end
M.blankline = function()
local present, blankline = pcall(require, "indent_blankline")
if not present then
return
end
local options = {
indentLine_enabled = 1,
char = "",
filetype_exclude = {
"help",
"terminal",
"alpha",
"packer",
"lspinfo",
"TelescopePrompt",
"TelescopeResults",
"nvchad_cheatsheet",
"lsp-installer",
"",
},
buftype_exclude = { "terminal" },
show_trailing_blankline_indent = false,
show_first_indent_level = false,
}
options = nvchad.load_override(options, "lukas-reineke/indent-blankline.nvim")
blankline.setup(options)
end
M.colorizer = function()
local present, colorizer = pcall(require, "colorizer")
if not present then
return
end
local options = {
filetypes = {
"*",
},
user_default_options = {
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = false, -- "Name" codes like Blue
RRGGBBAA = false, -- #RRGGBBAA hex codes
rgb_fn = false, -- CSS rgb() and rgba() functions
hsl_fn = false, -- CSS hsl() and hsla() functions
css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
-- Available modes: foreground, background
mode = "background", -- Set the display mode.
},
}
options = nvchad.load_override(options, "NvChad/nvim-colorizer.lua")
colorizer.setup(options["filetypes"], options["user_default_options"])
vim.cmd "ColorizerReloadAllBuffers"
end
M.comment = function()
local present, nvim_comment = pcall(require, "Comment")
if not present then
return
end
nvim_comment.setup()
end
M.luasnip = function()
local present, luasnip = pcall(require, "luasnip")
if not present then
return
end
luasnip.config.set_config {
history = true,
updateevents = "TextChanged,TextChangedI",
}
require("luasnip.loaders.from_vscode").lazy_load()
end
M.signature = function()
local present, lsp_signature = pcall(require, "lsp_signature")
if not present then
return
end
local options = {
bind = true,
doc_lines = 0,
floating_window = true,
fix_pos = true,
hint_enable = true,
hint_prefix = "",
hint_scheme = "String",
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
}
options = nvchad.load_override(options, "ray-x/lsp_signature.nvim")
lsp_signature.setup(options)
end
M.lsp_handlers = function()
local function lspSymbol(name, icon)
local hl = "DiagnosticSign" .. name
vim.fn.sign_define(hl, { text = icon, numhl = hl, texthl = hl })
end
lspSymbol("Error", "")
lspSymbol("Info", "")
lspSymbol("Hint", "")
lspSymbol("Warn", "")
vim.diagnostic.config {
virtual_text = {
prefix = "",
},
signs = true,
underline = true,
update_in_insert = false,
}
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
border = "single",
})
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = "single",
})
-- suppress error messages from lang servers
vim.notify = function(msg, log_level)
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
end
M.gitsigns = function()
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 = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" },
},
}
end
return M

View File

@ -1,401 +0,0 @@
local present, feline = pcall(require, "feline")
if not present then
return
end
local options = {
colors = require("base46").get_colors "base_30",
lsp = require "feline.providers.lsp",
lsp_severity = vim.diagnostic.severity,
}
options.icon_styles = {
default = {
left = "",
right = "",
main_icon = "",
vi_mode_icon = "",
position_icon = "",
},
arrow = {
left = "",
right = "",
main_icon = "",
vi_mode_icon = "",
position_icon = "",
},
block = {
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 = "",
},
}
options.separator_style = options.icon_styles[nvchad.load_config().plugins.options.statusline.separator_style]
options.main_icon = {
provider = options.separator_style.main_icon,
hl = {
fg = options.colors.statusline_bg,
bg = options.colors.nord_blue,
},
right_sep = {
str = options.separator_style.right,
hl = {
fg = options.colors.nord_blue,
bg = options.colors.lightbg,
},
},
}
options.file_name = {
provider = function()
local filename = vim.fn.expand "%:t"
local extension = vim.fn.expand "%:e"
local icon = require("nvim-web-devicons").get_icon(filename, extension)
if icon == nil then
icon = ""
return icon
end
return " " .. icon .. " " .. filename .. " "
end,
hl = {
fg = options.colors.white,
bg = options.colors.lightbg,
},
right_sep = {
str = options.separator_style.right,
hl = { fg = options.colors.lightbg, bg = options.colors.lightbg2 },
},
}
options.dir_name = {
provider = function()
local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
return "" .. dir_name .. " "
end,
hl = {
fg = options.colors.grey_fg2,
bg = options.colors.lightbg2,
},
right_sep = {
str = options.separator_style.right,
hi = {
fg = options.colors.lightbg2,
bg = options.colors.statusline_bg,
},
},
}
options.diff = {
add = {
provider = "git_diff_added",
hl = {
fg = options.colors.grey_fg2,
bg = options.colors.statusline_bg,
},
icon = "",
},
change = {
provider = "git_diff_changed",
hl = {
fg = options.colors.grey_fg2,
bg = options.colors.statusline_bg,
},
icon = "",
},
remove = {
provider = "git_diff_removed",
hl = {
fg = options.colors.grey_fg2,
bg = options.colors.statusline_bg,
},
icon = "",
},
}
options.git_branch = {
provider = "git_branch",
hl = {
fg = options.colors.grey_fg2,
bg = options.colors.statusline_bg,
},
icon = "",
}
options.diagnostic = {
error = {
provider = "diagnostic_errors",
enabled = function()
return options.lsp.diagnostics_exist(options.lsp_severity.ERROR)
end,
hl = { fg = options.colors.red },
icon = "",
},
warning = {
provider = "diagnostic_warnings",
enabled = function()
return options.lsp.diagnostics_exist(options.lsp_severity.WARN)
end,
hl = { fg = options.colors.yellow },
icon = "",
},
hint = {
provider = "diagnostic_hints",
enabled = function()
return options.lsp.diagnostics_exist(options.lsp_severity.HINT)
end,
hl = { fg = options.colors.grey_fg2 },
icon = "",
},
info = {
provider = "diagnostic_info",
enabled = function()
return options.lsp.diagnostics_exist(options.lsp_severity.INFO)
end,
hl = { fg = options.colors.green },
icon = "",
},
}
options.lsp_progress = {
provider = function()
local Lsp = vim.lsp.util.get_progress_messages()[1]
if Lsp then
local msg = Lsp.message or ""
local percentage = Lsp.percentage or 0
local title = Lsp.title or ""
local spinners = {
"",
"",
"",
}
local success_icon = {
"",
"",
"",
}
local ms = vim.loop.hrtime() / 1000000
local frame = math.floor(ms / 120) % #spinners
if percentage >= 70 then
return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage)
end
return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage)
end
return ""
end,
hl = { fg = options.colors.green },
}
options.lsp_icon = {
provider = function()
if next(vim.lsp.buf_get_clients()) ~= nil then
return "  LSP"
else
return ""
end
end,
hl = { fg = options.colors.grey_fg2, bg = options.colors.statusline_bg },
}
options.mode_colors = {
["n"] = { "NORMAL", options.colors.red },
["no"] = { "N-PENDING", options.colors.red },
["i"] = { "INSERT", options.colors.dark_purple },
["ic"] = { "INSERT", options.colors.dark_purple },
["t"] = { "TERMINAL", options.colors.green },
["v"] = { "VISUAL", options.colors.cyan },
["V"] = { "V-LINE", options.colors.cyan },
[""] = { "V-BLOCK", options.colors.cyan },
["R"] = { "REPLACE", options.colors.orange },
["Rv"] = { "V-REPLACE", options.colors.orange },
["s"] = { "SELECT", options.colors.nord_blue },
["S"] = { "S-LINE", options.colors.nord_blue },
[""] = { "S-BLOCK", options.colors.nord_blue },
["c"] = { "COMMAND", options.colors.pink },
["cv"] = { "COMMAND", options.colors.pink },
["ce"] = { "COMMAND", options.colors.pink },
["r"] = { "PROMPT", options.colors.teal },
["rm"] = { "MORE", options.colors.teal },
["r?"] = { "CONFIRM", options.colors.teal },
["!"] = { "SHELL", options.colors.green },
}
options.chad_mode_hl = function()
return {
fg = options.mode_colors[vim.fn.mode()][2],
bg = options.colors.one_bg,
}
end
options.empty_space = {
provider = " " .. options.separator_style.left,
hl = {
fg = options.colors.one_bg2,
bg = options.colors.statusline_bg,
},
}
-- this matches the vi mode color
options.empty_spaceColored = {
provider = options.separator_style.left,
hl = function()
return {
fg = options.mode_colors[vim.fn.mode()][2],
bg = options.colors.one_bg2,
}
end,
}
options.mode_icon = {
provider = options.separator_style.vi_mode_icon,
hl = function()
return {
fg = options.colors.statusline_bg,
bg = options.mode_colors[vim.fn.mode()][2],
}
end,
}
options.empty_space2 = {
provider = function()
return " " .. options.mode_colors[vim.fn.mode()][1] .. " "
end,
hl = options.chad_mode_hl,
}
options.separator_right = {
provider = options.separator_style.left,
hl = {
fg = options.colors.grey,
bg = options.colors.one_bg,
},
}
options.separator_right2 = {
provider = options.separator_style.left,
hl = {
fg = options.colors.green,
bg = options.colors.grey,
},
}
options.position_icon = {
provider = options.separator_style.position_icon,
hl = {
fg = options.colors.black,
bg = options.colors.green,
},
}
options.current_line = {
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,
hl = {
fg = options.colors.green,
bg = options.colors.one_bg,
},
}
options = nvchad.load_override(options, "feline-nvim/feline.nvim")
local function add_table(tbl, inject)
if inject then
table.insert(tbl, inject)
end
end
-- components are divided in 3 sections
options.left = {}
options.middle = {}
options.right = {}
-- left
add_table(options.left, options.main_icon)
add_table(options.left, options.file_name)
add_table(options.left, options.dir_name)
add_table(options.left, options.diff.add)
add_table(options.left, options.diff.change)
add_table(options.left, options.diff.remove)
add_table(options.left, options.diagnostic.error)
add_table(options.left, options.diagnostic.warning)
add_table(options.left, options.diagnostic.hint)
add_table(options.left, options.diagnostic.info)
add_table(options.middle, options.lsp_progress)
-- right
add_table(options.right, options.lsp_icon)
add_table(options.right, options.git_branch)
add_table(options.right, options.empty_space)
add_table(options.right, options.empty_spaceColored)
add_table(options.right, options.mode_icon)
add_table(options.right, options.empty_space2)
add_table(options.right, options.separator_right)
add_table(options.right, options.separator_right2)
add_table(options.right, options.position_icon)
add_table(options.right, options.current_line)
-- Initialize the components table
options.components = { active = {} }
options.components.active[1] = options.left
options.components.active[2] = options.middle
options.components.active[3] = options.right
options.theme = {
bg = options.colors.statusline_bg,
fg = options.colors.fg,
}
feline.setup {
theme = options.theme,
components = options.components,
}

View File

@ -1,70 +0,0 @@
local present, telescope = pcall(require, "telescope")
if not present then
return
end
local options = {
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 = "ascending",
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 = { "node_modules" },
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = { "truncate" },
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,
mappings = {
n = { ["q"] = require("telescope.actions").close },
},
},
}
-- check for any override
options = nvchad.load_override(options, "nvim-telescope/telescope.nvim")
telescope.setup(options)
-- load extensions
local extensions = { "themes", "terms" }
pcall(function()
for _, ext in ipairs(extensions) do
telescope.load_extension(ext)
end
end)

View File

@ -1,21 +0,0 @@
local present, treesitter = pcall(require, "nvim-treesitter.configs")
if not present then
return
end
local options = {
ensure_installed = {
"lua",
"vim",
},
highlight = {
enable = true,
use_languagetree = true,
},
}
-- check for any override
options = nvchad.load_override(options, "nvim-treesitter/nvim-treesitter")
treesitter.setup(options)

View File

@ -1,243 +0,0 @@
local plugin_settings = nvchad.load_config().plugins
local present, packer = pcall(require, plugin_settings.options.packer.init_file)
if not present then
return false
end
local plugins = {
["kovetskiy/sxhkd-vim"] = {},
["wakatime/vim-wakatime"] = {},
["github/copilot.vim"] = {},
["nvim-lua/plenary.nvim"] = {},
["lewis6991/impatient.nvim"] = {},
["wbthomason/packer.nvim"] = {
event = "VimEnter",
},
["NvChad/extensions"] = {},
["NvChad/base46"] = {
after = "packer.nvim",
config = function()
local ok, base46 = pcall(require, "base46")
if ok then
base46.load_theme()
end
end,
},
["NvChad/nvterm"] = {
config = function()
require "plugins.configs.nvterm"
end,
},
["kyazdani42/nvim-web-devicons"] = {
after = "base46",
config = function()
require "plugins.configs.icons"
end,
},
["feline-nvim/feline.nvim"] = {
after = "nvim-web-devicons",
config = function()
require "plugins.configs.statusline"
end,
},
["akinsho/bufferline.nvim"] = {
after = "nvim-web-devicons",
setup = function()
require("core.mappings").bufferline()
end,
config = function()
require "plugins.configs.bufferline"
end,
},
["lukas-reineke/indent-blankline.nvim"] = {
event = "BufRead",
config = function()
require("plugins.configs.others").blankline()
end,
},
["NvChad/nvim-colorizer.lua"] = {
event = "BufRead",
config = function()
require("plugins.configs.others").colorizer()
end,
},
["nvim-treesitter/nvim-treesitter"] = {
event = { "BufRead", "BufNewFile" },
run = ":TSUpdate",
config = function()
require "plugins.configs.treesitter"
end,
},
-- git stuff
["lewis6991/gitsigns.nvim"] = {
opt = true,
config = function()
require("plugins.configs.others").gitsigns()
end,
setup = function()
nvchad.packer_lazy_load "gitsigns.nvim"
end,
},
-- lsp stuff
["williamboman/nvim-lsp-installer"] = {
opt = true,
setup = function()
nvchad.packer_lazy_load "nvim-lsp-installer"
-- reload the current file so lsp actually starts for it
vim.defer_fn(function()
vim.cmd 'if &ft == "packer" | echo "" | else | silent! e %'
end, 0)
end,
},
["neovim/nvim-lspconfig"] = {
after = "nvim-lsp-installer",
module = "lspconfig",
config = function()
require "plugins.configs.lsp_installer"
require "plugins.configs.lspconfig"
end,
},
["ray-x/lsp_signature.nvim"] = {
after = "nvim-lspconfig",
config = function()
require("plugins.configs.others").signature()
end,
},
["andymass/vim-matchup"] = {
opt = true,
setup = function()
nvchad.packer_lazy_load "vim-matchup"
end,
},
["max397574/better-escape.nvim"] = {
event = "InsertCharPre",
config = function()
require("plugins.configs.others").better_escape()
end,
},
-- load luasnips + cmp related in insert mode only
["rafamadriz/friendly-snippets"] = {
module = "cmp_nvim_lsp",
event = "InsertEnter",
},
["hrsh7th/nvim-cmp"] = {
after = "friendly-snippets",
config = function()
require "plugins.configs.cmp"
end,
},
["L3MON4D3/LuaSnip"] = {
wants = "friendly-snippets",
after = "nvim-cmp",
config = function()
require("plugins.configs.others").luasnip()
end,
},
["saadparwaiz1/cmp_luasnip"] = {
after = "LuaSnip",
},
["hrsh7th/cmp-nvim-lua"] = {
after = "cmp_luasnip",
},
["hrsh7th/cmp-nvim-lsp"] = {
after = "cmp-nvim-lua",
},
["hrsh7th/cmp-buffer"] = {
after = "cmp-nvim-lsp",
},
["hrsh7th/cmp-path"] = {
after = "cmp-buffer",
},
-- misc plugins
["windwp/nvim-autopairs"] = {
after = "nvim-cmp",
config = function()
require("plugins.configs.others").autopairs()
end,
},
["goolord/alpha-nvim"] = {
disable = true,
config = function()
require "plugins.configs.alpha"
end,
},
["numToStr/Comment.nvim"] = {
module = "Comment",
keys = { "gc", "gb" },
setup = function()
require("core.mappings").comment()
end,
config = function()
require("plugins.configs.others").comment()
end,
},
-- file managing , picker etc
["kyazdani42/nvim-tree.lua"] = {
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
setup = function()
require("core.mappings").nvimtree()
end,
config = function()
require "plugins.configs.nvimtree"
end,
},
["nvim-telescope/telescope.nvim"] = {
cmd = "Telescope",
setup = function()
require("core.mappings").telescope()
end,
config = function()
require "plugins.configs.telescope"
end,
},
}
plugins = nvchad.remove_default_plugins(plugins)
-- merge user plugin table & default plugin table
plugins = nvchad.plugin_list(plugins)
return packer.startup(function(use)
for _, v in pairs(plugins) do
use(v)
end
end)

View File

@ -1,47 +0,0 @@
vim.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,
}
vim.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 .. "\n" .. packer)
end
end
local user_snapshot = nvchad.load_config().snapshot
packer.init {
display = {
open_fn = function()
return require("packer.util").float { border = "single" }
end,
prompt_border = "single",
},
git = {
clone_timeout = 6000, -- seconds
},
auto_clean = true,
compile_on_sync = true,
snapshot = user_snapshot,
}
return packer