Merge branch 'master' of gitea.srvlan:sp4ke/my-nvim-lua
commit
e5cbae3d2c
@ -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)
|
@ -1,3 +0,0 @@
|
||||
patreon: siduck
|
||||
ko_fi: siduck
|
||||
custom: ["https://www.buymeacoffee.com/siduck", "https://www.paypal.com/paypalme/siduck76"]
|
@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Before reporting: update nvchad to the latest version,read breaking changes page,search existing issues. -->
|
||||
|
||||
**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.
|
@ -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."
|
@ -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
|
@ -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
|
@ -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
|
@ -1,146 +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/quickstart/install">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/Features">Features</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://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/dashboard.png">
|
||||
<img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/main2.png">
|
||||
|
||||
( Zoom in the screenshot )
|
||||
|
||||
<img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/main.png">
|
||||
<img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/rxyhn1.png">
|
||||
|
||||
## What is it?
|
||||
|
||||
- NvChad is a neovim config written in lua aiming to provide a base configuration with very beautiful UI and blazing fast startuptime (around 0.02 secs ~ 0.07 secs). We tweak UI plugins such as telescope, nvim-tree, bufferline etc well to provide an aesthetic UI experience.
|
||||
|
||||
- Lazy loading is done 93% of the time meaning that plugins will not be loaded by default, they will be loaded only when required also at specific commands, events etc. This lowers the startuptime and it was like 0.07~ secs tested on an old pentium machine 1.4ghz + 4gb ram & HDD.
|
||||
|
||||
- NvChad isnt a framework! Its supposed to be used as a "base" config, so users could tweak the defaults well, can also remove the things they dont like in the default config and build their config on top of it. Users can tweak the entire default config while staying in their custom config (lua/custom dir). This is the control center of the user's config and gitignored so the users can stay update to-date with NvChad's latest config (main branch) while still controlling it with their chadrc (file that controls entire custom dir)
|
||||
|
||||
## Theme Showcase
|
||||
|
||||
<details><summary> <b>Images (Click to expand!)</b></summary>
|
||||
|
||||
![main themes](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/four_Themes.png)
|
||||
![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium1.png)
|
||||
![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium2.png)
|
||||
![radium](https://github.com/NvChad/nvchad.github.io/blob/src/static/img/screenshots/radium3.png)
|
||||
|
||||
(Note: these are just 4-5 themes, NvChad has around 27+ themes)
|
||||
</details>
|
||||
|
||||
## UI related plugins used
|
||||
|
||||
<details><summary> <b>Images (Click to expand!)</b></summary>
|
||||
|
||||
<h3> Nvim-tree.lua </h3>
|
||||
|
||||
Fast file tree:
|
||||
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/nvimtree.png"></kbd><hr>
|
||||
|
||||
<h3> Telescope-nvim </h3>
|
||||
|
||||
A fuzzy file finder, picker, sorter, previewer and much more:
|
||||
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/tel.png"></kbd><hr>
|
||||
|
||||
<h3> Indent-blankline.nvim </h3>
|
||||
|
||||
Adds indentline:
|
||||
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/blanklineNvim.png"></kbd><hr>
|
||||
|
||||
<h3> Our own statusline written from scratch </h3>
|
||||
|
||||
[NvChad UI](https://github.com/NvChad/ui)
|
||||
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/statusline.png"></kbd><hr>
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/statusline_modes.png"></kbd><hr>
|
||||
|
||||
<h3> Tabufline (our own pertab bufferline) </h3>
|
||||
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/tabufline1.png"></kbd><hr>
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/tabufline2.png"></kbd><hr>
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/tabufline3.png"></kbd><hr>
|
||||
|
||||
<h3> Nvim-web-devicons </h3>
|
||||
|
||||
Lua fork of Vim Devicons which offers more file icon customisability:
|
||||
|
||||
<kbd><img src="https://github.com/NvChad/nvchad.github.io/blob/src/static/img/features/devicons.png"></kbd><hr>
|
||||
|
||||
<h3> Nvim-treesitter </h3
|
||||
|
||||
NeoVim Treesitter configurations and abstraction layer. We mostly use this for syntax highlighting. The pretty syntax highlighting you see in all of our screenshots has gotten possible due to treesitter
|
||||
|
||||
</details>
|
||||
|
||||
## Plugins list
|
||||
|
||||
- Many beautiful themes, theme toggler by [our base46 plugin](https://github.com/NvChad/base46)
|
||||
- Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm)
|
||||
- NvChad updater, hide & unhide terminal buffers with [NvChad extensions](https://github.com/NvChad/extensions)
|
||||
- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui)
|
||||
- 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)
|
||||
- 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) and [mason.nvim](https://github.com/williamboman/mason.nvim)
|
||||
- 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 [friendly snippets](https://github.com/rafamadriz/friendly-snippets) + [LuaSnip](https://github.com/L3MON4D3/LuaSnip).
|
||||
- Popup mappings keysheet [whichkey.nvim](https://github.com/folke/which-key.nvim)
|
||||
|
||||
## History
|
||||
|
||||
- I (@siduck i.e creator of NvChad) in my initial days of learning to program wanted a lightweight IDE for writing code, I had a very low end system which was like 1.4ghz pentium + 4gb ram & HDD. I was into web dev stuff so many suggested me to use vscode but that thing was very heavy on my system, It took more ram than my browser! ( minimal ungoogled chromium ) so I never tried it again, sublime text was nice but the fear of using proprietary software XD for a linux user bugged me a lot. Then I tried doom-emacs which looked pretty but it was slow and I was lost within its docs, I tried lunarvim but too lazy to read the docs. Doom-emacs and lunarvim inspired me to make a config which is the prettiest + very fast and simple.
|
||||
|
||||
- I'm decent at ricing i.e customizing system and making it look pretty so I posted my neovim rice on [neovim subreddit](https://www.reddit.com/r/neovim/comments/m3xl4f/neovim_rice/), my neovim-dotfiles github repo blew up and then I had to come up with a name, I was amazed by the chad meme lol so I put NvChad as the name, the chad word in here doesnt literally mean the chad guy but in the sense such as chad linux vs windows i.e meaning superior, best etc. NvChad was made for my personal use but it gained some popularity which inspired me to make a public config i.e config usable by many and less hassle to update as everyone's going to use the same base config (NvChad) with their custom modifications (which are gitignored so that wont mess up), without the custom config stuff users would have to keep a track of every commit and copy paste git diffs to manually update nvchad.
|
||||
|
||||
## :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 & appreciate 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)
|
||||
|
||||
## Credits
|
||||
|
||||
- [Elianiva](https://github.com/elianiva) helped me with NeoVim Lua related issues many times, NvChad wouldn't exist without his help at all as he helped me in my initial neovim journey!
|
||||
- @lorvethe for making the beautiful NvChad logo.
|
@ -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
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"lsp_autostart": true
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
|
||||
## Git merging with upstream
|
||||
use the strategy=ours
|
@ -0,0 +1,2 @@
|
||||
My nvim config using Lua based on [nvchad](https://nvchad.github.io/)
|
||||
|
@ -1,37 +0,0 @@
|
||||
- use libmodal + whichkey ?
|
||||
- gisigns: add navigation between hunks (vs fugitive ?)
|
||||
- optimize git flow
|
||||
- navigator icons update
|
||||
- vim-bookmarks disable default keymaps and use manaul ones (keep ma ...)
|
||||
- Setup telescope/fzf mappings together
|
||||
- LSP C-i is tab does not allow to jump back into history
|
||||
- [PLUGIN INDEA] bookmark: take notes
|
||||
- show messages window outside or floating
|
||||
- create a bookmark mini plugin/helper for bookmarking paths
|
||||
- html filetype use pup as auto formatter formatprg (check default vim) ?
|
||||
- per project lsp settings
|
||||
see https://www.reddit.com/r/neovim/comments/opipij/guide_tips_and_tricks_to_reduce_startup_and/
|
||||
- add/read language docs in vim
|
||||
- vim.diagnostics.hide()/show() /
|
||||
- create toggle diagnostics that overrides vim diagnostic show handler
|
||||
- [navigator] use colors for codelens icons
|
||||
- [navigator] remap C-k keymap
|
||||
- [navigator] neovim diagnositc toggle (use hide() instead of disable)
|
||||
- [navigator] check codelens icons
|
||||
- [navigator] disable diagnostic on startup
|
||||
- dynamic C-x: if number default or close window
|
||||
- load custom/init.lua (autocommands) as vimscript file ?
|
||||
- install neorg (neovim org mode)
|
||||
- dynamic :w!! (daos or sudo)
|
||||
[x] [navigator] fix 'gi' keymap overriden by navigator (use space leader)
|
||||
- welcome screen (use mini)
|
||||
- incorporate changes in nvchad_ui to override
|
||||
|
||||
- [x]nvim C-p should not work in ft=qf
|
||||
- [x] set neovim shell to bash/sh for faster commands (fish is slow)
|
||||
- [x] yank until end of line $ mapping automatic with Y
|
||||
- [x] remove registers from which-key plugin
|
||||
-fix: problem with auto paused navigators
|
||||
- [x] fix color/icon of status line diagnostics to match navigator
|
||||
-[x] pin all plugins
|
||||
- [x] autocommand move current directory when move to new window
|
@ -0,0 +1 @@
|
||||
set formatoptions+=r " auto add comments on line return
|
@ -1,3 +1,4 @@
|
||||
augroup my_json
|
||||
au!
|
||||
au FileType json set formatprg=jq
|
||||
aug END
|
||||
|
@ -0,0 +1,4 @@
|
||||
local ok, nvchad = pcall(require, "nvchad")
|
||||
if not ok then return end
|
||||
nvchad.reload_theme("ayu-dark")
|
||||
|
@ -0,0 +1 @@
|
||||
set cursorline
|
@ -0,0 +1,3 @@
|
||||
; extends
|
||||
|
||||
((field) ",") @myfield
|
@ -1,3 +0,0 @@
|
||||
|
||||
snippet li "zk link to note"
|
||||
[${1:${VISUAL:name}}](${2:id}) $0
|
@ -0,0 +1,3 @@
|
||||
|
||||
snippet lnd
|
||||
println!("{:?}", $1);
|
@ -1,12 +0,0 @@
|
||||
-- Just an example, supposed to be placed in /lua/custom/
|
||||
|
||||
local M = {}
|
||||
|
||||
-- make sure you maintain the structure of `core/default_config.lua` here,
|
||||
-- example of changing theme:
|
||||
|
||||
M.ui = {
|
||||
theme = "gruvchad",
|
||||
}
|
||||
|
||||
return M
|
@ -1,3 +0,0 @@
|
||||
-- example file i.e lua/custom/init.lua
|
||||
-- load your options globals, autocmds here or anything .__.
|
||||
-- you can even override default options here (core/options.lua)
|
@ -0,0 +1,13 @@
|
||||
NVIM v0.9.0-dev-77-gf175ca9f7
|
||||
Build type: RelWithDebInfo
|
||||
LuaJIT 2.1.0-beta3
|
||||
Compilation: /usr/bin/gcc-10 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/cmake.config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
|
||||
Compiled by runner@fv-az47-468
|
||||
|
||||
Features: +acl +iconv +tui
|
||||
See ":help feature-compile"
|
||||
|
||||
system vimrc file: "$VIM/sysinit.vim"
|
||||
fall-back for $VIM: "/share/nvim"
|
||||
|
||||
Run :checkhealth for more info
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@
|
||||
-- local dap = require("dap")
|
||||
|
||||
local M = {}
|
||||
local opts = {
|
||||
|
||||
}
|
||||
|
||||
M.setup = function()
|
||||
end
|
||||
return M
|
@ -0,0 +1,82 @@
|
||||
local dapui = require('dapui')
|
||||
|
||||
local M = {}
|
||||
local opts = {
|
||||
icons = { expanded = "▾", collapsed = "▸", current_frame = "▸" },
|
||||
mappings = {
|
||||
-- Use a table to apply multiple mappings
|
||||
expand = { "<CR>", "<2-LeftMouse>" },
|
||||
open = "o",
|
||||
remove = "d",
|
||||
edit = "e",
|
||||
repl = "r",
|
||||
toggle = "t",
|
||||
},
|
||||
-- Expand lines larger than the window
|
||||
-- Requires >= 0.7
|
||||
expand_lines = vim.fn.has("nvim-0.7") == 1,
|
||||
-- Layouts define sections of the screen to place windows.
|
||||
-- The position can be "left", "right", "top" or "bottom".
|
||||
-- The size specifies the height/width depending on position. It can be an Int
|
||||
-- or a Float. Integer specifies height/width directly (i.e. 20 lines/columns) while
|
||||
-- Float value specifies percentage (i.e. 0.3 - 30% of available lines/columns)
|
||||
-- Elements are the elements shown in the layout (in order).
|
||||
-- Layouts are opened in order so that earlier layouts take priority in window sizing.
|
||||
layouts = {
|
||||
{
|
||||
elements = {
|
||||
-- Elements can be strings or table with id and size keys.
|
||||
{ id = "scopes", size = 0.25 },
|
||||
"breakpoints",
|
||||
"stacks",
|
||||
-- "watches",
|
||||
},
|
||||
size = 40, -- 40 columns
|
||||
position = "left",
|
||||
},
|
||||
{
|
||||
elements = {
|
||||
"repl",
|
||||
"watches"
|
||||
-- "console",
|
||||
},
|
||||
size = 0.25, -- 25% of total lines
|
||||
position = "bottom",
|
||||
},
|
||||
},
|
||||
controls = {
|
||||
-- Requires Neovim nightly (or 0.8 when released)
|
||||
enabled = true,
|
||||
-- Display controls in this element
|
||||
element = "repl",
|
||||
icons = {
|
||||
pause = "",
|
||||
play = "",
|
||||
step_into = "",
|
||||
step_over = "",
|
||||
step_out = "",
|
||||
step_back = "",
|
||||
run_last = "↻",
|
||||
terminate = "",
|
||||
},
|
||||
},
|
||||
floating = {
|
||||
max_height = nil, -- These can be integers or a float between 0 and 1.
|
||||
max_width = nil, -- Floats will be treated as percentage of your screen.
|
||||
border = "single", -- Border style. Can be "single", "double" or "rounded"
|
||||
mappings = {
|
||||
close = { "q", "<Esc>" },
|
||||
},
|
||||
},
|
||||
windows = { indent = 1 },
|
||||
render = {
|
||||
max_type_length = nil, -- Can be integer or nil.
|
||||
max_value_lines = 100, -- Can be integer or nil.
|
||||
}
|
||||
}
|
||||
|
||||
M.setup = function()
|
||||
dapui.setup(opts)
|
||||
end
|
||||
|
||||
return M
|
@ -0,0 +1,36 @@
|
||||
local ok, iron = pcall(require, "iron.core")
|
||||
if not ok then return end
|
||||
|
||||
local M = {}
|
||||
|
||||
local ironSetup = {
|
||||
config = {
|
||||
scratch_repl = true,
|
||||
highlight_last = "IronLastSent",
|
||||
repl_definition = {
|
||||
sh = {
|
||||
command = {"sh"}
|
||||
},
|
||||
python = require("iron.fts.python").ipython,
|
||||
},
|
||||
repl_open_cmd = require('iron.view').bottom(20),
|
||||
},
|
||||
keymaps = {
|
||||
send_motion = "<leader>io",
|
||||
visual_send = "<leader>io",
|
||||
send_file = "<leader>ii",
|
||||
send_line = "<leader>il",
|
||||
cr = "<leader>i<cr>",
|
||||
interrupt = "<leader>i<leader>",
|
||||
exit = "<leader>iq"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function M.setup()
|
||||
iron.setup(ironSetup)
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
-- M.setup()
|
@ -0,0 +1,42 @@
|
||||
local M = {}
|
||||
|
||||
|
||||
local opts = {
|
||||
defaults = {
|
||||
enable_highlighting = true,
|
||||
inline_highlighting = true,
|
||||
hl_groups = {
|
||||
insertion = "DiffAdd",
|
||||
deletion = "DiffDelete",
|
||||
change = "DiffChange",
|
||||
},
|
||||
},
|
||||
|
||||
debug = true,
|
||||
commands = {
|
||||
Norm = { cmd = "norm" },
|
||||
Reg = {
|
||||
cmd = "norm",
|
||||
-- This will transform ":5Reg a" into ":norm 5@a"
|
||||
args = function(opts)
|
||||
return (opts.count == -1 and "" or opts.count) .. "@" .. opts.args
|
||||
end,
|
||||
range = "",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
function M.get_cmds()
|
||||
local cmds = {}
|
||||
for cmd, _ in pairs(opts.commands) do
|
||||
table.insert(cmds, cmd)
|
||||
end
|
||||
|
||||
return cmds
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
require("live-command").setup(opts)
|
||||
end
|
||||
|
||||
return M
|
@ -0,0 +1,37 @@
|
||||
local present, luasnip = pcall(require, "luasnip")
|
||||
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
local types = require("luasnip.util.types")
|
||||
|
||||
local options = {
|
||||
history = true,
|
||||
updateevents = "TextChanged,TextChangedI",
|
||||
ext_opts = {
|
||||
[types.choiceNode] = {
|
||||
passive = {
|
||||
virt_text = { { " ", "LuaSnipChoice" } },
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
M.setup = function()
|
||||
luasnip.config.set_config(options)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.luasnippets_path or "" }
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
if require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||
and not require("luasnip").session.jump_active
|
||||
then
|
||||
require("luasnip").unlink_current()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
@ -0,0 +1,183 @@
|
||||
local M = {}
|
||||
local opts = {
|
||||
tools = { -- rust-tools options
|
||||
|
||||
-- how to execute terminal commands
|
||||
-- options right now: termopen / quickfix
|
||||
executor = require("rust-tools/executors").termopen,
|
||||
|
||||
-- callback to execute once rust-analyzer is done initializing the workspace
|
||||
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
|
||||
on_initialized = nil,
|
||||
|
||||
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
|
||||
reload_workspace_from_cargo_toml = true,
|
||||
|
||||
-- These apply to the default RustSetInlayHints command
|
||||
inlay_hints = {
|
||||
-- automatically set inlay hints (type hints)
|
||||
-- default: true
|
||||
auto = true,
|
||||
|
||||
-- Only show inlay hints for the current line
|
||||
only_current_line = false,
|
||||
|
||||
-- whether to show parameter hints with the inlay hints or not
|
||||
-- default: true
|
||||
show_parameter_hints = true,
|
||||
|
||||
-- prefix for parameter hints
|
||||
-- default: "<-"
|
||||
parameter_hints_prefix = " ",
|
||||
|
||||
-- prefix for all the other hints (type, chaining)
|
||||
-- default: "=>"
|
||||
other_hints_prefix = " ",
|
||||
|
||||
-- whether to align to the length of the longest line in the file
|
||||
max_len_align = false,
|
||||
|
||||
-- padding from the left if max_len_align is true
|
||||
max_len_align_padding = 1,
|
||||
|
||||
-- whether to align to the extreme right or not
|
||||
right_align = false,
|
||||
|
||||
-- padding from the right if right_align is true
|
||||
right_align_padding = 7,
|
||||
|
||||
-- The color of the hints
|
||||
highlight = "InlayHint",
|
||||
},
|
||||
|
||||
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
|
||||
hover_actions = {
|
||||
|
||||
-- the border that is used for the hover window
|
||||
-- see vim.api.nvim_open_win()
|
||||
border = {
|
||||
{ "╭", "FloatBorder" },
|
||||
{ "─", "FloatBorder" },
|
||||
{ "╮", "FloatBorder" },
|
||||
{ "│", "FloatBorder" },
|
||||
{ "╯", "FloatBorder" },
|
||||
{ "─", "FloatBorder" },
|
||||
{ "╰", "FloatBorder" },
|
||||
{ "│", "FloatBorder" },
|
||||
},
|
||||
|
||||
-- whether the hover action window gets automatically focused
|
||||
-- default: false
|
||||
auto_focus = false,
|
||||
},
|
||||
|
||||
-- settings for showing the crate graph based on graphviz and the dot
|
||||
-- command
|
||||
crate_graph = {
|
||||
-- Backend used for displaying the graph
|
||||
-- see: https://graphviz.org/docs/outputs/
|
||||
-- default: x11
|
||||
backend = "x11",
|
||||
-- where to store the output, nil for no output stored (relative
|
||||
-- path from pwd)
|
||||
-- default: nil
|
||||
output = nil,
|
||||
-- true for all crates.io and external crates, false only the local
|
||||
-- crates
|
||||
-- default: true
|
||||
full = true,
|
||||
|
||||
-- List of backends found on: https://graphviz.org/docs/outputs/
|
||||
-- Is used for input validation and autocompletion
|
||||
-- Last updated: 2021-08-26
|
||||
enabled_graphviz_backends = {
|
||||
"bmp",
|
||||
"cgimage",
|
||||
"canon",
|
||||
"dot",
|
||||
"gv",
|
||||
"xdot",
|
||||
"xdot1.2",
|
||||
"xdot1.4",
|
||||
"eps",
|
||||
"exr",
|
||||
"fig",
|
||||
"gd",
|
||||
"gd2",
|
||||
"gif",
|
||||
"gtk",
|
||||
"ico",
|
||||
"cmap",
|
||||
"ismap",
|
||||
"imap",
|
||||
"cmapx",
|
||||
"imap_np",
|
||||
"cmapx_np",
|
||||
"jpg",
|
||||
"jpeg",
|
||||
"jpe",
|
||||
"jp2",
|
||||
"json",
|
||||
"json0",
|
||||
"dot_json",
|
||||
"xdot_json",
|
||||
"pdf",
|
||||
"pic",
|
||||
"pct",
|
||||
"pict",
|
||||
"plain",
|
||||
"plain-ext",
|
||||
"png",
|
||||
"pov",
|
||||
"ps",
|
||||
"ps2",
|
||||
"psd",
|
||||
"sgi",
|
||||
"svg",
|
||||
"svgz",
|
||||
"tga",
|
||||
"tiff",
|
||||
"tif",
|
||||
"tk",
|
||||
"vml",
|
||||
"vmlz",
|
||||
"wbmp",
|
||||
"webp",
|
||||
"xlib",
|
||||
"x11",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- all the opts to send to nvim-lspconfig
|
||||
-- these override the defaults set by rust-tools.nvim
|
||||
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
|
||||
server = {
|
||||
-- standalone file support
|
||||
-- setting it to false may improve startup time
|
||||
standalone = true,
|
||||
cmd = {"run-rust-analyzer"}, -- use my wrapper script to see separate input/output log
|
||||
on_attach = function(client, bufnr)
|
||||
require('navigator.lspclient.mapping').setup({client=client, bufnr=bufnr}) -- setup navigator keymaps here,
|
||||
require("navigator.dochighlight").documentHighlight(bufnr)
|
||||
require('navigator.codeAction').code_action_prompt(bufnr)
|
||||
-- otherwise, you can define your own commands to call navigator functions
|
||||
end
|
||||
}, -- rust-analyzer options
|
||||
|
||||
-- debugging stuff
|
||||
dap = {
|
||||
adapter = {
|
||||
type = "executable",
|
||||
command = "lldb-vscode",
|
||||
name = "rt_lldb",
|
||||
console = "integratedTerminal",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
function M.setup()
|
||||
require("rust-tools").setup(opts)
|
||||
end
|
||||
|
||||
return M
|
@ -1,108 +1,117 @@
|
||||
return {
|
||||
ensure_installed = {
|
||||
"query",
|
||||
"css",
|
||||
"lua",
|
||||
"go",
|
||||
"rust",
|
||||
"fish",
|
||||
"bash",
|
||||
"python",
|
||||
"c",
|
||||
"cpp",
|
||||
"haskell",
|
||||
"javascript",
|
||||
"html",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"make",
|
||||
"sql",
|
||||
"yaml",
|
||||
"toml",
|
||||
"vue",
|
||||
},
|
||||
|
||||
incremental_selection = {
|
||||
enable = false,
|
||||
keymaps = {
|
||||
init_selection = "<CR>",
|
||||
node_incremental = "<Tab>",
|
||||
scope_incremental = "<CR>",
|
||||
node_decremental = "<S-Tab>",
|
||||
}
|
||||
},
|
||||
ensure_installed = {
|
||||
"query",
|
||||
"css",
|
||||
"lua",
|
||||
"go",
|
||||
"rust",
|
||||
"fish",
|
||||
"bash",
|
||||
"python",
|
||||
"c",
|
||||
"cpp",
|
||||
"haskell",
|
||||
"javascript",
|
||||
"html",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"make",
|
||||
"sql",
|
||||
"yaml",
|
||||
"toml",
|
||||
"vue",
|
||||
},
|
||||
|
||||
textsubjects = {
|
||||
enable = true,
|
||||
prev_selection = "<Tab>",
|
||||
keymaps = {
|
||||
["<CR>"] = "textsubjects-smart", -- works in visual mode
|
||||
}
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(lang, bufnr)
|
||||
return lang == "help"
|
||||
end
|
||||
},
|
||||
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<Space>",
|
||||
node_incremental = "<Space>",
|
||||
node_decremental = "<BS>",
|
||||
scope_incremental = "<CR>",
|
||||
}
|
||||
},
|
||||
|
||||
textobjects = {
|
||||
enable = true,
|
||||
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["aC"] = "@conditional.outer",
|
||||
["iC"] = "@conditional.inner",
|
||||
["ae"] = "@block.outer",
|
||||
["ie"] = "@block.inner",
|
||||
["al"] = "@loop.outer",
|
||||
["il"] = "@loop.inner",
|
||||
["is"] = "@statement.inner",
|
||||
["as"] = "@statement.outer",
|
||||
["ad"] = "@comment.outer",
|
||||
["am"] = "@call.outer",
|
||||
["im"] = "@call.inner",
|
||||
}
|
||||
-- textsubjects = {
|
||||
-- enable = true,
|
||||
-- prev_selection = "<Tab>",
|
||||
-- keymaps = {
|
||||
-- ["<CR>"] = "textsubjects-smart", -- works in visual mode
|
||||
-- }
|
||||
-- },
|
||||
--
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
},
|
||||
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
textobjects = {
|
||||
enable = true,
|
||||
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = { query = "@function.outer", desc = "TS function" },
|
||||
["if"] = { query = "@function.inner", desc = "TS function" },
|
||||
["aF"] = { query = "@myfield", desc = "TS field" },
|
||||
["ac"] = { query = "@class.outer", desc = "TS class" },
|
||||
["ic"] = { query = "@class.inner", desc = "TS class" },
|
||||
["aC"] = { query = "@conditional.outer", desc = "TS conditional" },
|
||||
["iC"] = { query = "@conditional.inner", desc = "TS conditional" },
|
||||
["ae"] = { query = "@block.outer", desc = "TS block" },
|
||||
["ie"] = { query = "@block.inner", desc = "TS block" },
|
||||
["al"] = { query = "@loop.outer", desc = "TS loop" },
|
||||
["il"] = { query = "@loop.inner", desc = "TS loop" },
|
||||
["is"] = { query = "@statement.inner", desc = "TS statement" },
|
||||
["as"] = { query = "@statement.outer", desc = "TS statement" },
|
||||
["ad"] = { query = "@comment.outer", desc = "TS comment" },
|
||||
["am"] = { query = "@call.outer", desc = "TS Call" },
|
||||
["im"] = { query = "@call.inner", desc = "TS Call" },
|
||||
}
|
||||
},
|
||||
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
|
||||
goto_next_start = {
|
||||
["]]"] = "@function.outer",
|
||||
["]m"] = "@class.outer"
|
||||
},
|
||||
goto_next_start = {
|
||||
["]]"] = "@function.outer",
|
||||
["]C"] = "@class.outer",
|
||||
["]f"] = "@field.outer",
|
||||
},
|
||||
|
||||
goto_next_end = {
|
||||
["]["] = "@function.outer",
|
||||
["]M"] = "@class.outer"
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[["] = "@function.outer",
|
||||
["[m"] = "@class.outer"
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[]"] = "@function.outer",
|
||||
["[M"] = "@class.outer"
|
||||
}
|
||||
goto_next_end = {
|
||||
["]["] = "@function.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[["] = "@function.outer",
|
||||
["[C"] = "@class.outer",
|
||||
["[f"] = "@field.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[]"] = "@function.outer",
|
||||
}
|
||||
},
|
||||
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["~"] = "@parameter.inner"
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["~"] = "@parameter.inner"
|
||||
},
|
||||
playground = {
|
||||
enable = true,
|
||||
}
|
||||
},
|
||||
|
||||
playground = {
|
||||
enable = true,
|
||||
}
|
||||
}
|
||||
|
@ -1,80 +1,92 @@
|
||||
-- lsp is handled by navigator.lua
|
||||
local present, lspconfig = pcall(require, "lspconfig")
|
||||
|
||||
if not present then
|
||||
return
|
||||
end
|
||||
|
||||
require("base46").load_highlight "lsp"
|
||||
require "nvchad_ui.lsp"
|
||||
|
||||
-- require("base46").load_highlight "lsp"
|
||||
-- require "nvchad_ui.lsp"
|
||||
--
|
||||
local M = {}
|
||||
local utils = require "core.utils"
|
||||
|
||||
-- export on_attach & capabilities for custom lspconfigs
|
||||
|
||||
M.on_attach = function(client, bufnr)
|
||||
print("NVCHAD ON ATTACH")
|
||||
if vim.g.vim_version > 7 then
|
||||
-- nightly
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
client.server_capabilities.documentRangeFormattingProvider = false
|
||||
else
|
||||
-- stable
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
client.resolved_capabilities.document_range_formatting = false
|
||||
end
|
||||
|
||||
utils.load_mappings("lspconfig", { buffer = bufnr })
|
||||
|
||||
if client.server_capabilities.signatureHelpProvider then
|
||||
require("nvchad_ui.signature").setup(client)
|
||||
end
|
||||
function M.setup()
|
||||
lspconfig.util.default_config = vim.tbl_extend(
|
||||
"force",
|
||||
lspconfig.util.default_config,
|
||||
{
|
||||
autostart = false
|
||||
})
|
||||
end
|
||||
|
||||
M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
||||
M.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 = M.capabilities,
|
||||
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
|
||||
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
|
||||
},
|
||||
maxPreload = 100000,
|
||||
preloadFileSize = 10000,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.gopls.setup {
|
||||
on_attach = M.on_attach,
|
||||
capabilities = M.capabilities,
|
||||
}
|
||||
-- local utils = require "core.utils"
|
||||
--
|
||||
-- -- export on_attach & capabilities for custom lspconfigs
|
||||
--
|
||||
-- M.on_attach = function(client, bufnr)
|
||||
-- print("NVCHAD ON ATTACH")
|
||||
-- if vim.g.vim_version > 7 then
|
||||
-- -- nightly
|
||||
-- client.server_capabilities.documentFormattingProvider = false
|
||||
-- client.server_capabilities.documentRangeFormattingProvider = false
|
||||
-- else
|
||||
-- -- stable
|
||||
-- client.resolved_capabilities.document_formatting = false
|
||||
-- client.resolved_capabilities.document_range_formatting = false
|
||||
-- end
|
||||
--
|
||||
-- utils.load_mappings("lspconfig", { buffer = bufnr })
|
||||
--
|
||||
-- if client.server_capabilities.signatureHelpProvider then
|
||||
-- require("nvchad_ui.signature").setup(client)
|
||||
-- end
|
||||
-- end
|
||||
--
|
||||
-- M.capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
--
|
||||
-- M.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 = M.capabilities,
|
||||
--
|
||||
-- settings = {
|
||||
-- Lua = {
|
||||
-- diagnostics = {
|
||||
-- globals = { "vim" },
|
||||
-- },
|
||||
-- workspace = {
|
||||
-- library = {
|
||||
-- [vim.fn.expand "$VIMRUNTIME/lua"] = true,
|
||||
-- [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
|
||||
-- },
|
||||
-- maxPreload = 100000,
|
||||
-- preloadFileSize = 10000,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
--
|
||||
-- lspconfig.gopls.setup {
|
||||
-- on_attach = M.on_attach,
|
||||
-- capabilities = M.capabilities,
|
||||
-- }
|
||||
|
||||
return M
|
||||
|
@ -1,33 +0,0 @@
|
||||
local dapmode = require("sp4ke.dapmode")
|
||||
|
||||
local M = {}
|
||||
|
||||
local function register_listeners()
|
||||
local present, dap = pcall(require, "dap")
|
||||
if not present then
|
||||
print("nvim-dap missing !")
|
||||
return
|
||||
end
|
||||
|
||||
dap.listeners.before['event_initialized']['sp4ke-dap'] = function(session, body)
|
||||
dapmode.start()
|
||||
end
|
||||
|
||||
dap.listeners.after['event_terminated']['sp4ke-dap'] = function(session, body)
|
||||
-- print("dap session ended")
|
||||
dapmode.stop()
|
||||
end
|
||||
end
|
||||
|
||||
function M.go_debug()
|
||||
local present, gdap = pcall(require, "go.dap")
|
||||
if not present then return end
|
||||
gdap.run()
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
dapmode.setup({})
|
||||
register_listeners()
|
||||
end
|
||||
|
||||
return M
|
@ -0,0 +1,70 @@
|
||||
local dapmode = require("spike.dap.dapmode")
|
||||
local daputils = require('spike.dap.utils')
|
||||
local dapui = require("dapui")
|
||||
|
||||
local M = {}
|
||||
M.signs = {
|
||||
DapBreakpoint = {
|
||||
icon = '',
|
||||
hl = 'DapBreakpoint'
|
||||
},
|
||||
DapLogPoint = {
|
||||
icon = 'ﳁ',
|
||||
hl = 'DapLogPoint',
|
||||
},
|
||||
DapStopped = {
|
||||
icon = '',
|
||||
hl = 'DapStopped',
|
||||
},
|
||||
DapBreakpointCondition = {
|
||||
icon = '',
|
||||
hl = 'DapBreakpointCondition',
|
||||
},
|
||||
DapBreakpointRejected = {
|
||||
icon = '',
|
||||
hl = 'DapBreakpointRejected'
|
||||
}
|
||||
}
|
||||
|
||||
local function register_listeners()
|
||||
local present, dap = pcall(require, "dap")
|
||||
if not present then
|
||||
print("nvim-dap missing !")
|
||||
return
|
||||
end
|
||||
|
||||
dap.listeners.before['event_initialized']['spike-dap'] = function(session, body)
|
||||
dapmode.start()
|
||||
dapui.open()
|
||||
end
|
||||
|
||||
dap.listeners.after['event_terminated']['spike-dap'] = function(session, body)
|
||||
-- print("dap session ended")
|
||||
dapmode.stop()
|
||||
dapui.close()
|
||||
end
|
||||
end
|
||||
|
||||
function M.go_debug()
|
||||
local present, gdap = pcall(require, "go.dap")
|
||||
if not present then return end
|
||||
gdap.run()
|
||||
end
|
||||
|
||||
local function set_signs()
|
||||
for sign, conf in pairs(M.signs) do
|
||||
vim.fn.sign_define(sign, {text = conf.icon, texthl=conf.hl})
|
||||
end
|
||||
end
|
||||
|
||||
function M.prepare_launch()
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
dapmode.setup({})
|
||||
register_listeners()
|
||||
set_signs()
|
||||
end
|
||||
|
||||
|
||||
return M
|
@ -0,0 +1,35 @@
|
||||
local ok, dap = pcall(require, 'dap')
|
||||
if not ok then
|
||||
vim.notify('dap module missing')
|
||||
end
|
||||
local M = {}
|
||||
|
||||
M.disconnect_dap = function()
|
||||
local has_dap, dap = pcall(require, 'dap')
|
||||
if has_dap then
|
||||
dap.disconnect()
|
||||
dap.repl.close()
|
||||
vim.cmd('sleep 100m') -- allow cleanup
|
||||
else
|
||||
vim.notify('dap not found')
|
||||
end
|
||||
end
|
||||
|
||||
M.dap_logpoint = function()
|
||||
vim.ui.input({ prompt = 'Logpoint message> '}, function (input)
|
||||
dap.set_breakpoint(nil,nil,input)
|
||||
end)
|
||||
end
|
||||
|
||||
-- if there are no breakpoints in the project set a breakpoint on the current
|
||||
-- line
|
||||
M.init_breakpoints = function()
|
||||
-- see https://github.com/rcarriga/nvim-dap-ui/blob/master/lua/dapui/state.lua
|
||||
-- for a reference to access dap breakpoint details
|
||||
local breakpoints = require('dap.breakpoints').get() or {}
|
||||
if #breakpoints == 0 then
|
||||
dap.set_breakpoint()
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
@ -0,0 +1,33 @@
|
||||
-- custom golang lsp settings
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
local M = {}
|
||||
|
||||
local augroupname = "spike.go"
|
||||
|
||||
-- Navigator custom on_attach for golang
|
||||
|
||||
function M.gopls_onattach(client, bufnr)
|
||||
-- auto auto format on save
|
||||
local ok, goformat = pcall(require, "go.format")
|
||||
if not ok then
|
||||
print("go.nvim missing !")
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
-- autocmd({"BufWritePre", "InsertLeave"}, {
|
||||
autocmd({"BufWritePre"}, {
|
||||
group = augroup(augroupname, {clear = true}),
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
goformat.goimport()
|
||||
end
|
||||
})
|
||||
|
||||
require("core.utils").load_mappings "golang"
|
||||
|
||||
end
|
||||
|
||||
return M
|
@ -0,0 +1,128 @@
|
||||
-- helper module for setting custom lsp settings per project
|
||||
-- will be used for setting autostart of lspclient per projects
|
||||
--
|
||||
local M = {}
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
local augroup_name = "perproject"
|
||||
|
||||
local function setup_autocommands ()
|
||||
augroup( augroup_name ,{}) -- automatically clears prev group commands
|
||||
autocmd({"BufRead", "BufWinEnter", "BufNewFile"},{
|
||||
group = augroup_name,
|
||||
pattern = "*",
|
||||
callback = require("perproject").per_project_jsonfile,
|
||||
})
|
||||
|
||||
autocmd({"DirChanged"},{
|
||||
group = augroup_name,
|
||||
pattern = "window",
|
||||
callback = require("perproject").per_project_jsonfile,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
local _PP_CONF = {
|
||||
basename = ".pnvim.json",
|
||||
callbacks = pp_callbacks,
|
||||
}
|
||||
|
||||
local pp_callbacks = {
|
||||
-- @enabled: bool
|
||||
|
||||
lsp_autostart = function(enabled)
|
||||
if enabled then
|
||||
local other_matching_configs = require('lspconfig.util').get_other_matching_providers(vim.bo.filetype)
|
||||
for _, config in ipairs(other_matching_configs) do
|
||||
config.launch()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
}
|
||||
|
||||
local function call_pp_callback(proj_opts)
|
||||
for key, val in pairs(proj_opts) do
|
||||
-- pp_callbacks[opt] ~= nil and pp_callbacks[opt].__call()
|
||||
if pp_callbacks[key] ~= nil then
|
||||
pp_callbacks[key](val)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
local ok, Path = pcall(require, "plenary.path")
|
||||
|
||||
if not ok then
|
||||
print("[perproject] plenary required !")
|
||||
end
|
||||
|
||||
-- local scandir = require("plenary.scandir")
|
||||
|
||||
local function per_project_file()
|
||||
local cwd = Path.new(vim.fn.getcwd())
|
||||
local pp_dir = cwd:joinpath(_PP_CONF_.basename)
|
||||
|
||||
if pp_dir:is_dir() then
|
||||
|
||||
-- find if there is perproject dir
|
||||
local function on_exit(results)
|
||||
|
||||
vim.schedule(function()
|
||||
for _, res in ipairs(results) do
|
||||
pp_options[vim.fs.basename(res)] = true
|
||||
end
|
||||
end)
|
||||
end
|
||||
scandir.scan_dir_async(pp_dir.filename, {
|
||||
-- on_insert = on_insert,
|
||||
on_exit = on_exit,
|
||||
})
|
||||
else
|
||||
print("no " .. _PP_CONF.basename)
|
||||
end
|
||||
|
||||
-- TODO:
|
||||
-- check if there is a custom .nvim-lsp dir in working dir
|
||||
-- each file inside .nvim-lsp represent a active option if
|
||||
-- it is present
|
||||
-- example
|
||||
-- workingDir/
|
||||
-- .perproject/
|
||||
-- lsp.autostart --> autostart lsp for this project
|
||||
end
|
||||
|
||||
M.per_project_jsonfile = function()
|
||||
local cwd = Path.new(vim.fn.getcwd())
|
||||
local pp_file = cwd:joinpath(_PP_CONF.basename)
|
||||
if pp_file:is_file() then
|
||||
local ok, decoded = pcall(vim.json.decode, (pp_file:read()))
|
||||
if not ok then
|
||||
vim.notify(string.format("[perproject] could not parse %s : %s", _PP_CONF.basename, decoded), vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
call_pp_callback(decoded)
|
||||
-- pp_options = vim.tbl_deep_extend("force", pp_options, proj_opts or {})
|
||||
end
|
||||
end
|
||||
|
||||
local function setup_callbacks(conf)
|
||||
if conf.callbacks and
|
||||
type(conf.callbacks) == "table" then
|
||||
for cb_name, cb in pairs(conf.callbacks) do
|
||||
if type(cb) == "function" then
|
||||
print("setting up callback, ", cb_name)
|
||||
pp_callbacks[cb_name] = cb
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
function M.setup(conf)
|
||||
local config = conf or {}
|
||||
setup_callbacks(config)
|
||||
setup_autocommands()
|
||||
end
|
||||
|
||||
return M
|
Loading…
Reference in New Issue