Compare commits
No commits in common. "master" and "getting-rid-of-nvchad" have entirely different histories.
master
...
getting-ri
28 changed files with 1633 additions and 2007 deletions
161
.github/CONTRIBUTING.md
vendored
Normal file
161
.github/CONTRIBUTING.md
vendored
Normal file
|
@ -0,0 +1,161 @@
|
||||||
|
# [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)
|
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
patreon: siduck
|
||||||
|
ko_fi: siduck
|
||||||
|
custom: ["https://www.buymeacoffee.com/siduck", "https://www.paypal.com/paypalme/siduck76"]
|
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
---
|
||||||
|
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.
|
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
8
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Wiki
|
||||||
|
url: https://github.com/siduck76/NvChad/wiki
|
||||||
|
about: "Walks you through how to use and Configure NvChad."
|
||||||
|
- name: Visit our gitter chat
|
||||||
|
url: https://gitter.im/neovim-dotfiles/community
|
||||||
|
about: "A place where we dicuss NvChad related stuff."
|
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem was.
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
|
|
||||||
|
**Screenshot**
|
||||||
|
Maybe a screenshot of the feature
|
14
.github/PULL_REQUEST_TEMPLATE/feature.md
vendored
Normal file
14
.github/PULL_REQUEST_TEMPLATE/feature.md
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
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
|
16
.github/PULL_REQUEST_TEMPLATE/plugin.md
vendored
Normal file
16
.github/PULL_REQUEST_TEMPLATE/plugin.md
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
(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
|
121
.github/README.md
vendored
Normal file
121
.github/README.md
vendored
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
<h1 align="center">NvChad</h1>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<a href="https://nvchad.com/">Home</a>
|
||||||
|
<span> • </span>
|
||||||
|
<a href="https://nvchad.com/docs/quickstart/install">Install</a>
|
||||||
|
<span> • </span>
|
||||||
|
<a href="https://nvchad.com/docs/contribute">Contribute</a>
|
||||||
|
<span> • </span>
|
||||||
|
<a href="https://github.com/NvChad/NvChad#gift_heart-support">Support</a>
|
||||||
|
<span> • </span>
|
||||||
|
<a href="https://nvchad.com/docs/features">Features</a>
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
[](https://github.com/neovim/neovim)
|
||||||
|
[](https://github.com/NvChad/NvChad/issues)
|
||||||
|
[](https://discord.gg/gADmkJb9Fb)
|
||||||
|
[](https://matrix.to/#/#nvchad:matrix.org)
|
||||||
|
[](https://t.me/DE_WM)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
## Showcase
|
||||||
|
|
||||||
|
<img src="https://nvchad.com/features/nvdash.webp">
|
||||||
|
<img src="https://nvchad.com/banner.webp">
|
||||||
|
|
||||||
|
<img src="https://nvchad.com/screenshots/onedark.webp">
|
||||||
|
<img src="https://nvchad.com/screenshots/rxyhn1.webp">
|
||||||
|
|
||||||
|
## 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 isn't a framework! It's supposed to be used as a "base" config, so users can tweak the defaults well, and also remove the things they don't 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 up-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>
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
(Note: these are just 4-5 themes, NvChad has around 56 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://nvchad.com/features/nvimtree.webp"></kbd>
|
||||||
|
|
||||||
|
<h3> Telescope-nvim </h3>
|
||||||
|
|
||||||
|
A fuzzy file finder, picker, sorter, previewer and much more:
|
||||||
|
|
||||||
|
<kbd><img src="https://nvchad.com/features/telescope.webp"></kbd>
|
||||||
|
|
||||||
|
<h3> Our own statusline written from scratch </h3>
|
||||||
|
|
||||||
|
[NvChad UI](https://github.com/NvChad/ui)
|
||||||
|
|
||||||
|
<kbd><img src="https://nvchad.com/features/statuslines.webp"></kbd>
|
||||||
|
|
||||||
|
<h3> Tabufline (our own pertab bufferline) </h3>
|
||||||
|
|
||||||
|
<kbd><img src="https://nvchad.com/features/tabufline.webp"></kbd>
|
||||||
|
- Here's a [video](https://www.youtube.com/watch?v=V_9iJ96U_k8&ab_channel=siduck) that showcases it.
|
||||||
|
|
||||||
|
<h3> NvCheatsheet ( our UI Plugin ) </h3>
|
||||||
|
<kbd> <img src="https://nvchad.com/features/nvcheatsheet.webp"/></kbd>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Plugins list
|
||||||
|
|
||||||
|
- Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm)
|
||||||
|
- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) It provides statusline modules, tabufline ( tabs + buffer manager) , beautiful cheatsheets, NvChad updater, hide & unhide terminal buffers, theme switcher and much more!
|
||||||
|
- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua)
|
||||||
|
- 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
|
||||||
|
|
||||||
|
If you like NvChad and would like to support & appreciate it via donation then I'll gladly accept it.
|
||||||
|
|
||||||
|
[](https://ko-fi.com/siduck)
|
||||||
|
[](https://paypal.me/siduck13)
|
||||||
|
[](https://www.buymeacoffee.com/siduck)
|
||||||
|
[](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
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,4 +8,3 @@ after
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
lua/custom/secret
|
lua/custom/secret
|
||||||
lua/custom/configs/secret
|
lua/custom/configs/secret
|
||||||
spell/en.utf-8.add.spl
|
|
||||||
|
|
181
init.lua
181
init.lua
|
@ -1,88 +1,88 @@
|
||||||
vim.g.mapleader = ' '
|
local opt = vim.opt
|
||||||
vim.g.maplocalleader = ';'
|
local g = vim.g
|
||||||
-- vim.g.python3_host_prog = '/usr/bin/python3'
|
|
||||||
|
|
||||||
vim.opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
|
g.mapleader = ' '
|
||||||
vim.opt.signcolumn = 'yes'
|
g.maplocalleader = ';'
|
||||||
vim.opt.clipboard = '' -- don't just use the system clipboard
|
g.python3_host_prog = '/usr/bin/python3'
|
||||||
vim.opt.wrap = false
|
|
||||||
vim.opt.breakindent = false
|
opt.mouse = 'a' -- mouse does annoying things for me if it's not 'a'
|
||||||
vim.opt.conceallevel = 2
|
opt.signcolumn = 'yes'
|
||||||
vim.opt.concealcursor = 'c'
|
opt.clipboard = '' -- don't just use the system clipboard
|
||||||
vim.opt.undofile = true
|
opt.wrap = false
|
||||||
vim.opt.undolevels = 10000
|
opt.breakindent = false
|
||||||
vim.opt.writebackup = false
|
opt.spell = false
|
||||||
vim.opt.history = 5000
|
opt.conceallevel = 2
|
||||||
vim.opt.shada = { "'1000", '<50', 's10', 'h' }
|
opt.undofile = true
|
||||||
vim.g.syntax = true
|
opt.undolevels = 10000
|
||||||
vim.o.exrc = true -- load local configs in plugin dir
|
opt.writebackup = false
|
||||||
|
opt.history = 5000
|
||||||
|
opt.shada = { "'1000", '<50', 's10', 'h' }
|
||||||
|
|
||||||
-- Tabs and Indents
|
-- Tabs and Indents
|
||||||
-- ===
|
-- ===
|
||||||
vim.opt.textwidth = 80 -- Text width maximum chars before wrapping
|
|
||||||
vim.opt.tabstop = 4 -- The number of spaces a tab is
|
opt.textwidth = 80 -- Text width maximum chars before wrapping
|
||||||
vim.opt.shiftwidth = 4 -- Number of spaces to use in auto(indent)
|
opt.tabstop = 4 -- The number of spaces a tab is
|
||||||
vim.opt.smarttab = true -- Tab insert blanks according to 'shiftwidth'
|
opt.shiftwidth = 4 -- Number of spaces to use in auto(indent)
|
||||||
vim.opt.autoindent = true -- Use same indenting on new lines
|
opt.smarttab = true -- Tab insert blanks according to 'shiftwidth'
|
||||||
vim.opt.smartindent = true -- Smart autoindenting on new lines
|
opt.autoindent = true -- Use same indenting on new lines
|
||||||
vim.opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
|
opt.smartindent = true -- Smart autoindenting on new lines
|
||||||
|
opt.shiftround = true -- Round indent to multiple of 'shiftwidth'
|
||||||
|
|
||||||
-- Timing
|
-- Timing
|
||||||
-- ===
|
-- ===
|
||||||
vim.opt.ttimeout = true
|
opt.ttimeout = true
|
||||||
vim.opt.timeoutlen = 500 -- Time out on mappings
|
opt.timeoutlen = 500 -- Time out on mappings
|
||||||
vim.opt.ttimeoutlen = 10 -- Time out on key codes
|
opt.ttimeoutlen = 10 -- Time out on key codes
|
||||||
vim.opt.updatetime = 250 -- Idle time to write swap and trigger CursorHold
|
opt.updatetime = 250 -- Idle time to write swap and trigger CursorHold
|
||||||
|
|
||||||
-- Searching
|
-- Searching
|
||||||
-- ===
|
-- ===
|
||||||
vim.opt.ignorecase = true -- Search ignoring case
|
opt.ignorecase = true -- Search ignoring case
|
||||||
vim.opt.smartcase = true -- Keep case when searching with *
|
opt.smartcase = true -- Keep case when searching with *
|
||||||
vim.opt.infercase = true -- Adjust case in insert completion mode
|
opt.infercase = true -- Adjust case in insert completion mode
|
||||||
vim.opt.incsearch = true -- Incremental search
|
opt.incsearch = true -- Incremental search
|
||||||
vim.opt.hlsearch = true -- highlight searched stuff
|
vim.opt.hlsearch = true -- highlight searched stuff
|
||||||
|
|
||||||
-- Formatting
|
-- Formatting
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
vim.opt.wrap = false -- No wrap by default
|
opt.wrap = false -- No wrap by default
|
||||||
vim.opt.linebreak = true -- Break long lines at 'breakat'
|
opt.linebreak = true -- Break long lines at 'breakat'
|
||||||
vim.opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
|
opt.breakat = '\\ \\ ;:,!?' -- Long lines break chars
|
||||||
vim.opt.startofline = false -- Cursor in same column for few commands
|
opt.startofline = false -- Cursor in same column for few commands
|
||||||
vim.opt.splitbelow = true -- Splits open bottom right
|
opt.splitbelow = true -- Splits open bottom right
|
||||||
vim.opt.splitright = true
|
opt.splitright = true
|
||||||
vim.opt.breakindentopt = { shift = 2, min = 20 }
|
opt.breakindentopt = { shift = 2, min = 20 }
|
||||||
vim.opt.formatoptions = 'trowcnlm1jp' -- see :h fo-table & :h formatoptions
|
opt.formatoptions = '' -- see :h fo-table & :h formatoptions
|
||||||
vim.opt.breakindent = true
|
vim.opt.breakindent = true
|
||||||
|
|
||||||
-- Diff
|
-- Diff
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
vim.opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
|
opt.diffopt:append { 'iwhite', 'indent-heuristic', 'algorithm:patience' }
|
||||||
vim.opt.wildmode = 'longest:full,full' -- Command-line completion mode
|
opt.wildmode = 'longest:full,full' -- Command-line completion mode
|
||||||
|
|
||||||
-- Folds
|
-- Folds
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
vim.opt.foldlevelstart = 60
|
opt.foldlevel = 10 -- start with all folds open
|
||||||
vim.opt.foldlevel = 60
|
|
||||||
vim.opt.foldminlines = 5
|
|
||||||
|
|
||||||
-- Editor UI
|
-- Editor UI
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
vim.o.guifont = 'FiraCode Nerd Font:h15'
|
vim.o.guifont = 'FiraCode Nerd Font:h15'
|
||||||
vim.opt.termguicolors = true
|
opt.termguicolors = true
|
||||||
vim.opt.shortmess = 'xsTOInfFitloCaAs'
|
opt.shortmess = 'xsTOInfFitloCaAs'
|
||||||
vim.opt.showmode = true -- Show mode in cmd window
|
opt.showmode = true -- Show mode in cmd window
|
||||||
vim.opt.scrolloff = 6 -- Keep at least n lines above/below
|
opt.scrolloff = 10 -- Keep at least n lines above/below
|
||||||
vim.opt.sidescrolloff = 10 -- Keep at least n lines left/right
|
opt.sidescrolloff = 10 -- Keep at least n lines left/right
|
||||||
vim.opt.numberwidth = 2 -- Minimum number of columns to use for the line number
|
opt.numberwidth = 2 -- Minimum number of columns to use for the line number
|
||||||
vim.opt.number = true -- Show line numbers
|
opt.number = true -- Show line numbers
|
||||||
vim.opt.relativenumber = false -- Show relative line numbers
|
opt.relativenumber = true -- Show relative line numbers
|
||||||
vim.opt.ruler = true -- Default status ruler
|
opt.ruler = true -- Default status ruler
|
||||||
vim.opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default
|
opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default
|
||||||
vim.opt.laststatus = 3 -- Always show laststatus
|
opt.laststatus = 3 -- Always show laststatus
|
||||||
|
|
||||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||||
-- See `:help 'list'`
|
-- See `:help 'list'`
|
||||||
|
@ -116,62 +116,31 @@ if vim.g.neovide == true then
|
||||||
vim.g.neovide_fullscreen = true
|
vim.g.neovide_fullscreen = true
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.helpheight = 0 -- Disable help window resizing
|
opt.helpheight = 0 -- Disable help window resizing
|
||||||
vim.opt.winwidth = 30 -- Minimum width for active window
|
opt.winwidth = 30 -- Minimum width for active window
|
||||||
vim.opt.winminwidth = 1 -- Minimum width for inactive windows
|
opt.winminwidth = 1 -- Minimum width for inactive windows
|
||||||
vim.opt.winheight = 1 -- Minimum height for active window
|
opt.winheight = 1 -- Minimum height for active window
|
||||||
vim.opt.winminheight = 1 -- Minimum height for inactive window
|
opt.winminheight = 1 -- Minimum height for inactive window
|
||||||
|
|
||||||
vim.opt.showcmd = false -- show command in status line
|
opt.showcmd = false -- show command in status line
|
||||||
vim.opt.cmdheight = 0
|
opt.cmdheight = 0
|
||||||
vim.opt.cmdwinheight = 5 -- Command-line lines
|
opt.cmdwinheight = 5 -- Command-line lines
|
||||||
vim.opt.equalalways = true -- Resize windows on split or close
|
opt.equalalways = true -- Resize windows on split or close
|
||||||
vim.opt.colorcolumn = '80' -- Column highlight at textwidth's max character-limit
|
opt.colorcolumn = '+0' -- Column highlight at textwidth's max character-limit
|
||||||
|
|
||||||
vim.opt.cursorline = true
|
opt.cursorline = true
|
||||||
vim.opt.cursorlineopt = { 'number', 'screenline' }
|
opt.cursorlineopt = { 'number', 'screenline' }
|
||||||
|
|
||||||
vim.opt.pumheight = 10 -- Maximum number of items to show in the popup menu
|
opt.pumheight = 10 -- Maximum number of items to show in the popup menu
|
||||||
vim.opt.pumwidth = 10 -- Minimum width for the popup menu
|
opt.pumwidth = 10 -- Minimum width for the popup menu
|
||||||
vim.opt.pumblend = 10 -- Popup blend
|
opt.pumblend = 10 -- Popup blend
|
||||||
|
|
||||||
-- Spelling correction
|
-- Spelling correction
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
vim.opt.spell = true -- manually enable spell with `set spell` or `<leader>ts`
|
opt.spell = false -- manually enable spell with `set spell` or `<leader>ts`
|
||||||
vim.opt.spelllang = 'en,de_de'
|
opt.spelllang = 'en,de_de,'
|
||||||
vim.opt.spellsuggest = 'double,50,timeout:5000'
|
opt.spellsuggest = 'double,50,timeout:5000'
|
||||||
|
|
||||||
-- user commands
|
|
||||||
vim.api.nvim_create_user_command('Env', function(opts)
|
|
||||||
vim.cmd(string.format('r!echo $%s', opts.fargs[1]))
|
|
||||||
end, { nargs = 1 })
|
|
||||||
vim.api.nvim_create_user_command('FormatDisable', function(args)
|
|
||||||
if args.bang then
|
|
||||||
-- FormatDisable! will disable formatting globally
|
|
||||||
print 'disable autoformat globally'
|
|
||||||
vim.g.disable_autoformat = true
|
|
||||||
else
|
|
||||||
print 'disable autoformat locally'
|
|
||||||
vim.b.disable_autoformat = true
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
desc = 'Disable autoformat',
|
|
||||||
bang = true,
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_user_command('FormatEnable', function(args)
|
|
||||||
if args.bang then
|
|
||||||
-- FormatDisable! will enable formatting globally
|
|
||||||
print 'enable autoformat globally'
|
|
||||||
vim.g.disable_autoformat = false
|
|
||||||
else
|
|
||||||
print 'enable autoformat locally'
|
|
||||||
vim.b.disable_autoformat = false
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
desc = 'Enable autoformat',
|
|
||||||
bang = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- autocommands
|
-- autocommands
|
||||||
-- ===
|
-- ===
|
||||||
|
@ -206,10 +175,8 @@ end ---@diagnostic disable-next-line: undefined-field
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require 'custom.maps'
|
require 'custom.maps'
|
||||||
require 'custom.autocmds'
|
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
{ import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
{ import = 'kickstart.plugins.debug' },
|
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
local augroup = vim.api.nvim_create_augroup('plex_generic_autocmds', {})
|
|
||||||
|
|
||||||
-- enable text wrapping for text filetypes
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = augroup,
|
|
||||||
pattern = {
|
|
||||||
'tex',
|
|
||||||
'text',
|
|
||||||
'markdown',
|
|
||||||
'help',
|
|
||||||
'typst',
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.wrap = true
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- use html for htmldjango
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = augroup,
|
|
||||||
pattern = {
|
|
||||||
'html',
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.bo.filetype = 'html'
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- always use the tex filetype for latex things, as those are most supported by
|
|
||||||
-- latex language servers.
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = augroup,
|
|
||||||
pattern = {
|
|
||||||
'latex',
|
|
||||||
'plaintex',
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.bo.filetype = 'tex'
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- conceallevel is what converts things like **bold** to be displayed as bold
|
|
||||||
-- without the stars. This is useful, but we might not want it for some
|
|
||||||
-- filetypes.
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = augroup,
|
|
||||||
pattern = {
|
|
||||||
'latex',
|
|
||||||
'markdown',
|
|
||||||
'plaintex',
|
|
||||||
'tex',
|
|
||||||
'typst',
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.conceallevel = 0
|
|
||||||
vim.opt_local.concealcursor = ''
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Enable spellcheck for some types
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = augroup,
|
|
||||||
pattern = {
|
|
||||||
'latex',
|
|
||||||
'markdown',
|
|
||||||
'typst',
|
|
||||||
'plaintex',
|
|
||||||
'tex',
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.cmd [[set spell]]
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- disable auto formatting for some filetypes
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = augroup,
|
|
||||||
pattern = {
|
|
||||||
'TelescopePrompt',
|
|
||||||
},
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.formatoptions = ''
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- tweak colorschemes and highlights after loading a new colorscheme
|
|
||||||
vim.api.nvim_create_autocmd('ColorScheme', {
|
|
||||||
group = augroup,
|
|
||||||
callback = function()
|
|
||||||
vim.cmd [[highlight Comment gui=NONE]] -- no italics for comments
|
|
||||||
end,
|
|
||||||
})
|
|
|
@ -20,27 +20,48 @@ vim.keymap.set({ 't', 'i', 'v', 'n' }, '<A-k>', '<C-u>', { desc = 'move a many l
|
||||||
vim.keymap.set({ 'v', 'n' }, 'H', '<Home>', { desc = 'move to start of line' })
|
vim.keymap.set({ 'v', 'n' }, 'H', '<Home>', { desc = 'move to start of line' })
|
||||||
vim.keymap.set({ 'v', 'n' }, 'L', '<End>', { desc = 'move to end of line' })
|
vim.keymap.set({ 'v', 'n' }, 'L', '<End>', { desc = 'move to end of line' })
|
||||||
|
|
||||||
-- make j and k move by visual lines, not actual lines
|
|
||||||
vim.keymap.set({ 'v', 'n' }, 'j', 'gj', { desc = 'move up' })
|
|
||||||
vim.keymap.set({ 'v', 'n' }, 'k', 'gk', { desc = 'move down' })
|
|
||||||
|
|
||||||
-- move+scroll
|
-- move+scroll
|
||||||
vim.keymap.set({ 'v', 'n' }, 'zk', '<C-e>', { desc = 'move and scroll up' })
|
vim.keymap.set({ 'v', 'n' }, 'zk', '<C-e>', { desc = 'move and scroll up' })
|
||||||
vim.keymap.set({ 'v', 'n' }, 'zj', '<C-y>', { desc = 'move and scroll down' })
|
vim.keymap.set({ 'v', 'n' }, 'zj', '<C-y>', { desc = 'move and scroll down' })
|
||||||
|
|
||||||
-- go to beginning and end in insert mode
|
-- go to beginning and end in insert mode
|
||||||
vim.keymap.set('i', '<C-S-h>', '<esc>^i', { desc = 'Go to the start of the line' })
|
vim.keymap.set('i', '<C-s>', '<esc>^i', { desc = 'Go to the start of the line' })
|
||||||
vim.keymap.set('i', '<C-S-l>', '<End>', { desc = 'Go to the end of the line' })
|
vim.keymap.set('i', '<C-e>', '<End>', { desc = 'Go to the end of the line' })
|
||||||
vim.keymap.set('i', '<C-w>', '<esc>lwi', { desc = 'Go a word further' })
|
vim.keymap.set('i', '<C-w>', '<esc>wa', { desc = 'Go a word further' })
|
||||||
vim.keymap.set('i', '<C-b>', '<esc>lbi', { desc = 'Go a word backward' })
|
vim.keymap.set('i', '<C-b>', '<esc>ba', { desc = 'Go a word backward' })
|
||||||
vim.keymap.set('i', '<C-e>', '<esc>lea', { desc = 'Go a to next word end' })
|
|
||||||
|
|
||||||
-- navigate hjkl in insert mode
|
-- navigate hjkl in insert mode
|
||||||
vim.keymap.set('i', '<C-h>', '<Left>', { desc = 'Move left' })
|
vim.keymap.set('i', '<C-h>', '<Left>', { desc = 'Move left' })
|
||||||
vim.keymap.set('i', '<C-j>', '<Down>', { desc = 'Move down' })
|
vim.keymap.set('i', '<C-j>', '<Right>', { desc = 'Move right' })
|
||||||
vim.keymap.set('i', '<C-k>', '<Up>', { desc = 'Move up' })
|
vim.keymap.set('i', '<C-k>', '<Down>', { desc = 'Move down' })
|
||||||
vim.keymap.set('i', '<C-l>', '<Right>', { desc = 'Move right' })
|
vim.keymap.set('i', '<C-l>', '<Up>', { desc = 'Move up' })
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Workspace, buffer and window manipulation
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- split windows
|
||||||
|
vim.keymap.set('n', '<leader>"', '<cmd>vsplit<cr>', { desc = 'Split the window vertically' })
|
||||||
|
vim.keymap.set('n', '<leader>%', '<cmd>split<cr>', { desc = 'Split the window horizontally' })
|
||||||
|
|
||||||
|
-- window actions
|
||||||
|
vim.keymap.set('n', '<leader>wbn', '<cmd>enew<cr>', { desc = 'Open a [N]ew [B]uffer' })
|
||||||
|
vim.keymap.set('n', '<leader>wbc', '<cmd>bw<cr>', { desc = '[C]lose current [B]uffer' }) -- :bd would keep in background
|
||||||
|
vim.keymap.set('n', '<C-Up>', '<cmd>resize +1<cr>', { desc = 'Resize window' })
|
||||||
|
vim.keymap.set('n', '<C-Down>', '<cmd>resize -1<cr>', { desc = 'Resize window' })
|
||||||
|
vim.keymap.set('n', '<C-Left>', '<cmd>vertical resize +1<cr>', { desc = 'Resize window vertically' })
|
||||||
|
vim.keymap.set('n', '<C-Right>', '<cmd>vertical resize -1<cr>', { desc = 'Resize window vertically' })
|
||||||
|
|
||||||
|
-- tabs/workspaces
|
||||||
|
vim.keymap.set('n', '<leader>wn', '<cmd>tabnew<cr>', { desc = 'Open a [N]ew [W]orkspace/Tab' })
|
||||||
|
vim.keymap.set('n', '<leader>wc', '<cmd>tabclose<cr>', { desc = '[C]lose a [W]orkspace/Tab' })
|
||||||
|
vim.keymap.set('n', '<leader>wk', '<cmd>tabnext<cr>', { desc = 'Next [W]orkspace/Tab' })
|
||||||
|
vim.keymap.set('n', '<leader>wj', '<cmd>tabprevious<cr>', { desc = 'Last [W]orkspace/Tab' })
|
||||||
|
|
||||||
|
vim.keymap.set('t', '<C-w>', vim.api.nvim_replace_termcodes('<C-\\><C-N>', true, true, true), { desc = 'Leave terminal mode' })
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- Move to things
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
-- move to window
|
-- move to window
|
||||||
-- See `:help wincmd` for a list of all window commands
|
-- See `:help wincmd` for a list of all window commands
|
||||||
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||||
|
@ -52,40 +73,6 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
|
||||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||||
|
|
||||||
-- let me out!!!
|
|
||||||
vim.keymap.set({ 'n', 'v' }, 'qqq', '<cmd>bnext<cr><cmd>bd #<cr>', { desc = '[Q]uit the current window' })
|
|
||||||
vim.keymap.set({ 'n', 'v' }, '<A-c>', '<cmd>bnext<cr><cmd>bd #<cr>', { desc = '[C]lose the current buffer' })
|
|
||||||
|
|
||||||
vim.keymap.set({ 'n' }, '#', "'", { desc = '[Q]uit the current window' })
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- Workspace, buffer and window manipulation
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- split windows
|
|
||||||
vim.keymap.set('n', '<leader>"', '<cmd>vsplit<cr>', { desc = 'Split the window vertically' })
|
|
||||||
vim.keymap.set('n', '<leader>%', '<cmd>split<cr>', { desc = 'Split the window horizontally' })
|
|
||||||
vim.keymap.set('n', '<leader>w"', '<cmd>vnew<cr>', { desc = 'Split the window vertically (new buffer)' })
|
|
||||||
vim.keymap.set('n', '<leader>w%', '<cmd>new<cr>', { desc = 'Split the window horizontally (new buffer)' })
|
|
||||||
|
|
||||||
-- window actions
|
|
||||||
vim.keymap.set('n', '<leader>wbn', '<cmd>enew<cr>', { desc = 'Open a [N]ew buffer' })
|
|
||||||
vim.keymap.set('n', '<leader>wbc', '<cmd>bw<cr>', { desc = '[C]lose current buffer' }) -- :bd would keep in background
|
|
||||||
vim.keymap.set('n', '<C-Up>', '<cmd>resize +1<cr>', { desc = 'Resize window' })
|
|
||||||
vim.keymap.set('n', '<C-Down>', '<cmd>resize -1<cr>', { desc = 'Resize window' })
|
|
||||||
vim.keymap.set('n', '<C-Left>', '<cmd>vertical resize +1<cr>', { desc = 'Resize window vertically' })
|
|
||||||
vim.keymap.set('n', '<C-Right>', '<cmd>vertical resize -1<cr>', { desc = 'Resize window vertically' })
|
|
||||||
|
|
||||||
-- tabs/workspaces
|
|
||||||
vim.keymap.set('n', '<Tab>', '<cmd>bnext<cr>', { desc = 'Next Buffer' })
|
|
||||||
vim.keymap.set('n', '<S-Tab>', '<cmd>bprev<cr>', { desc = 'Last Buffer' })
|
|
||||||
vim.keymap.set('n', '<leader>wn', '<cmd>tabnew<cr>', { desc = 'Open a [N]ew [W]orkspace/Tab' })
|
|
||||||
vim.keymap.set('n', '<leader>wc', '<cmd>tabclose<cr>', { desc = '[C]lose a [W]orkspace/Tab' })
|
|
||||||
vim.keymap.set('n', '<leader>wk', '<cmd>tabnext<cr>', { desc = 'Next [W]orkspace/Tab' })
|
|
||||||
vim.keymap.set('n', '<leader>wj', '<cmd>tabprevious<cr>', { desc = 'Last [W]orkspace/Tab' })
|
|
||||||
vim.keymap.set('n', '<leader>n', '<cmd>enew<cr>', { desc = '[N]ew Buffer' })
|
|
||||||
|
|
||||||
vim.keymap.set('t', '<C-w>', vim.api.nvim_replace_termcodes('<C-\\><C-N>', true, true, true), { desc = 'Leave terminal mode' })
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Editing
|
-- Editing
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -93,41 +80,22 @@ vim.keymap.set('t', '<C-w>', vim.api.nvim_replace_termcodes('<C-\\><C-N>', true,
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>y', '"+y', { desc = '[Y]ank to system' })
|
vim.keymap.set({ 'n', 'v' }, '<leader>y', '"+y', { desc = '[Y]ank to system' })
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>Y', '"+Y', { desc = '[Y]ank to system' })
|
vim.keymap.set({ 'n', 'v' }, '<leader>Y', '"+Y', { desc = '[Y]ank to system' })
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>yy', '"+yy', { desc = '[Y]ank to system' })
|
vim.keymap.set({ 'n', 'v' }, '<leader>yy', '"+yy', { desc = '[Y]ank to system' })
|
||||||
|
|
||||||
-- paste from system clipboard
|
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>p', '"+p', { desc = '[P]aste from system' })
|
|
||||||
vim.keymap.set({ 't', 'n', 'v' }, '<C-S-v>', '<C-w>"+pi', { desc = 'Paste the system clipboard' })
|
vim.keymap.set({ 't', 'n', 'v' }, '<C-S-v>', '<C-w>"+pi', { desc = 'Paste the system clipboard' })
|
||||||
|
|
||||||
-- do not overwrite the register when pasting (kept defaults)
|
|
||||||
vim.keymap.set({ 'v' }, 'P', 'P', { desc = '[P]aste to selected' })
|
|
||||||
vim.keymap.set({ 'v' }, 'p', 'p', { desc = '[p]aste to selected and copy to register' })
|
|
||||||
|
|
||||||
-- add lines from normal and visual, without insert mode
|
-- add lines from normal and visual, without insert mode
|
||||||
vim.keymap.set({ 'n', 'v' }, 'OO', 'O<Esc>', { desc = 'Insert a line above' })
|
vim.keymap.set({ 'n', 'v' }, 'OO', 'O<Esc>', { desc = 'Insert a line above' })
|
||||||
vim.keymap.set({ 'n', 'v' }, 'oo', 'o<Esc>', { desc = 'Insert a line below' })
|
vim.keymap.set({ 'n', 'v' }, 'oo', 'o<Esc>', { desc = 'Insert a line below' })
|
||||||
|
|
||||||
-- add lines from normal and visual, with insert mode
|
|
||||||
vim.keymap.set({ 'n', 'v' }, 'O', 'O', { desc = 'Insert a line above and insert' })
|
|
||||||
vim.keymap.set({ 'n', 'v' }, 'o', 'o', { desc = 'Insert a line below and insert' })
|
|
||||||
vim.keymap.set({ 'n', 'v' }, 'Oi', 'O', { desc = 'Insert a line above and insert' })
|
|
||||||
vim.keymap.set({ 'n', 'v' }, 'oi', 'o', { desc = 'Insert a line below and insert' })
|
|
||||||
|
|
||||||
-- make current line a blank line
|
|
||||||
vim.keymap.set({ 'n', 'v' }, 'do', 'Vc<Esc>', { desc = '[D]o [O]ver / Rewrite line' })
|
|
||||||
|
|
||||||
-- substitute, normally on 's', but the leap plugin is more useful on 's'
|
-- substitute, normally on 's', but the leap plugin is more useful on 's'
|
||||||
vim.keymap.set({ 'n' }, '<leader>s', 's', { desc = '[S]ubstitute hovered text' })
|
vim.keymap.set({ 'n' }, '<leader>s', 's', { desc = '[S]ubstitute hovered text' })
|
||||||
|
|
||||||
-- do something useful with the arrow keys:
|
-- do something useful with the arrow keys:
|
||||||
-- move lines up/down and change indentation
|
-- move lines up/down and change indentation
|
||||||
vim.keymap.set({ 'n', 'v' }, '<Up>', '<cmd> move-2<cr>', { desc = 'Move line up' })
|
vim.keymap.set({ 'n', 'v' }, '<Up>', '<cmd> move-2<cr>', { desc = 'Move line up' })
|
||||||
vim.keymap.set({ 'n', 'v' }, '<Down>', '<cmd> move+1<cr>', { desc = 'Move line down' })
|
vim.keymap.set({ 'n', 'v' }, '<Down>', '<cmd> move+2<cr>', { desc = 'Move line down' })
|
||||||
vim.keymap.set({ 'n', 'v' }, '<Left>', '<<', { desc = 'Less indentation' })
|
vim.keymap.set({ 'n', 'v' }, '<Left>', '<<', { desc = 'Less indentation' })
|
||||||
vim.keymap.set({ 'n', 'v' }, '<Right>', '>>', { desc = 'More indentation' })
|
vim.keymap.set({ 'n', 'v' }, '<Right>', '>>', { desc = 'More indentation' })
|
||||||
|
|
||||||
-- format a long line into multiple with length 80
|
|
||||||
vim.keymap.set({ 'v' }, '<leader>fl', ':!fmt -w80<CR>', { desc = '[F]ormat long [L]ines into smaller ones' })
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Formating
|
-- Formating
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -141,16 +109,3 @@ end, { desc = '[F]ormat buffer (no plugin)' })
|
||||||
vim.keymap.set('n', '<leader>fw', function()
|
vim.keymap.set('n', '<leader>fw', function()
|
||||||
require('mini.trailspace').trim()
|
require('mini.trailspace').trim()
|
||||||
end, { desc = '[F]ormat remove [W]hitespace' })
|
end, { desc = '[F]ormat remove [W]hitespace' })
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- Formating
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- discard F15
|
|
||||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<F15>', '<Nop>')
|
|
||||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<S-F15>', '<Nop>')
|
|
||||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<A-F15>', '<Nop>')
|
|
||||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<C-F15>', '<Nop>')
|
|
||||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<C-S-F15>', '<Nop>')
|
|
||||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<C-A-F15>', '<Nop>')
|
|
||||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<A-S-F15>', '<Nop>')
|
|
||||||
vim.keymap.set({ 'i', 't', 'x', 'n', 'v' }, '<C-A-S-F15>', '<Nop>')
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
local completion = require 'null-ls.builtins._meta.completion'
|
|
||||||
-- Brief aside: **What is LSP?**
|
-- Brief aside: **What is LSP?**
|
||||||
--
|
--
|
||||||
-- LSP is an initialism you've probably heard, but might not understand what it is.
|
-- LSP is an initialism you've probably heard, but might not understand what it is.
|
||||||
|
@ -54,11 +53,11 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
|
||||||
-- Rename the variable under your cursor.
|
-- Rename the variable under your cursor.
|
||||||
-- Most Language Servers support renaming across files, etc.
|
-- Most Language Servers support renaming across files, etc.
|
||||||
map('<leader>cr', vim.lsp.buf.rename, '[R]ename')
|
map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||||
|
|
||||||
-- Execute a code action, usually your cursor needs to be on top of an error
|
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||||
-- or a suggestion from your LSP for this to activate.
|
-- or a suggestion from your LSP for this to activate.
|
||||||
map('<leader>ca', vim.lsp.buf.code_action, '[A]ction')
|
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||||
|
|
||||||
-- Opens a popup that displays documentation about the word under your cursor
|
-- Opens a popup that displays documentation about the word under your cursor
|
||||||
-- See `:help K` for why this keymap.
|
-- See `:help K` for why this keymap.
|
||||||
|
@ -68,8 +67,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
-- For example, in C this would take you to the header.
|
-- For example, in C this would take you to the header.
|
||||||
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
|
|
||||||
map('gl', vim.diagnostic.open_float, 'Make the diagnostic big')
|
|
||||||
|
|
||||||
-- The following two autocommands are used to highlight references of the
|
-- The following two autocommands are used to highlight references of the
|
||||||
-- word under your cursor when your cursor rests there for a little while.
|
-- word under your cursor when your cursor rests there for a little while.
|
||||||
-- See `:help CursorHold` for information about when this is executed
|
-- See `:help CursorHold` for information about when this is executed
|
||||||
|
@ -115,28 +112,8 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
||||||
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
||||||
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
||||||
CAPABILITIES = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
CAPABILITIES = vim.tbl_deep_extend('force', CAPABILITIES, require('cmp_nvim_lsp').default_capabilities())
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||||
|
|
||||||
DEFAULT_ON_ATTACH = function(client, bufnr)
|
|
||||||
vim.keymap.set('n', '<leader>tp', function()
|
|
||||||
print('pinning this file: ', vim.api.nvim_buf_get_name(0), 'bufnr: ', bufnr)
|
|
||||||
client:exec_cmd({
|
|
||||||
title = 'pin',
|
|
||||||
command = 'tinymist.pinMain',
|
|
||||||
arguments = { vim.api.nvim_buf_get_name(0) },
|
|
||||||
}, { bufnr = bufnr })
|
|
||||||
vim.cmd "TypstPreview"
|
|
||||||
end, { desc = '[T]oggle [P]review (pin this file as main file and open preview)', noremap = true })
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>tu', function()
|
|
||||||
client:exec_cmd({
|
|
||||||
title = 'unpin',
|
|
||||||
command = 'tinymist.pinMain',
|
|
||||||
arguments = { vim.v.null },
|
|
||||||
}, { bufnr = bufnr })
|
|
||||||
end, { desc = '[T]oggle [U]npin (unpin this file as main file)', noremap = true })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
|
@ -148,48 +125,109 @@ end
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
local servers = {
|
local servers = {
|
||||||
tinymist = {
|
-- clangd = {},
|
||||||
settings = {
|
-- gopls = {},
|
||||||
formatterMode = 'typstyle',
|
-- pyright = {},
|
||||||
exportPdf = 'never',
|
-- rust_analyzer = {},
|
||||||
semanticTokens = 'disable',
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
},
|
--
|
||||||
on_attach = DEFAULT_ON_ATTACH,
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||||
},
|
-- https://github.com/pmizio/typescript-tools.nvim
|
||||||
|
--
|
||||||
|
-- But for many setups, the LSP (`tsserver`) will work just fine
|
||||||
|
-- tsserver = {},
|
||||||
|
--
|
||||||
|
|
||||||
html = {},
|
html = {},
|
||||||
taplo = {},
|
|
||||||
cssls = {},
|
cssls = {},
|
||||||
ts_ls = {},
|
tsserver = {},
|
||||||
clangd = {},
|
clangd = {},
|
||||||
pyright = {},
|
|
||||||
bashls = {},
|
bashls = {},
|
||||||
|
cmake = {},
|
||||||
yamlls = {},
|
yamlls = {},
|
||||||
|
texlab = {},
|
||||||
|
basedpyright = {
|
||||||
|
root_dir = vim.loop.cwd,
|
||||||
|
flags = { debounce_text_changes = 300 },
|
||||||
|
single_file_support = true,
|
||||||
|
settings = {
|
||||||
|
python = {
|
||||||
|
analysis = {
|
||||||
|
autoSearchPaths = true,
|
||||||
|
diagnosticMode = 'openFilesOnly',
|
||||||
|
useLibraryCodeForTypes = true,
|
||||||
|
typeCheckingMode = 'basic',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
settings = {
|
settings = {
|
||||||
['rust-analyzer'] = {
|
['rust-analyzer'] = {
|
||||||
check = {
|
check = {
|
||||||
command = 'clippy',
|
command = 'clippy',
|
||||||
allTargets = false
|
|
||||||
},
|
},
|
||||||
imports = {
|
imports = {
|
||||||
preferPrelude = true,
|
granularity = {
|
||||||
|
group = 'module',
|
||||||
|
},
|
||||||
|
prefix = 'self',
|
||||||
},
|
},
|
||||||
cargo = {
|
cargo = {
|
||||||
features = 'all',
|
|
||||||
buildScripts = {
|
buildScripts = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
allTargets = false
|
|
||||||
},
|
},
|
||||||
procMacro = {
|
procMacro = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
assist = {
|
|
||||||
emitMustUse = true,
|
|
||||||
expressionFillDefault = true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ltex = {
|
||||||
|
use_spellfile = false,
|
||||||
|
settings = {
|
||||||
|
ltex = {
|
||||||
|
checkFrequency = 'save', -- shut up while i'm just editing, see <https://github.com/folke/noice.nvim/issues/166>
|
||||||
|
-- specific language (such as en-GB or de-DE is recommended, but I
|
||||||
|
-- want multilingual)
|
||||||
|
language = 'auto',
|
||||||
|
enabled = {
|
||||||
|
'bibtex',
|
||||||
|
'tex',
|
||||||
|
'latex',
|
||||||
|
'gitcommit',
|
||||||
|
'markdown',
|
||||||
|
'org',
|
||||||
|
'restructuredtext',
|
||||||
|
'rsweave',
|
||||||
|
'quarto',
|
||||||
|
'rmd',
|
||||||
|
'context',
|
||||||
|
-- "html",
|
||||||
|
-- "xhtml",
|
||||||
|
},
|
||||||
|
additionalRules = {
|
||||||
|
enablePickyRules = true,
|
||||||
|
-- thats cool, but often adds diagnostics in
|
||||||
|
-- places where a german might confuse words that are similar
|
||||||
|
-- between english and german REGARDLESS of context. I seem to use the
|
||||||
|
-- english words only in the proper contexts, so leaving this on
|
||||||
|
-- just adds annoying hints like 'Hinweis: "list/NN.*" (English) bedeutet "Liste",
|
||||||
|
-- "Verzeichnis" (German). Meinten Sie vielleicht 'cunning', 'trick'?'
|
||||||
|
-- everytime I use the word "list". I liked that this makes the hints be
|
||||||
|
-- in german regardless of the language I'm working in through...
|
||||||
|
--motherTongue = "de",
|
||||||
|
},
|
||||||
|
-- load token and additional languagetool items later
|
||||||
|
},
|
||||||
|
},
|
||||||
|
languageToolOrg = {
|
||||||
|
apiKey = require 'custom.secret.languagetool',
|
||||||
|
username = 'accounts@cscherr.de',
|
||||||
|
languageToolHttpServerUrl = 'https://api.languagetoolplus.com/v2/',
|
||||||
|
},
|
||||||
|
languageToolHttpServerUrl = 'https://api.languagetoolplus.com/v2/',
|
||||||
},
|
},
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -213,25 +251,20 @@ require('mason').setup()
|
||||||
-- You can add other tools here that you want Mason to install
|
-- You can add other tools here that you want Mason to install
|
||||||
-- for you, so that they are available from within Neovim.
|
-- for you, so that they are available from within Neovim.
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {})
|
vim.list_extend(ensure_installed, {
|
||||||
|
'stylua', -- Used to format Lua code
|
||||||
|
})
|
||||||
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
ensure_installed = ensure_installed,
|
handlers = {
|
||||||
automatic_installation = true,
|
function(server_name)
|
||||||
automatic_enable = false,
|
local server = servers[server_name] or {}
|
||||||
}
|
|
||||||
|
|
||||||
-- some things work weird
|
|
||||||
local lspconfig = require 'lspconfig'
|
|
||||||
|
|
||||||
for server_name, server in pairs(servers) do
|
|
||||||
-- This handles overriding only values explicitly passed
|
-- This handles overriding only values explicitly passed
|
||||||
-- by the server configuration above. Useful when disabling
|
-- by the server configuration above. Useful when disabling
|
||||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||||
server.capabilities = vim.tbl_deep_extend('force', {}, CAPABILITIES, server.capabilities or {})
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
require('lspconfig')[server_name].setup(server)
|
require('lspconfig')[server_name].setup(server)
|
||||||
end
|
end,
|
||||||
|
},
|
||||||
lspconfig.gdscript.setup {}
|
}
|
||||||
|
|
||||||
return servers
|
|
||||||
|
|
|
@ -13,19 +13,9 @@ return {
|
||||||
function()
|
function()
|
||||||
require('Comment.api').toggle.linewise.current()
|
require('Comment.api').toggle.linewise.current()
|
||||||
end,
|
end,
|
||||||
mode = { 'n' },
|
mode = { 'n', 'v' },
|
||||||
desc = 'Comment toggle current line',
|
desc = 'Comment toggle current line',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'<leader>v',
|
|
||||||
function()
|
|
||||||
local esc = vim.api.nvim_replace_termcodes('<ESC>', true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(esc, 'nx', false)
|
|
||||||
require('Comment.api').toggle.linewise(vim.fn.visualmode())
|
|
||||||
end,
|
|
||||||
mode = { 'x' },
|
|
||||||
desc = 'Comment toggle selected lines',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
vim.keymap.set('n', '<leader>c', function()
|
vim.keymap.set('n', '<leader>c', function()
|
||||||
|
@ -62,34 +52,12 @@ return {
|
||||||
{
|
{
|
||||||
'ziontee113/icon-picker.nvim',
|
'ziontee113/icon-picker.nvim',
|
||||||
keys = {
|
keys = {
|
||||||
{ '<localleader>fi', '<cmd>IconPickerNormal<CR>', desc = 'pick icon' },
|
{ '<C-I>', '<cmd>IconPickerNormal<CR>', desc = 'pick icon' },
|
||||||
|
{ 'y<C-I>', '<cmd>IconPickerYank<CR>', desc = 'yank icon' },
|
||||||
},
|
},
|
||||||
cmd = { 'IconPickerInsert', 'IconPickerYank', 'IconPickerNormal' },
|
cmd = { 'IconPickerInsert', 'IconPickerYank', 'IconPickerNormal' },
|
||||||
config = function()
|
config = function()
|
||||||
require('icon-picker').setup { disable_legacy_commands = true }
|
require('icon-picker').setup { disable_legacy_commands = true }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
event = 'InsertEnter',
|
|
||||||
-- Optional dependency
|
|
||||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
|
||||||
config = function()
|
|
||||||
require('nvim-autopairs').setup {}
|
|
||||||
-- WARN: this is kind of anoying with rust, so I have disabeld it
|
|
||||||
-- -- If you want to automatically add `(` after selecting a function or method
|
|
||||||
-- local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
|
||||||
-- local cmp = require 'cmp'
|
|
||||||
-- cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'mbbill/undotree',
|
|
||||||
config = function()
|
|
||||||
vim.keymap.set({ 'n', 'v' }, '<leader>u', vim.cmd.UndotreeToggle, { desc = '[U]ndo menu' })
|
|
||||||
vim.g.undotree_WindowLayout = 3
|
|
||||||
vim.g.undotree_SplitWidth = 32
|
|
||||||
vim.g.undotree_DiffAutoOpen = false
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
return {
|
return {
|
||||||
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||||
|
|
||||||
-- NOTE: Plugins can specify dependencies.
|
-- NOTE: Plugins can specify dependencies.
|
||||||
--
|
--
|
||||||
-- The dependencies are proper plugin specifications as well - anything
|
-- The dependencies are proper plugin specifications as well - anything
|
||||||
|
@ -22,34 +24,23 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
notify_on_error = false,
|
notify_on_error = false,
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
-- have a well standardized coding style. You can add additional
|
-- have a well standardized coding style. You can add additional
|
||||||
-- languages here or re-enable it for the disabled ones.
|
-- languages here or re-enable it for the disabled ones.
|
||||||
local disable_filetypes = { c = false, cpp = false, json = true, bib = true, markdown = false }
|
local disable_filetypes = { c = true, cpp = true }
|
||||||
return {
|
return {
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
['_'] = { 'prettier' },
|
|
||||||
rust = { 'rust-analyzer' },
|
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
typst = { 'typstyle' },
|
|
||||||
json = { 'jq' },
|
|
||||||
-- rust = { 'rustfmt' }, -- does not need one with the lsp there
|
|
||||||
c = { 'clang-format' },
|
|
||||||
cpp = { 'clang-format' },
|
|
||||||
python = { 'autopep8' },
|
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
-- is found.
|
-- is found.
|
||||||
javascript = { 'prettier' },
|
-- javascript = { { "prettierd", "prettier" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,9 +11,9 @@ return {
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
|
||||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||||
-- used for completion, annotations and signatures of Neovim apis
|
-- used for completion, annotations and signatures of Neovim apis
|
||||||
{ 'folke/lazydev.nvim' },
|
{ 'folke/neodev.nvim', opts = {} },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require 'custom.plugins.configs.lsp'
|
require 'custom.plugins.configs.lsp'
|
||||||
|
@ -36,19 +36,19 @@ return {
|
||||||
'folke/trouble.nvim',
|
'folke/trouble.nvim',
|
||||||
cmd = 'Trouble',
|
cmd = 'Trouble',
|
||||||
opts = { use_diagnostic_signs = true },
|
opts = { use_diagnostic_signs = true },
|
||||||
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
{ '<leader>ctb', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', desc = 'Document Diagnostics (Trouble)' },
|
{ '<leader>rb', "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = 'Document Diagnostics (Trouble)' },
|
||||||
{ '<leader>ctr', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Workspace Diagnostics (Trouble)' },
|
{ '<leader>rr', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Workspace Diagnostics (Trouble)' },
|
||||||
{ '<leader>ctq', '<cmd>Trouble qflist toggle<cr>', desc = 'Quickfix List (Trouble)' },
|
{ '<leader>rq', "<cmd>Trouble qflist toggle<cr>", desc = 'Quickfix List (Trouble)' },
|
||||||
{ '<leader>ctl', '<cmd>Trouble loclist toggle<cr>', desc = 'Location List (Trouble)' },
|
{ '<leader>rl', "<cmd>Trouble loclist toggle<cr>", desc = 'Location List (Trouble)' },
|
||||||
{ '<leader>ctd', '<cmd>Trouble symbols<cr>', desc = 'LSP symbols (Trouble)' },
|
{ '<leader>rd', "<cmd>Trouble symbols<cr>", desc = 'LSP symbols (Trouble)' },
|
||||||
{ '<leader>ctt', '<cmd>Trouble todo<cr>', desc = 'Todos (Trouble)' },
|
{ '<leader>rt', "<cmd>Trouble todo<cr>", desc = 'Todos (Trouble)' },
|
||||||
{ '<leader>cts', '<cmd>Trouble lsp_document_symbols toggle win.position=right<cr>', desc = 'Document [S]ymbols side (Trouble)' },
|
|
||||||
{
|
{
|
||||||
'[q',
|
'[q',
|
||||||
function()
|
function()
|
||||||
if require('trouble').is_open() then
|
if require('trouble').is_open() then
|
||||||
require('trouble').previous { skip_groups = true, jump = true }
|
require('trouble').previous({ skip_groups = true, jump = true })
|
||||||
else
|
else
|
||||||
vim.cmd.cprev()
|
vim.cmd.cprev()
|
||||||
end
|
end
|
||||||
|
@ -59,7 +59,7 @@ return {
|
||||||
']q',
|
']q',
|
||||||
function()
|
function()
|
||||||
if require('trouble').is_open() then
|
if require('trouble').is_open() then
|
||||||
require('trouble').next { skip_groups = true, jump = true }
|
require('trouble').next({ skip_groups = true, jump = true })
|
||||||
else
|
else
|
||||||
vim.cmd.cnext()
|
vim.cmd.cnext()
|
||||||
end
|
end
|
||||||
|
@ -89,12 +89,12 @@ return {
|
||||||
-- `friendly-snippets` contains a variety of premade snippets.
|
-- `friendly-snippets` contains a variety of premade snippets.
|
||||||
-- See the README about individual language/framework/plugin snippets:
|
-- See the README about individual language/framework/plugin snippets:
|
||||||
-- https://github.com/rafamadriz/friendly-snippets
|
-- https://github.com/rafamadriz/friendly-snippets
|
||||||
{
|
-- {
|
||||||
'rafamadriz/friendly-snippets',
|
-- 'rafamadriz/friendly-snippets',
|
||||||
config = function()
|
-- config = function()
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
-- require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
end,
|
-- end,
|
||||||
},
|
-- },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
@ -157,16 +157,16 @@ return {
|
||||||
--
|
--
|
||||||
-- <c-l> will move you to the right of each of the expansion locations.
|
-- <c-l> will move you to the right of each of the expansion locations.
|
||||||
-- <c-h> is similar, except moving you backwards.
|
-- <c-h> is similar, except moving you backwards.
|
||||||
--['<C-l>'] = cmp.mapping(function()
|
['<C-l>'] = cmp.mapping(function()
|
||||||
-- if luasnip.expand_or_locally_jumpable() then
|
if luasnip.expand_or_locally_jumpable() then
|
||||||
-- luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
-- end
|
end
|
||||||
--end, { 'i', 's' }),
|
end, { 'i', 's' }),
|
||||||
--['<C-h>'] = cmp.mapping(function()
|
['<C-h>'] = cmp.mapping(function()
|
||||||
-- if luasnip.locally_jumpable(-1) then
|
if luasnip.locally_jumpable(-1) then
|
||||||
-- luasnip.jump(-1)
|
luasnip.jump(-1)
|
||||||
-- end
|
end
|
||||||
--end, { 'i', 's' }),
|
end, { 'i', 's' }),
|
||||||
|
|
||||||
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||||
|
@ -313,6 +313,177 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ 'kosayoda/nvim-lightbulb', event = { 'BufReadPre', 'BufNewFile' } },
|
{ 'kosayoda/nvim-lightbulb', event = { 'BufReadPre', 'BufNewFile' } },
|
||||||
|
{
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
lazy = false,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>db',
|
||||||
|
function()
|
||||||
|
require('dap').toggle_breakpoint()
|
||||||
|
end,
|
||||||
|
desc = 'Set [D]ebug [B]reakpoint',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>dc',
|
||||||
|
function()
|
||||||
|
require('dap').continue()
|
||||||
|
end,
|
||||||
|
desc = '[D]ebug [C]ontinue',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>ds',
|
||||||
|
function()
|
||||||
|
require('dap').step_over()
|
||||||
|
end,
|
||||||
|
desc = 'Set [D]ebug [S]tep over',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>di',
|
||||||
|
function()
|
||||||
|
require('dap').step_into()
|
||||||
|
end,
|
||||||
|
desc = 'Set [D]ebug step [I]nto',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local dap = require 'dap'
|
||||||
|
local mason_registry = require 'mason-registry'
|
||||||
|
local codelldb_root = mason_registry.get_package('codelldb'):get_install_path() .. '/extension/'
|
||||||
|
local codelldb_path = codelldb_root .. 'adapter/codelldb'
|
||||||
|
local liblldb_path = codelldb_root .. 'lldb/lib/liblldb.so'
|
||||||
|
dap.defaults.fallback.external_terminal = {
|
||||||
|
command = '/home/plex/.local/bin/kitty',
|
||||||
|
args = {},
|
||||||
|
}
|
||||||
|
dap.adapters.gdb = {
|
||||||
|
type = 'executable',
|
||||||
|
command = 'gdb',
|
||||||
|
args = { '-i', 'dap' },
|
||||||
|
}
|
||||||
|
dap.adapters.codelldb = {
|
||||||
|
type = 'server',
|
||||||
|
port = '30333',
|
||||||
|
executable = {
|
||||||
|
command = codelldb_path,
|
||||||
|
args = { '--port', '30333' },
|
||||||
|
detached = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
dap.configurations.cpp = {
|
||||||
|
{
|
||||||
|
name = 'Launch file',
|
||||||
|
type = 'codelldb',
|
||||||
|
request = 'launch',
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
end,
|
||||||
|
args = function()
|
||||||
|
return require('custom.utils').tokenize_args(vim.fn.input 'args: ')
|
||||||
|
end,
|
||||||
|
cwd = '${workspaceFolder}',
|
||||||
|
-- FIXME: perhaps we can put the stdio somewhere more practical
|
||||||
|
stopOnEntry = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
dap.configurations.c = dap.configurations.cpp
|
||||||
|
dap.configurations.rust = dap.configurations.cpp
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'rcarriga/nvim-dap-ui',
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
'<leader>du',
|
||||||
|
function()
|
||||||
|
require('dapui').toggle()
|
||||||
|
end,
|
||||||
|
|
||||||
|
desc = 'Open [D]ebug [U]i',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>dK',
|
||||||
|
function()
|
||||||
|
require('dap.ui.widgets').hover()
|
||||||
|
end,
|
||||||
|
|
||||||
|
desc = 'Open [D]ebug [K] hover',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>du',
|
||||||
|
function()
|
||||||
|
require('dapui').toggle()
|
||||||
|
end,
|
||||||
|
|
||||||
|
desc = 'Open [D]ebug [U]i',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>dws',
|
||||||
|
function()
|
||||||
|
local widgets = require 'dap.ui.widgets'
|
||||||
|
local my_sidebar = widgets.sidebar(widgets.scopes)
|
||||||
|
my_sidebar.open()
|
||||||
|
end,
|
||||||
|
desc = 'Open [D]ebug [W]indow [S]copes',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>dwf',
|
||||||
|
function()
|
||||||
|
local widgets = require 'dap.ui.widgets'
|
||||||
|
local my_sidebar = widgets.sidebar(widgets.frames)
|
||||||
|
my_sidebar.open()
|
||||||
|
end,
|
||||||
|
|
||||||
|
desc = 'Open [D]ebug [W]indow [F]rames',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>dwi',
|
||||||
|
function()
|
||||||
|
local widgets = require 'dap.ui.widgets'
|
||||||
|
local my_sidebar = widgets.sidebar(widgets.sessions)
|
||||||
|
my_sidebar.open()
|
||||||
|
end,
|
||||||
|
desc = 'Open [D]ebug [W]indow sess[I]ons',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>dwt',
|
||||||
|
function()
|
||||||
|
local widgets = require 'dap.ui.widgets'
|
||||||
|
local my_sidebar = widgets.sidebar(widgets.threads)
|
||||||
|
my_sidebar.open()
|
||||||
|
end,
|
||||||
|
desc = 'Open [D]ebug [W]indow [T]hreads',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<leader>dwe',
|
||||||
|
function()
|
||||||
|
local widgets = require 'dap.ui.widgets'
|
||||||
|
local my_sidebar = widgets.sidebar(widgets.expression)
|
||||||
|
my_sidebar.open()
|
||||||
|
end,
|
||||||
|
|
||||||
|
desc = 'Open [D]ebug [W]indow [E]xpression',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
'nvim-neotest/nvim-nio',
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local dap = require 'dap'
|
||||||
|
local dapui = require 'dapui'
|
||||||
|
dapui.setup(opts)
|
||||||
|
dap.listeners.after.event_initialized['dapui_config'] = function()
|
||||||
|
dapui.open {}
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_terminated['dapui_config'] = function()
|
||||||
|
-- dapui.close {}
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_exited['dapui_config'] = function()
|
||||||
|
-- dapui.close {}
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'folke/lazydev.nvim',
|
'folke/lazydev.nvim',
|
||||||
ft = 'lua', -- only load on lua files
|
ft = 'lua', -- only load on lua files
|
||||||
|
@ -326,34 +497,47 @@ return {
|
||||||
},
|
},
|
||||||
{ 'Bilal2453/luvit-meta', lazy = true }, -- optional `vim.uv` typings
|
{ 'Bilal2453/luvit-meta', lazy = true }, -- optional `vim.uv` typings
|
||||||
{
|
{
|
||||||
'nvimtools/none-ls.nvim',
|
'mrcjkb/rustaceanvim',
|
||||||
|
enabled = false,
|
||||||
|
version = '^4', -- Recommended
|
||||||
|
ft = { 'rust' },
|
||||||
config = function()
|
config = function()
|
||||||
local null_ls = require 'null-ls'
|
local dap = require 'dap'
|
||||||
|
vim.g.rustaceanvim = {
|
||||||
null_ls.setup {
|
enable_clippy = true,
|
||||||
sources = {
|
-- Plugin configuration
|
||||||
null_ls.builtins.formatting.stylua,
|
tools = {
|
||||||
null_ls.builtins.formatting.gdformat,
|
enable_clippy = true,
|
||||||
null_ls.builtins.diagnostics.gdlint,
|
},
|
||||||
|
-- LSP configuration
|
||||||
|
server = {
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
-- you can also put keymaps in here
|
||||||
|
end,
|
||||||
|
settings = {
|
||||||
|
-- rust-analyzer language server configuration
|
||||||
|
['rust-analyzer'] = {
|
||||||
|
cargo = {
|
||||||
|
features = 'all',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- DAP configuration
|
||||||
|
dap = {
|
||||||
|
-- FIXME: the rustaceanvim debug config does not map the stdout/stderr to the
|
||||||
|
-- opened terminal, effectively rendering debugging with it useless. Luckily,
|
||||||
|
-- we can use the regular nvim-dap and nvim-dap-ui.
|
||||||
|
adapter = dap.adapters.codelldb,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'chomosuke/typst-preview.nvim',
|
'theHamsta/nvim-dap-virtual-text',
|
||||||
ft = 'typst',
|
lazy = false, -- PERF: this can be done more elegant
|
||||||
version = '1.*',
|
config = function()
|
||||||
opts = {
|
require('nvim-dap-virtual-text').setup()
|
||||||
dependencies_bin = { ['tinymist'] = 'tinymist' }, -- use mason
|
end,
|
||||||
}, -- lazy.nvim will implicitly calls `setup {}`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'hedyhli/outline.nvim',
|
|
||||||
lazy = true,
|
|
||||||
cmd = { 'Outline', 'OutlineOpen' },
|
|
||||||
keys = { -- Example mapping to toggle outline
|
|
||||||
{ '<leader>to', '<cmd>Outline<CR>', desc = 'Toggle outline' },
|
|
||||||
},
|
|
||||||
opts = {},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,100 +0,0 @@
|
||||||
local utils = require 'custom.utils'
|
|
||||||
|
|
||||||
local ltex_fts = {
|
|
||||||
'bibtex',
|
|
||||||
'bib',
|
|
||||||
'tex',
|
|
||||||
'typst',
|
|
||||||
'latex',
|
|
||||||
'gitcommit',
|
|
||||||
'markdown',
|
|
||||||
'org',
|
|
||||||
'restructuredtext',
|
|
||||||
'rsweave',
|
|
||||||
'quarto',
|
|
||||||
'rmd',
|
|
||||||
'context',
|
|
||||||
'text',
|
|
||||||
'html',
|
|
||||||
'pandoc',
|
|
||||||
'xhtml',
|
|
||||||
'plaintex',
|
|
||||||
'quarto',
|
|
||||||
'mail',
|
|
||||||
'mdx',
|
|
||||||
'rmd',
|
|
||||||
'rnoweb',
|
|
||||||
'rst',
|
|
||||||
}
|
|
||||||
|
|
||||||
local map = function(keys, func, desc)
|
|
||||||
vim.keymap.set('n', keys, func, { buffer = vim.buf, desc = 'LSP[LTEX]: ' .. desc })
|
|
||||||
end
|
|
||||||
|
|
||||||
LTEX_SETTINGS = {
|
|
||||||
capabilities = CAPABILITIES,
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
DEFAULT_ON_ATTACH(client, bufnr)
|
|
||||||
end,
|
|
||||||
autostart = false,
|
|
||||||
filetypes = ltex_fts,
|
|
||||||
settings = {
|
|
||||||
ltex = {
|
|
||||||
checkFrequency = 'save', -- shut up while i'm just editing, see <https://github.com/folke/noice.nvim/issues/166>
|
|
||||||
-- specific language (such as en-GB or de-DE is recommended, but I
|
|
||||||
-- want multilingual)
|
|
||||||
language = 'auto',
|
|
||||||
enabled = ltex_fts,
|
|
||||||
additionalRules = {
|
|
||||||
enablePickyRules = true,
|
|
||||||
-- thats cool, but often adds diagnostics in
|
|
||||||
-- places where a german might confuse words that are similar
|
|
||||||
-- between english and german REGARDLESS of context. I seem to use the
|
|
||||||
-- english words only in the proper contexts, so leaving this on
|
|
||||||
-- just adds annoying hints like 'Hinweis: "list/NN.*" (English) bedeutet "Liste",
|
|
||||||
-- "Verzeichnis" (German). Meinten Sie vielleicht 'cunning', 'trick'?'
|
|
||||||
-- everytime I use the word "list". I liked that this makes the hints be
|
|
||||||
-- in german regardless of the language I'm working in through...
|
|
||||||
motherTongue = 'de',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- load token and additional languagetool items later if specified
|
|
||||||
local do_not_use_api_key = true
|
|
||||||
local has_api_key, apiKey = utils.try_require 'custom.secret.languagetool'
|
|
||||||
if not do_not_use_api_key and has_api_key and apiKey ~= '' then
|
|
||||||
LTEX_SETTINGS = vim.tbl_deep_extend('keep', LTEX_SETTINGS, {
|
|
||||||
settings = {
|
|
||||||
languageToolOrg = {
|
|
||||||
apiKey = apiKey,
|
|
||||||
username = 'accounts@cscherr.de',
|
|
||||||
},
|
|
||||||
languageToolHttpServerUrl = 'https://api.languagetoolplus.com/',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
else
|
|
||||||
if not do_not_use_api_key then
|
|
||||||
print 'apiKey for ltex/languagetool is not specified'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
'barreiroleo/ltex_extra.nvim',
|
|
||||||
ft = ltex_fts,
|
|
||||||
dependencies = { 'neovim/nvim-lspconfig' },
|
|
||||||
config = function()
|
|
||||||
require('ltex_extra').setup {
|
|
||||||
load_langs = { 'en-US', 'de-DE' },
|
|
||||||
init_check = true,
|
|
||||||
server_opts = LTEX_SETTINGS, -- or use lspconfig regularly
|
|
||||||
}
|
|
||||||
map('<leader>tS', function()
|
|
||||||
vim.cmd 'set spell'
|
|
||||||
vim.opt.spelllang = 'en,de_de'
|
|
||||||
vim.opt.spellsuggest = 'double,50,timeout:5000'
|
|
||||||
vim.cmd 'LspStart ltex'
|
|
||||||
end, 'Enable spell checking with languagetool')
|
|
||||||
end,
|
|
||||||
}
|
|
|
@ -22,7 +22,6 @@ return {
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||||
{ 'echasnovski/mini.icons', version = '*' },
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
||||||
|
@ -81,20 +80,20 @@ return {
|
||||||
|
|
||||||
-- See `:help telescope.builtin`
|
-- See `:help telescope.builtin`
|
||||||
local builtin = require 'telescope.builtin'
|
local builtin = require 'telescope.builtin'
|
||||||
vim.keymap.set('n', '<localleader>fh', builtin.help_tags, { desc = '[H]elp' })
|
vim.keymap.set('n', '<localleader>fh', builtin.help_tags, { desc = '[F]ind [H]elp' })
|
||||||
vim.keymap.set('n', '<localleader>fk', builtin.keymaps, { desc = '[K]eymaps' })
|
vim.keymap.set('n', '<localleader>fk', builtin.keymaps, { desc = '[F]ind [K]eymaps' })
|
||||||
vim.keymap.set('n', '<localleader>ff', builtin.find_files, { desc = '[F]iles' })
|
vim.keymap.set('n', '<localleader>ff', builtin.find_files, { desc = '[F]ind [F]iles' })
|
||||||
vim.keymap.set('n', '<localleader>fgf', builtin.git_files, { desc = '[G]it [F]iles' })
|
vim.keymap.set('n', '<localleader>ft', builtin.builtin, { desc = '[F]ind [T]elescope' })
|
||||||
vim.keymap.set('n', '<localleader>fe', builtin.builtin, { desc = 't[E]lescope' })
|
vim.keymap.set('n', '<localleader>fw', builtin.live_grep, { desc = '[F]ind a [W]ord interactively' })
|
||||||
vim.keymap.set('n', '<localleader>fw', builtin.live_grep, { desc = 'a [W]ord interactively' })
|
vim.keymap.set('n', '<localleader>fcw', builtin.grep_string, { desc = '[F]ind [C]urrent [W]ord' })
|
||||||
vim.keymap.set('n', '<localleader>fcw', builtin.grep_string, { desc = '[C]urrent [W]ord' })
|
vim.keymap.set('n', '<localleader>fd', builtin.diagnostics, { desc = '[F]ind [D]iagnostics' })
|
||||||
vim.keymap.set('n', '<localleader>fr', builtin.resume, { desc = '[R]esume' })
|
vim.keymap.set('n', '<localleader>fr', builtin.resume, { desc = '[F]ind [R]esume' })
|
||||||
vim.keymap.set('n', '<localleader>fo', builtin.oldfiles, { desc = '[O]ld Files ("." for repeat)' })
|
vim.keymap.set('n', '<localleader>fof.', builtin.oldfiles, { desc = '[F]ind [O]ld Files ("." for repeat)' })
|
||||||
vim.keymap.set('n', '<localleader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
vim.keymap.set('n', '<localleader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||||
vim.keymap.set('n', '<localleader>fb', builtin.buffers, { desc = 'existing [B]uffers' })
|
vim.keymap.set('n', '<localleader>fb', builtin.buffers, { desc = '[F]ind existing [B]uffers' })
|
||||||
vim.keymap.set('n', '<localleader>fm', builtin.marks, { desc = 'book[M]arks' })
|
vim.keymap.set('n', '<localleader>fm', builtin.marks, { desc = '[F]ind book[M]arks' })
|
||||||
vim.keymap.set('n', '<localleader>fd', builtin.diagnostics, { desc = '[D]iagnostigs' })
|
vim.keymap.set('n', '<localleader>fd', builtin.diagnostics, { desc = '[F]ind LSP [D]iagnostigs' })
|
||||||
vim.keymap.set('n', '<localleader>fs', builtin.lsp_dynamic_workspace_symbols, { desc = 'LSP [S]ymbols' })
|
vim.keymap.set('n', '<localleader>fs', builtin.lsp_dynamic_workspace_symbols, { desc = '[F]ind LSP [S]ymbols' })
|
||||||
|
|
||||||
-- spelling
|
-- spelling
|
||||||
vim.keymap.set('n', 'z<space>', builtin.spell_suggest, { desc = '[F]ind spelling' })
|
vim.keymap.set('n', 'z<space>', builtin.spell_suggest, { desc = '[F]ind spelling' })
|
||||||
|
@ -119,7 +118,7 @@ return {
|
||||||
end, { desc = '[F]ind [/] in Open Files' })
|
end, { desc = '[F]ind [/] in Open Files' })
|
||||||
|
|
||||||
-- Shortcut for searching your Neovim configuration files
|
-- Shortcut for searching your Neovim configuration files
|
||||||
vim.keymap.set('n', '<localleader>fnf', function()
|
vim.keymap.set('n', '<leader>fnf', function()
|
||||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||||
end, { desc = '[F]ind [N]eovim [F]iles' })
|
end, { desc = '[F]ind [N]eovim [F]iles' })
|
||||||
end,
|
end,
|
||||||
|
@ -128,7 +127,6 @@ return {
|
||||||
'jvgrootveld/telescope-zoxide',
|
'jvgrootveld/telescope-zoxide',
|
||||||
dependencies = 'nvim-telescope/telescope.nvim',
|
dependencies = 'nvim-telescope/telescope.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
vim.keymap.set('n', '<localleader>cd', '<cmd> Telescope zoxide list<cr>', { desc = '[C]hange [D]irectory' })
|
|
||||||
-- Useful for easily creating commands
|
-- Useful for easily creating commands
|
||||||
local z_utils = require 'telescope._extensions.zoxide.utils'
|
local z_utils = require 'telescope._extensions.zoxide.utils'
|
||||||
|
|
||||||
|
@ -136,7 +134,7 @@ return {
|
||||||
-- (other Telescope configuration...)
|
-- (other Telescope configuration...)
|
||||||
extensions = {
|
extensions = {
|
||||||
zoxide = {
|
zoxide = {
|
||||||
prompt_title = '[ Recently visited directories (zoxide) ]',
|
prompt_title = '[ Walking on the shoulders of TJ ]',
|
||||||
mappings = {
|
mappings = {
|
||||||
default = {
|
default = {
|
||||||
after_action = function(selection)
|
after_action = function(selection)
|
||||||
|
|
|
@ -1,151 +0,0 @@
|
||||||
the_themes = {
|
|
||||||
-- Dark Themes
|
|
||||||
{
|
|
||||||
name = '==========Dark Themes==========',
|
|
||||||
colorscheme = '', -- this actually keeps the selected theme, but it wont work with persistence
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'nvim default',
|
|
||||||
colorscheme = 'default',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'nvim lunaperche',
|
|
||||||
colorscheme = 'lunaperche',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'nvim quiet',
|
|
||||||
colorscheme = 'quiet',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'nvim retrobox',
|
|
||||||
colorscheme = 'retrobox',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'nvim slate',
|
|
||||||
colorscheme = 'slate',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'nvim vim',
|
|
||||||
colorscheme = 'vim',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'tokyonight',
|
|
||||||
colorscheme = 'tokyonight',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'tokyonight-moon',
|
|
||||||
colorscheme = 'tokyonight-moon',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'tokyonight-storm',
|
|
||||||
colorscheme = 'tokyonight-storm',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'kanagawa',
|
|
||||||
colorscheme = 'kanagawa',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'kanagawa-dragon',
|
|
||||||
colorscheme = 'kanagawa-dragon',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'kanagawa-wave',
|
|
||||||
colorscheme = 'kanagawa-wave',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'zenbones',
|
|
||||||
colorscheme = 'zenbones',
|
|
||||||
before = [[
|
|
||||||
-- It's a major hack from the themery guys that this is a string
|
|
||||||
vim.opt.background = "dark"
|
|
||||||
]],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'tokyobones',
|
|
||||||
colorscheme = 'tokyobones',
|
|
||||||
before = [[
|
|
||||||
-- It's a major hack from the themery guys that this is a string
|
|
||||||
vim.opt.background = "dark"
|
|
||||||
]],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'kanagawabones',
|
|
||||||
colorscheme = 'kanagawabones',
|
|
||||||
before = [[
|
|
||||||
-- It's a major hack from the themery guys that this is a string
|
|
||||||
vim.opt.background = "dark"
|
|
||||||
]],
|
|
||||||
},
|
|
||||||
'catppuccin-frappe',
|
|
||||||
'catppuccin-macchiato',
|
|
||||||
'catppuccin-mocha',
|
|
||||||
'rose-pine-main',
|
|
||||||
'rose-pine-moon',
|
|
||||||
'cyberdream',
|
|
||||||
-- Light themes
|
|
||||||
{
|
|
||||||
name = '==========Light Themes==========',
|
|
||||||
colorscheme = '', -- this actually keeps the selected theme, but it wont work with persistence
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'tokyonight-day',
|
|
||||||
colorscheme = 'tokyonight-day',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'kanagawa-lotus',
|
|
||||||
colorscheme = 'kanagawa-lotus',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'zenbones',
|
|
||||||
colorscheme = 'zenbones',
|
|
||||||
before = [[
|
|
||||||
-- It's a major hack from the themery guys that this is a string
|
|
||||||
vim.opt.background = "light"
|
|
||||||
]],
|
|
||||||
},
|
|
||||||
'catppuccin-latte',
|
|
||||||
'rose-pine-dawn',
|
|
||||||
'cyberdream-light',
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
'zaldih/themery.nvim',
|
|
||||||
lazy = false,
|
|
||||||
cmd = 'Themery',
|
|
||||||
keys = {
|
|
||||||
{ ';ft', '<cmd> Themery <cr>', desc = '[F]ind [T]heme' },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('themery').setup {
|
|
||||||
themes = the_themes,
|
|
||||||
livePreview = true, -- Apply theme while browsing. Default to true.
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
'folke/tokyonight.nvim',
|
|
||||||
'rebelot/kanagawa.nvim',
|
|
||||||
{ 'zenbones-theme/zenbones.nvim', dependencies = { 'rktjmp/lush.nvim' } },
|
|
||||||
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
|
|
||||||
{ 'rose-pine/neovim', name = 'rose-pine' },
|
|
||||||
{
|
|
||||||
'scottmckendry/cyberdream.nvim',
|
|
||||||
setup = function()
|
|
||||||
require('cyberdream').setup {
|
|
||||||
-- Enable transparent background
|
|
||||||
transparent = true,
|
|
||||||
italic_comments = false,
|
|
||||||
-- Replace all fillchars with ' ' for the ultimate clean look
|
|
||||||
hide_fillchars = false,
|
|
||||||
borderless_pickers = true,
|
|
||||||
terminal_colors = true,
|
|
||||||
cache = true,
|
|
||||||
extensions = {
|
|
||||||
telescope = true,
|
|
||||||
notify = true,
|
|
||||||
mini = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
'kdheepak/lazygit.nvim',
|
|
||||||
keys = {
|
|
||||||
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'Open LazyGit' },
|
|
||||||
},
|
|
||||||
cmd = 'LazyGit',
|
|
||||||
-- optional for floating window border decoration
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- This was made by a frontend dev
|
|
||||||
-- I need to manually:
|
|
||||||
-- ```bash
|
|
||||||
-- cd ~/.local/share/nvim/lazy/markdown-preview.nvim
|
|
||||||
-- npm install
|
|
||||||
-- ```
|
|
||||||
-- See https://github.com/iamcco/markdown-preview.nvim/issues/695
|
|
||||||
--
|
|
||||||
-- Code smell but it works
|
|
||||||
{
|
|
||||||
'iamcco/markdown-preview.nvim',
|
|
||||||
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
|
||||||
build = 'cd ~/.local/share/nvim/lazy/markdown-preview.nvim && npm install',
|
|
||||||
init = function()
|
|
||||||
vim.g.mkdp_filetypes = { 'markdown' }
|
|
||||||
end,
|
|
||||||
ft = { 'markdown' },
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,19 +1,3 @@
|
||||||
local custom_headers = {
|
|
||||||
sharp = {
|
|
||||||
[[ ]],
|
|
||||||
[[ █ ████████ █████ ███████ ████ ]],
|
|
||||||
[[ ███ ██████ █████ █████████ ██████ ]],
|
|
||||||
[[ █████ ██████████████████████ ████ ███████████████ ]],
|
|
||||||
[[ ██ ██ █████ █████████████ ████ ████████████████ ]],
|
|
||||||
[[ ████ ███████████████ █████████ ████ █████ ██████ ████ ]],
|
|
||||||
[[ ██████ ██████ ███ █████████ ████ █████ █████ ████ ]],
|
|
||||||
[[ ████████ ███████████████████ ████ ████ █████ ████ ████ ]],
|
|
||||||
[[ ]],
|
|
||||||
[[ 🛠️ Sharp tools make good work 🖥️ ]],
|
|
||||||
[[ ]],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'nvim-tree/nvim-tree.lua',
|
'nvim-tree/nvim-tree.lua',
|
||||||
|
@ -100,34 +84,16 @@ return {
|
||||||
keys = {
|
keys = {
|
||||||
{ '<F5>', '<cmd> NvimTreeToggle <cr>', desc = '[T]oggle [F]ile explorer' },
|
{ '<F5>', '<cmd> NvimTreeToggle <cr>', desc = '[T]oggle [F]ile explorer' },
|
||||||
{ '<leader>tf', '<cmd> NvimTreeToggle <cr>', desc = '[T]oggle [F]ile explorer' },
|
{ '<leader>tf', '<cmd> NvimTreeToggle <cr>', desc = '[T]oggle [F]ile explorer' },
|
||||||
{ '<leader>fr', '<cmd> NvimTreeRefresh <cr>', desc = '[F]iles [R]efresh' },
|
|
||||||
-- TODO: better map for cd
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'ggandor/leap.nvim',
|
'ggandor/leap.nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
opts = {},
|
|
||||||
keys = {
|
keys = {
|
||||||
{ 's', '<plug>(leap-forward)', desc = 'leap forward' },
|
{ 's', '<plug>(leap-forward)', desc = 'leap forward' },
|
||||||
{ 'S', '<plug>(leap-backward)', desc = 'leap backward' },
|
{ 'S', '<plug>(leap-backward)', desc = 'leap backward' },
|
||||||
{ 'gs', '<plug>(leap-from-window)', desc = 'leap from window' },
|
{ 'gs', '<plug>(leap-from-window)', desc = 'leap from window' },
|
||||||
},
|
},
|
||||||
config = function()
|
|
||||||
-- idk why it doesn't work when I just define an opts table, but that is
|
|
||||||
-- so
|
|
||||||
|
|
||||||
local leap = require 'leap'
|
|
||||||
|
|
||||||
leap.opts.safe_labels = 'asfghjkliztrewb'
|
|
||||||
leap.opts.labels = 'sfnjklhodweimbuyvrgtaqpcxz'
|
|
||||||
leap.opts.special_keys = {
|
|
||||||
next_target = '<enter>',
|
|
||||||
prev_target = '<tab>',
|
|
||||||
next_group = '<space>',
|
|
||||||
prev_group = '<tab>',
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'ggandor/flit.nvim',
|
'ggandor/flit.nvim',
|
||||||
|
@ -144,10 +110,35 @@ return {
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ 'echasnovski/mini.trailspace', lazy = false, version = false, opts = { only_in_normal_buffers = true } },
|
{
|
||||||
|
'kdheepak/lazygit.nvim',
|
||||||
|
keys = {
|
||||||
|
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'Open LazyGit' },
|
||||||
|
},
|
||||||
|
cmd = 'LazyGit',
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
keys = { '<leader>', '<localleader>', '<c-r>', '<c-w>', '"', "'", '`', 'c', 'v', 'g' },
|
||||||
|
defaults = {
|
||||||
|
mode = { 'n', 'v' },
|
||||||
|
[';'] = { name = '+telescope' },
|
||||||
|
[';f'] = { name = '+find' },
|
||||||
|
['g'] = { name = '+goto' },
|
||||||
|
[']'] = { name = '+next' },
|
||||||
|
['['] = { name = '+prev' },
|
||||||
|
['<leader>d'] = { name = '+lsp/debug' },
|
||||||
|
['<leader>r'] = { name = '+diagnostics/quickfix' },
|
||||||
|
['<leader>c'] = { name = '+code' },
|
||||||
|
['<leader>g'] = { name = '+git' },
|
||||||
|
['<leader>t'] = { name = '+toggle/tools' },
|
||||||
|
['<leader>w'] = { name = '+window/which' },
|
||||||
|
['<leader>f'] = { name = '+formatting' },
|
||||||
|
},
|
||||||
opts = {
|
opts = {
|
||||||
triggers_nowait = {
|
triggers_nowait = {
|
||||||
-- marks
|
-- marks
|
||||||
|
@ -170,62 +161,13 @@ return {
|
||||||
v = { 'j', 'k' },
|
v = { 'j', 'k' },
|
||||||
n = { 'o', 'O' },
|
n = { 'o', 'O' },
|
||||||
},
|
},
|
||||||
-- plugins = {
|
|
||||||
-- marks = true, -- shows a list of your marks on ' and `
|
|
||||||
-- registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
|
||||||
-- -- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
|
||||||
-- -- No actual key bindings are created
|
|
||||||
-- spelling = {
|
|
||||||
-- enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
|
||||||
-- suggestions = 20, -- how many suggestions should be shown in the list?
|
|
||||||
-- },
|
|
||||||
-- presets = {
|
|
||||||
-- operators = true, -- adds help for operators like d, y, ...
|
|
||||||
-- motions = true, -- adds help for motions
|
|
||||||
-- text_objects = true, -- help for text objects triggered after entering an operator
|
|
||||||
-- windows = true, -- default bindings on <c-w>
|
|
||||||
-- nav = true, -- misc bindings to work with windows
|
|
||||||
-- z = true, -- bindings for folds, spelling and others prefixed with z
|
|
||||||
-- g = true, -- bindings for prefixed with g
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
icons = {
|
|
||||||
breadcrumb = '»', -- symbol used in the command line area that shows your active key combo
|
|
||||||
separator = '➜', -- symbol used between a key and it's label
|
|
||||||
group = '+', -- symbol prepended to a group
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(opts)
|
|
||||||
local wk = require 'which-key'
|
|
||||||
local defaults = {
|
|
||||||
mode = { 'n', 'v' },
|
|
||||||
{ '<leader>c', group = '[C]ode/[C]olor' },
|
|
||||||
{ '<leader>ct', group = '[T]rouble' },
|
|
||||||
{ '<leader>d', group = '[D]ebug' },
|
|
||||||
{ '<leader>dc', group = '[C]hange' },
|
|
||||||
{ '<leader>dw', group = '[W]indow' },
|
|
||||||
{ '<leader>f', group = '[F]ormatting' },
|
|
||||||
{ '<leader>g', group = '[G]ood tools' },
|
|
||||||
{ '<leader>r', group = '[R]ename' },
|
|
||||||
{ '<leader>t', group = '[T]oggle' },
|
|
||||||
{ '<leader>w', group = '[W]orkspace' },
|
|
||||||
{ '<leader>wb', group = 'buffer' },
|
|
||||||
{ '<localleader>', group = 'select' },
|
|
||||||
{ '<localleader>f', group = '[F]ind' },
|
|
||||||
{ '[', group = 'prev' },
|
|
||||||
{ ']', group = 'next' },
|
|
||||||
{ 'g', group = 'goto' },
|
|
||||||
}
|
|
||||||
wk.add(defaults, opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'echasnovski/mini.trailspace',
|
'echasnovski/mini.trailspace',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
event = { 'BufReadPost', 'BufNewFile' },
|
event = { 'BufReadPost', 'BufNewFile' },
|
||||||
opts = {
|
opts = {},
|
||||||
only_in_normal_buffers = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'itchyny/vim-cursorword',
|
'itchyny/vim-cursorword',
|
||||||
|
@ -272,20 +214,35 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
|
'folke/which-key.nvim',
|
||||||
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
|
config = function() -- This is the function that runs, AFTER loading
|
||||||
|
require('which-key').setup()
|
||||||
|
|
||||||
|
-- Document existing key chains
|
||||||
|
require('which-key').register {
|
||||||
|
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
||||||
|
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||||
|
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||||
|
['<localleader>f'] = { name = '[F]ind', _ = 'which_key_ignore' },
|
||||||
|
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||||
|
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||||
|
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
||||||
|
}
|
||||||
|
-- visual mode
|
||||||
|
require('which-key').register({
|
||||||
|
['<leader>h'] = { 'Git [H]unk' },
|
||||||
|
}, { mode = 'v' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'RRethy/vim-illuminate',
|
'RRethy/vim-illuminate',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
event = { 'BufReadPost', 'BufNewFile' },
|
event = { 'BufReadPost', 'BufNewFile' },
|
||||||
opts = {
|
opts = {
|
||||||
-- providers: provider used to get references in the buffer, ordered by priority
|
|
||||||
providers = {
|
|
||||||
'lsp', -- useless for tex but still used
|
|
||||||
'treesitter',
|
|
||||||
'regex',
|
|
||||||
},
|
|
||||||
large_file_cutoff = 50000,
|
|
||||||
delay = 200,
|
delay = 200,
|
||||||
under_cursor = true,
|
under_cursor = false,
|
||||||
modes_allowlist = { 'n', 'no', 'nt' },
|
modes_allowlist = { 'n', 'no', 'nt' },
|
||||||
filetypes_denylist = {
|
filetypes_denylist = {
|
||||||
'DiffviewFileHistory',
|
'DiffviewFileHistory',
|
||||||
|
@ -295,36 +252,36 @@ return {
|
||||||
'git',
|
'git',
|
||||||
'minifiles',
|
'minifiles',
|
||||||
'neo-tree',
|
'neo-tree',
|
||||||
'NvimTree_1',
|
|
||||||
'dashboard',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- looks weird but is useful: put your cursor on a word and other occurences
|
|
||||||
-- of the word in your buffer will be highlighted. You can then use
|
|
||||||
-- '[[' and ']]' to go to the next or previous occurence.
|
|
||||||
--
|
|
||||||
-- Try it:
|
|
||||||
--
|
|
||||||
-- word #### word ###########
|
|
||||||
-- ############## word ######
|
|
||||||
-- #### word #### word word #
|
|
||||||
--
|
|
||||||
-- (Does only work if the regex source is currently active, otherwise the
|
|
||||||
-- references are those your language server or treesitter gives out, so
|
|
||||||
-- syntax aware)
|
|
||||||
keys = {
|
keys = {
|
||||||
{ ']]', desc = 'Next Reference' },
|
{ ']]', desc = 'Next Reference' },
|
||||||
{ '[[', desc = 'Prev Reference' },
|
{ '[[', desc = 'Prev Reference' },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local illuminate = require 'illuminate'
|
require('illuminate').configure(opts)
|
||||||
illuminate.configure(opts)
|
|
||||||
vim.keymap.set('n', '[[', function()
|
local function map(key, dir, buffer)
|
||||||
illuminate.goto_prev_reference() -- try putting your cursor on `illuminate`
|
vim.keymap.set('n', key, function()
|
||||||
end, { desc = 'Goto last occurence of current word' })
|
require('illuminate')['goto_' .. dir .. '_reference'](false)
|
||||||
vim.keymap.set('n', ']]', function()
|
end, {
|
||||||
illuminate.goto_next_reference()
|
desc = dir:sub(1, 1):upper() .. dir:sub(2) .. ' Reference',
|
||||||
end, { desc = 'Goto next occurence of current word' })
|
buffer = buffer,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
map(']]', 'next')
|
||||||
|
map('[[', 'prev')
|
||||||
|
|
||||||
|
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
|
||||||
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
group = vim.api.nvim_create_augroup('plex_illuminate', {}),
|
||||||
|
callback = function()
|
||||||
|
local buffer = vim.api.nvim_get_current_buf()
|
||||||
|
map(']]', 'next', buffer)
|
||||||
|
map('[[', 'prev', buffer)
|
||||||
|
end,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -335,7 +292,9 @@ return {
|
||||||
keys = {
|
keys = {
|
||||||
{ ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' },
|
{ ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' },
|
||||||
{ '[t', function() require('todo-comments').jump_prev() end, desc = 'Previous todo comment' },
|
{ '[t', function() require('todo-comments').jump_prev() end, desc = 'Previous todo comment' },
|
||||||
{ '<LocalLeader>fT', '<cmd>TodoTelescope<CR>', desc = 'todo' },
|
{ '<LocalLeader>dt', '<cmd>TodoTelescope<CR>', desc = 'todo' },
|
||||||
|
{ '<leader>xt', '<cmd>TodoTrouble<CR>', desc = 'Todo (Trouble)' },
|
||||||
|
{ '<leader>xT', '<cmd>TodoTrouble keywords=TODO,FIX,FIXME<cr>', desc = 'Todo/Fix/Fixme (Trouble)' },
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
signs = true,
|
signs = true,
|
||||||
|
@ -350,7 +309,7 @@ return {
|
||||||
SECURITY = { icon = ' ', color = 'security' },
|
SECURITY = { icon = ' ', color = 'security' },
|
||||||
WARN = { icon = ' ', color = 'warning', alt = { 'WARNING', 'XXX' } },
|
WARN = { icon = ' ', color = 'warning', alt = { 'WARNING', 'XXX' } },
|
||||||
PERF = { icon = ' ', color = 'perf', alt = { 'OPTIM', 'PERFORMANCE', 'OPTIMIZE' } },
|
PERF = { icon = ' ', color = 'perf', alt = { 'OPTIM', 'PERFORMANCE', 'OPTIMIZE' } },
|
||||||
NOTE = { icon = ' ', color = 'hint', alt = { 'INFO', 'IDEA' } },
|
NOTE = { icon = ' ', color = 'hint', alt = { 'INFO' } },
|
||||||
TEST = { icon = '⏲ ', color = 'test', alt = { 'TESTING', 'PASSED', 'FAILED' } },
|
TEST = { icon = '⏲ ', color = 'test', alt = { 'TESTING', 'PASSED', 'FAILED' } },
|
||||||
},
|
},
|
||||||
colors = {
|
colors = {
|
||||||
|
@ -392,6 +351,23 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ -- You can easily change to a different colorscheme.
|
||||||
|
-- Change the name of the colorscheme plugin below, and then
|
||||||
|
-- change the command in the config to whatever the name of that colorscheme is.
|
||||||
|
--
|
||||||
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
|
'folke/tokyonight.nvim',
|
||||||
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
|
init = function()
|
||||||
|
-- Load the colorscheme here.
|
||||||
|
-- Like many other themes, this one has different styles, and you could load
|
||||||
|
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||||
|
vim.cmd.colorscheme 'tokyonight-night'
|
||||||
|
|
||||||
|
-- You can configure highlights by doing something like:
|
||||||
|
vim.cmd.hi 'Comment gui=none'
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'folke/noice.nvim',
|
'folke/noice.nvim',
|
||||||
enabled = not vim.g.started_by_firenvim,
|
enabled = not vim.g.started_by_firenvim,
|
||||||
|
@ -545,8 +521,7 @@ return {
|
||||||
local label = {}
|
local label = {}
|
||||||
|
|
||||||
for severity, icon in pairs(icons) do
|
for severity, icon in pairs(icons) do
|
||||||
local n = #vim.diagnostic.get(props.buf,
|
local n = #vim.diagnostic.get(props.buf, { severity = vim.diagnostic.severity[string.upper(severity)] })
|
||||||
{ severity = vim.diagnostic.severity[string.upper(severity)] })
|
|
||||||
if n > 0 then
|
if n > 0 then
|
||||||
table.insert(label, { icon .. ' ' .. n .. ' ', group = 'DiagnosticSign' .. severity })
|
table.insert(label, { icon .. ' ' .. n .. ' ', group = 'DiagnosticSign' .. severity })
|
||||||
end
|
end
|
||||||
|
@ -590,107 +565,30 @@ return {
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'iamcco/markdown-preview.nvim',
|
||||||
|
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
|
||||||
|
ft = { 'markdown' },
|
||||||
|
build = function()
|
||||||
|
vim.fn['mkdp#util#install']()
|
||||||
|
end,
|
||||||
|
config = function()
|
||||||
|
-- Ugly fix for wsl not finding my browser
|
||||||
|
-- I HATE windows
|
||||||
|
vim.g.mkdp_echo_preview_url = 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-tree/nvim-web-devicons',
|
'nvim-tree/nvim-web-devicons',
|
||||||
'yavorski/lualine-macro-recording.nvim',
|
'NvChad/ui', -- load after nvchad ui
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require('lualine').setup {
|
-- TODO: add lsp module for lualine
|
||||||
options = {
|
-- Maybe we can steal modules from the nvchad ui
|
||||||
theme = 'horizon',
|
require('lualine').setup()
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = { 'mode' },
|
|
||||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
|
||||||
lualine_c = { { 'macro_recording', color = { fg = '#ff9e3b' } }, 'filename', 'locatoin' },
|
|
||||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
|
||||||
lualine_y = { 'progress' },
|
|
||||||
lualine_z = { 'location' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'akinsho/bufferline.nvim',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-tree/nvim-web-devicons',
|
|
||||||
{
|
|
||||||
'tiagovla/scope.nvim',
|
|
||||||
config = function()
|
|
||||||
require('scope').setup {}
|
|
||||||
require('telescope').load_extension 'scope'
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
require('bufferline').setup {}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
'sindrets/diffview.nvim',
|
|
||||||
{
|
|
||||||
'MeanderingProgrammer/dashboard.nvim',
|
|
||||||
enable = true,
|
|
||||||
event = 'VimEnter',
|
|
||||||
dependencies = {
|
|
||||||
'MaximilianLloyd/ascii.nvim',
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.api.nvim_create_autocmd({ 'BufWinEnter', 'VimEnter' }, {
|
|
||||||
pattern = { 'dashboard', 'text', 'help', '*' },
|
|
||||||
callback = function()
|
|
||||||
vim.b.minitrailspace_disable = true
|
|
||||||
vim.opt_local.list = false
|
|
||||||
vim.opt_local.spell = false
|
|
||||||
vim.opt_local.colorcolumn = '0'
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
config = function()
|
|
||||||
-- Do not show trailing space in unmodifiable types
|
|
||||||
require('dashboard').setup {
|
|
||||||
-- Dashboard header
|
|
||||||
header = custom_headers.sharp,
|
|
||||||
-- List of directory paths, or functions that return paths
|
|
||||||
directories = {
|
|
||||||
'~/.config/nvim',
|
|
||||||
'~/Documents/code',
|
|
||||||
'~/Documents/novel',
|
|
||||||
},
|
|
||||||
-- Format to display date in
|
|
||||||
date_format = '%Y-%m-%d %H:%M:%S',
|
|
||||||
-- Sections to add at bottom, these can be string references to
|
|
||||||
-- functions in sections.lua, custom strings, or custom functions
|
|
||||||
footer = {
|
|
||||||
[[ ]],
|
|
||||||
[[ Theme ;ft ]],
|
|
||||||
[[ Git ␣gg ]],
|
|
||||||
[[ Find File ;ff ]],
|
|
||||||
[[ Recent Files ;fo ]],
|
|
||||||
[[ Find Word ;fw ]],
|
|
||||||
[[ Bookmarks ;fm ]],
|
|
||||||
[[ ]],
|
|
||||||
[[ Change Directory ;cd ]],
|
|
||||||
[[ Files F5 ]],
|
|
||||||
[[ Terminal F12 ]],
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Gets called after directory is changed and is provided with the
|
|
||||||
-- directory path as an argument
|
|
||||||
on_load = function(path)
|
|
||||||
-- Do nothing
|
|
||||||
end,
|
|
||||||
-- Highlight groups to use for various components
|
|
||||||
highlight_groups = {
|
|
||||||
header = 'Constant',
|
|
||||||
icon = 'Type',
|
|
||||||
directory = 'Delimiter',
|
|
||||||
hotkey = 'Statement',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,14 +16,14 @@ M.tokenize_args = function(raw)
|
||||||
--
|
--
|
||||||
-- This means we're better of implementing the lexer with an algorithm.
|
-- This means we're better of implementing the lexer with an algorithm.
|
||||||
local t = {}
|
local t = {}
|
||||||
local current = ''
|
local current = ""
|
||||||
local in_str = false
|
local in_str = false
|
||||||
local str_seek
|
local str_seek
|
||||||
for c in string.gmatch(raw, '.') do -- iterate through all chars
|
for c in string.gmatch(raw, ".") do -- iterate through all chars
|
||||||
if c == ' ' and not in_str then
|
if c == " " and not in_str then
|
||||||
if string.len(current) > 0 then
|
if string.len(current) > 0 then
|
||||||
table.insert(t, current)
|
table.insert(t, current)
|
||||||
current = ''
|
current = ""
|
||||||
end
|
end
|
||||||
elseif c == '"' and not in_str then
|
elseif c == '"' and not in_str then
|
||||||
in_str = true
|
in_str = true
|
||||||
|
@ -34,7 +34,7 @@ M.tokenize_args = function(raw)
|
||||||
elseif c == str_seek and in_str then
|
elseif c == str_seek and in_str then
|
||||||
in_str = false
|
in_str = false
|
||||||
table.insert(t, current)
|
table.insert(t, current)
|
||||||
current = ''
|
current = ""
|
||||||
else
|
else
|
||||||
current = current .. c
|
current = current .. c
|
||||||
end
|
end
|
||||||
|
@ -50,18 +50,18 @@ end
|
||||||
--- @param t any variable
|
--- @param t any variable
|
||||||
--- @return string t_dumped t dumped to string
|
--- @return string t_dumped t dumped to string
|
||||||
M.dump = function(t)
|
M.dump = function(t)
|
||||||
if type(t) == 'table' then
|
if type(t) == "table" then
|
||||||
local s = '{ '
|
local s = "{ "
|
||||||
for k, v in pairs(t) do
|
for k, v in pairs(t) do
|
||||||
if type(k) ~= 'number' then
|
if type(k) ~= "number" then
|
||||||
k = '"' .. k .. '"'
|
k = '"' .. k .. '"'
|
||||||
end
|
end
|
||||||
if k ~= 1 then
|
if k ~= 1 then
|
||||||
s = s .. ', '
|
s = s .. ", "
|
||||||
end
|
end
|
||||||
s = s .. '[' .. k .. "] = '" .. M.dump(v) .. "'\n"
|
s = s .. "[" .. k .. "] = '" .. M.dump(v) .. "'"
|
||||||
end
|
end
|
||||||
return s .. ' }'
|
return s .. " }"
|
||||||
else
|
else
|
||||||
return tostring(t)
|
return tostring(t)
|
||||||
end
|
end
|
||||||
|
@ -81,3 +81,4 @@ M.try_require = function(module)
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
-- NOTE: Yes, you can install new plugins here!
|
-- NOTE: Yes, you can install new plugins here!
|
||||||
'mfussenegger/nvim-dap',
|
'mfussenegger/nvim-dap',
|
||||||
-- NOTE: And you can specify dependencies as well
|
-- NOTE: And you can specify dependencies as well
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Creates a beautiful debugger UI
|
-- Creates a beautiful debugger UI
|
||||||
|
'rcarriga/nvim-dap-ui',
|
||||||
|
|
||||||
-- Required dependency for nvim-dap-ui
|
-- Required dependency for nvim-dap-ui
|
||||||
'nvim-neotest/nvim-nio',
|
'nvim-neotest/nvim-nio',
|
||||||
|
@ -21,7 +21,8 @@ return {
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
'jay-babu/mason-nvim-dap.nvim',
|
||||||
|
|
||||||
'theHamsta/nvim-dap-virtual-text',
|
-- Add your own debuggers here
|
||||||
|
'leoluz/nvim-dap-go',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
|
@ -40,13 +41,19 @@ return {
|
||||||
-- online, please don't ask me how to install them :)
|
-- online, please don't ask me how to install them :)
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
-- Update this to ensure that you have the debuggers for the langs you want
|
-- Update this to ensure that you have the debuggers for the langs you want
|
||||||
'codelldb',
|
'delve',
|
||||||
'debugpy',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Basic debugging keymaps, feel free to change to your liking!
|
-- Basic debugging keymaps, feel free to change to your liking!
|
||||||
vim.keymap.set('n', '<leader>dB', function() end, { desc = 'Debug: Set Breakpoint' })
|
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
|
||||||
|
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
|
||||||
|
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
|
||||||
|
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
|
||||||
|
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
|
||||||
|
vim.keymap.set('n', '<leader>B', function()
|
||||||
|
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||||
|
end, { desc = 'Debug: Set Breakpoint' })
|
||||||
|
|
||||||
-- Dap UI setup
|
-- Dap UI setup
|
||||||
-- For more information, see |:help nvim-dap-ui|
|
-- For more information, see |:help nvim-dap-ui|
|
||||||
|
@ -70,143 +77,20 @@ return {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||||
|
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
|
||||||
|
|
||||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'rcarriga/nvim-dap-ui',
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>du',
|
|
||||||
function()
|
|
||||||
require('dapui').toggle()
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Open [D]ebug [U]i',
|
-- Install golang specific config
|
||||||
|
require('dap-go').setup {
|
||||||
|
delve = {
|
||||||
|
-- On Windows delve must be run attached or it crashes.
|
||||||
|
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||||
|
detached = vim.fn.has 'win32' == 0,
|
||||||
},
|
},
|
||||||
{
|
}
|
||||||
'<leader>dso',
|
|
||||||
function()
|
|
||||||
require('dap').step_over()
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
desc = 'Toggle [D]ebug [S]tep [O]ver',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dsi',
|
|
||||||
function()
|
|
||||||
require('dap').step_into()
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Toggle [D]ebug [S]tep [I]nto',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dc',
|
|
||||||
function()
|
|
||||||
require('dap').continue()
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Toggle [D]ebug [C]ontinue / Start',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>db',
|
|
||||||
function()
|
|
||||||
require('dap').toggle_breakpoint()
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Toggle [D]ebug [B]reakpoint',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dB',
|
|
||||||
function()
|
|
||||||
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Toggle [D]ebug [B]reakpoint condition',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dK',
|
|
||||||
function()
|
|
||||||
require('dap.ui.widgets').hover()
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Open [D]ebug [K] hover',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dws',
|
|
||||||
function()
|
|
||||||
local widgets = require 'dap.ui.widgets'
|
|
||||||
local my_sidebar = widgets.sidebar(widgets.scopes)
|
|
||||||
my_sidebar.open()
|
|
||||||
end,
|
|
||||||
desc = 'Open [D]ebug [W]indow [S]copes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dwr',
|
|
||||||
function()
|
|
||||||
require('dap').repl.toggle()
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Open [D]ebug [W]indow [R]epl',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dwf',
|
|
||||||
function()
|
|
||||||
local widgets = require 'dap.ui.widgets'
|
|
||||||
local my_sidebar = widgets.sidebar(widgets.frames)
|
|
||||||
my_sidebar.open()
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Open [D]ebug [W]indow [F]rames',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dwi',
|
|
||||||
function()
|
|
||||||
local widgets = require 'dap.ui.widgets'
|
|
||||||
local my_sidebar = widgets.sidebar(widgets.sessions)
|
|
||||||
my_sidebar.open()
|
|
||||||
end,
|
|
||||||
desc = 'Open [D]ebug [W]indow sess[I]ons',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dwt',
|
|
||||||
function()
|
|
||||||
local widgets = require 'dap.ui.widgets'
|
|
||||||
local my_sidebar = widgets.sidebar(widgets.threads)
|
|
||||||
my_sidebar.open()
|
|
||||||
end,
|
|
||||||
desc = 'Open [D]ebug [W]indow [T]hreads',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>dwe',
|
|
||||||
function()
|
|
||||||
local widgets = require 'dap.ui.widgets'
|
|
||||||
local my_sidebar = widgets.sidebar(widgets.expression)
|
|
||||||
my_sidebar.open()
|
|
||||||
end,
|
|
||||||
|
|
||||||
desc = 'Open [D]ebug [W]indow [E]xpression',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
'mfussenegger/nvim-dap',
|
|
||||||
'nvim-neotest/nvim-nio',
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local dap = require 'dap'
|
|
||||||
local dapui = require 'dapui'
|
|
||||||
dapui.setup(opts)
|
|
||||||
dap.listeners.after.event_initialized['dapui_config'] = function()
|
|
||||||
dapui.open {}
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_terminated['dapui_config'] = function()
|
|
||||||
-- dapui.close {}
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_exited['dapui_config'] = function()
|
|
||||||
-- dapui.close {}
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,24 +4,6 @@ return {
|
||||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||||
-- See `:help ibl`
|
-- See `:help ibl`
|
||||||
main = 'ibl',
|
main = 'ibl',
|
||||||
opts = {
|
opts = {},
|
||||||
indentLine_enabled = 1,
|
|
||||||
filetype_exclude = {
|
|
||||||
'help',
|
|
||||||
'terminal',
|
|
||||||
'lazy',
|
|
||||||
'lspinfo',
|
|
||||||
'TelescopePrompt',
|
|
||||||
'TelescopeResults',
|
|
||||||
'mason',
|
|
||||||
'dashboard',
|
|
||||||
'',
|
|
||||||
},
|
|
||||||
buftype_exclude = { 'terminal' },
|
|
||||||
show_trailing_blankline_indent = false,
|
|
||||||
show_first_indent_level = false,
|
|
||||||
show_current_context = true,
|
|
||||||
show_current_context_start = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
gings
|
|
||||||
Safety
|
|
||||||
NewTec
|
|
||||||
Rust
|
|
||||||
Cybersecurity
|
|
||||||
STM32
|
|
||||||
STMicroelectronics
|
|
Binary file not shown.
|
@ -367,236 +367,3 @@ Glänzer
|
||||||
postgres
|
postgres
|
||||||
sqlite
|
sqlite
|
||||||
REPL
|
REPL
|
||||||
nested19
|
|
||||||
GMs
|
|
||||||
Yusuf
|
|
||||||
nenoECC
|
|
||||||
Nonadekagonic
|
|
||||||
#ediverse
|
|
||||||
fediverse
|
|
||||||
nested19's
|
|
||||||
Navier
|
|
||||||
Poincaré
|
|
||||||
Swinnerton
|
|
||||||
lemmy
|
|
||||||
selfhosting
|
|
||||||
ELO
|
|
||||||
FIDE
|
|
||||||
BDD
|
|
||||||
Pentesting
|
|
||||||
Typst
|
|
||||||
Multivariable
|
|
||||||
envvar
|
|
||||||
Featurefile
|
|
||||||
maschinen
|
|
||||||
menschenlesbar
|
|
||||||
thiserror
|
|
||||||
WSL
|
|
||||||
verbindungen/!
|
|
||||||
acl
|
|
||||||
Metadatum
|
|
||||||
Serve/!
|
|
||||||
Featurefiles
|
|
||||||
#orallem/!
|
|
||||||
#orallem/!
|
|
||||||
newglossaryentry
|
|
||||||
CVE
|
|
||||||
QUIC
|
|
||||||
#orallem/!
|
|
||||||
vorallem/!
|
|
||||||
#roßteile/!
|
|
||||||
großteile/!
|
|
||||||
großteile
|
|
||||||
Konfuguration/!
|
|
||||||
typ
|
|
||||||
Wooly
|
|
||||||
addr
|
|
||||||
#dress
|
|
||||||
tokio
|
|
||||||
address/!
|
|
||||||
i32
|
|
||||||
|
|
||||||
C3
|
|
||||||
TOTP
|
|
||||||
Panta/!
|
|
||||||
Panta
|
|
||||||
kauma
|
|
||||||
α
|
|
||||||
XEX
|
|
||||||
unintuitively
|
|
||||||
sea128
|
|
||||||
u8
|
|
||||||
Base64
|
|
||||||
ffield
|
|
||||||
α's
|
|
||||||
Vec
|
|
||||||
u128
|
|
||||||
number1
|
|
||||||
number2
|
|
||||||
i64
|
|
||||||
Waldtraut
|
|
||||||
Kiki
|
|
||||||
Yevda
|
|
||||||
Grischtoffshofen
|
|
||||||
Riedsbach
|
|
||||||
Grischtophus
|
|
||||||
Sichheim
|
|
||||||
Neuhofen
|
|
||||||
Falkenhausen
|
|
||||||
Auenheim
|
|
||||||
KVK
|
|
||||||
#uttslut
|
|
||||||
Kiki's
|
|
||||||
U256
|
|
||||||
Netpulse
|
|
||||||
PID
|
|
||||||
obfuskiert
|
|
||||||
ECB
|
|
||||||
SHA3
|
|
||||||
dnstego
|
|
||||||
obfuskierte
|
|
||||||
DNStego
|
|
||||||
Fauth
|
|
||||||
Lotz
|
|
||||||
deobfuskiert
|
|
||||||
Grischtoff
|
|
||||||
shinobi
|
|
||||||
Grischtoffshofen's
|
|
||||||
Verwahrungskette
|
|
||||||
Räty
|
|
||||||
Aservat/!
|
|
||||||
verfahrensrelevante
|
|
||||||
verfahrensrelevanten
|
|
||||||
Soria
|
|
||||||
#erfahrensrelewand
|
|
||||||
verfahrensrelewand/!
|
|
||||||
#erfahrensrelewant
|
|
||||||
verfahrensrelevant
|
|
||||||
verfahrensrelewant/!
|
|
||||||
gecached
|
|
||||||
Hypervisor
|
|
||||||
Asservats
|
|
||||||
sergej
|
|
||||||
NTLM
|
|
||||||
gecrackt
|
|
||||||
FileZilla
|
|
||||||
EdgeHistory
|
|
||||||
FirefoxWebVisit
|
|
||||||
Artefakttyp
|
|
||||||
HomeUsers
|
|
||||||
hm
|
|
||||||
BossMode
|
|
||||||
Cooldown
|
|
||||||
IRL
|
|
||||||
Einlöser
|
|
||||||
BugStalker
|
|
||||||
libc
|
|
||||||
Coreminer
|
|
||||||
coreminer
|
|
||||||
debuggees
|
|
||||||
steckrs
|
|
||||||
lifecycle
|
|
||||||
Grischtoffshofener
|
|
||||||
Kuppelverteidigungskorps
|
|
||||||
Infrastrukturoffensive
|
|
||||||
l'Avenir
|
|
||||||
Staatsrat's
|
|
||||||
publically
|
|
||||||
Ellinor
|
|
||||||
Thrain
|
|
||||||
Leimann
|
|
||||||
Grischtoff's
|
|
||||||
Farid
|
|
||||||
Nassar
|
|
||||||
Casaus
|
|
||||||
Schutzgardistin
|
|
||||||
Rösch
|
|
||||||
walkable
|
|
||||||
BDSM
|
|
||||||
Herrscher's
|
|
||||||
ŧ
|
|
||||||
GAI
|
|
||||||
Waldtraut's
|
|
||||||
QaaS
|
|
||||||
Brousseau
|
|
||||||
Jérôme
|
|
||||||
Élise
|
|
||||||
Musealisierung
|
|
||||||
Grischtoffshofens
|
|
||||||
Niamh
|
|
||||||
Kuppeldecke
|
|
||||||
Kuppelumgebung
|
|
||||||
QuantumG
|
|
||||||
Molekülmodellierung
|
|
||||||
Stabilitätsfaktor
|
|
||||||
herrscherial
|
|
||||||
decisionmaker
|
|
||||||
reconnections
|
|
||||||
Grischtoffshofian
|
|
||||||
Schutzteinheit
|
|
||||||
Baumaßnahmen
|
|
||||||
Grischtoffshofians
|
|
||||||
GAX
|
|
||||||
MSCI
|
|
||||||
ACWI
|
|
||||||
STMicroelectronics
|
|
||||||
Nucleo
|
|
||||||
STM32
|
|
||||||
ohneweiteres/!
|
|
||||||
STM32CubeIDE
|
|
||||||
vor
|
|
||||||
Möglich/!
|
|
||||||
Systemprogrammiesprachen
|
|
||||||
StableRef
|
|
||||||
StableRefMut
|
|
||||||
IntrusiveList
|
|
||||||
datastructurs
|
|
||||||
mut
|
|
||||||
ptr
|
|
||||||
NonNull
|
|
||||||
vec
|
|
||||||
const
|
|
||||||
adress/!
|
|
||||||
address
|
|
||||||
日本語
|
|
||||||
ICMP
|
|
||||||
IPv4
|
|
||||||
IPv6
|
|
||||||
Cloudflare's
|
|
||||||
SystemD
|
|
||||||
ZSTD
|
|
||||||
netpulsed
|
|
||||||
sudo
|
|
||||||
netpulse
|
|
||||||
Dassault
|
|
||||||
Kuppelstern
|
|
||||||
Thrain's
|
|
||||||
Kuppelstern
|
|
||||||
Loyalistische
|
|
||||||
Durand
|
|
||||||
Renard
|
|
||||||
Ellinor's
|
|
||||||
Whitmore's
|
|
||||||
Yevda's
|
|
||||||
Blackwood's
|
|
||||||
supermajority
|
|
||||||
Ryker
|
|
||||||
Whitmore
|
|
||||||
Freytag
|
|
||||||
Eisenhardt
|
|
||||||
rechtssicherste
|
|
||||||
votings
|
|
||||||
einschätzung/!
|
|
||||||
Einschätzung
|
|
||||||
multiparadigmatische
|
|
||||||
multiparadigmatisches
|
|
||||||
datastructure
|
|
||||||
wellbeing
|
|
||||||
implementierung/!
|
|
||||||
RFC1662
|
|
||||||
Implementierung
|
|
||||||
Redundanzprüfung
|
|
||||||
RevEng
|
|
||||||
geflasht
|
|
||||||
HDLC
|
|
||||||
Grischtophus
|
|
||||||
|
|
BIN
spell/en.utf-8.add.spl
Normal file
BIN
spell/en.utf-8.add.spl
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue