Compare commits
18 Commits
8d1acc7550
...
main
Author | SHA1 | Date | |
---|---|---|---|
95de6305b1 | |||
42928d5278 | |||
3a00d05aca | |||
04d819cfcf | |||
fda45f7bfc | |||
1253334a04 | |||
565a52b09d | |||
75d3e2ea95 | |||
db8c557fc4 | |||
c38317bb26 | |||
23b6233e72 | |||
b74afe39cd | |||
f891193f67 | |||
765bc09de1 | |||
374dc740e2 | |||
cf23989901 | |||
a138bc0451 | |||
052b2f991f |
1
.bashrc
1
.bashrc
@ -182,3 +182,4 @@ fi
|
|||||||
# https://github.com/akinomyoga/ble.sh#13-set-up-bashrc
|
# https://github.com/akinomyoga/ble.sh#13-set-up-bashrc
|
||||||
[[ ${BLE_VERSION-} ]] && ble-attach
|
[[ ${BLE_VERSION-} ]] && ble-attach
|
||||||
|
|
||||||
|
. "$HOME/.cargo/env"
|
||||||
|
18
.gitconfig
18
.gitconfig
@ -41,14 +41,21 @@
|
|||||||
attributesfile = /home/tgrosinger/.gitattributes
|
attributesfile = /home/tgrosinger/.gitattributes
|
||||||
excludesfile = /home/tgrosinger/.gitignore_global
|
excludesfile = /home/tgrosinger/.gitignore_global
|
||||||
|
|
||||||
|
[help]
|
||||||
|
autocorrect = prompt
|
||||||
|
|
||||||
[interactive]
|
[interactive]
|
||||||
diffFilter = delta --color-only
|
diffFilter = delta --color-only
|
||||||
|
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
|
autoSetupRemote = true
|
||||||
|
|
||||||
[diff]
|
[diff]
|
||||||
colorMoved = default
|
colorMoved = default
|
||||||
|
algorithm = histogram
|
||||||
|
mnemonicPrefix = true
|
||||||
|
renames = true
|
||||||
|
|
||||||
[delta]
|
[delta]
|
||||||
navigate = true
|
navigate = true
|
||||||
@ -59,6 +66,15 @@
|
|||||||
|
|
||||||
[branch]
|
[branch]
|
||||||
autosetuprebase = always
|
autosetuprebase = always
|
||||||
|
sort = -committerdate
|
||||||
|
|
||||||
|
[rebase]
|
||||||
|
autoSquash = true
|
||||||
|
autoStash = true
|
||||||
|
updateRefs = true
|
||||||
|
|
||||||
|
[tag]
|
||||||
|
sort = version:refname
|
||||||
|
|
||||||
[pull]
|
[pull]
|
||||||
rebase = true
|
rebase = true
|
||||||
@ -73,7 +89,7 @@
|
|||||||
insteadOf = https://gitlab.i.extrahop.com/
|
insteadOf = https://gitlab.i.extrahop.com/
|
||||||
|
|
||||||
[merge]
|
[merge]
|
||||||
conflictstyle = diff3
|
conflictstyle = zdiff3
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
|
@ -105,7 +105,7 @@ function performSetup() {
|
|||||||
crane dive \
|
crane dive \
|
||||||
go sqlite \
|
go sqlite \
|
||||||
stripe-cli restic \
|
stripe-cli restic \
|
||||||
deno
|
deno pnpm
|
||||||
|
|
||||||
npm install -g @devcontainers/cli
|
npm install -g @devcontainers/cli
|
||||||
npm install -g mjml
|
npm install -g mjml
|
||||||
|
15
nvim/.gitignore
vendored
15
nvim/.gitignore
vendored
@ -1,7 +1,8 @@
|
|||||||
tags
|
tt.*
|
||||||
test.sh
|
.tests
|
||||||
.luarc.json
|
doc/tags
|
||||||
nvim
|
debug
|
||||||
|
.repro
|
||||||
spell/
|
foo.*
|
||||||
lazy-lock.json
|
*.log
|
||||||
|
data
|
||||||
|
15
nvim/.neoconf.json
Normal file
15
nvim/.neoconf.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"lua_ls": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +0,0 @@
|
|||||||
column_width = 160
|
|
||||||
line_endings = "Unix"
|
|
||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 2
|
|
||||||
quote_style = "AutoPreferSingle"
|
|
||||||
call_parentheses = "None"
|
|
@ -1,21 +0,0 @@
|
|||||||
https://github.com/nvim-lua/kickstart.nvim
|
|
||||||
|
|
||||||
MIT License
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
229
nvim/README.md
229
nvim/README.md
@ -1,229 +0,0 @@
|
|||||||
# kickstart.nvim
|
|
||||||
|
|
||||||
## Introduction
|
|
||||||
|
|
||||||
A starting point for Neovim that is:
|
|
||||||
|
|
||||||
* Small
|
|
||||||
* Single-file
|
|
||||||
* Completely Documented
|
|
||||||
|
|
||||||
**NOT** a Neovim distribution, but instead a starting point for your configuration.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
### Install Neovim
|
|
||||||
|
|
||||||
Kickstart.nvim targets *only* the latest
|
|
||||||
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
|
|
||||||
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
|
|
||||||
If you are experiencing issues, please make sure you have the latest versions.
|
|
||||||
|
|
||||||
### Install External Dependencies
|
|
||||||
|
|
||||||
External Requirements:
|
|
||||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
|
||||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
|
||||||
- Clipboard tool (xclip/xsel/win32yank or other depending on platform)
|
|
||||||
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
|
|
||||||
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
|
|
||||||
- Language Setup:
|
|
||||||
- If want to write Typescript, you need `npm`
|
|
||||||
- If want to write Golang, you will need `go`
|
|
||||||
- etc.
|
|
||||||
|
|
||||||
> **NOTE**
|
|
||||||
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
|
||||||
> and quick install snippets
|
|
||||||
|
|
||||||
### Install Kickstart
|
|
||||||
|
|
||||||
> **NOTE**
|
|
||||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
|
||||||
|
|
||||||
Neovim's configurations are located under the following paths, depending on your OS:
|
|
||||||
|
|
||||||
| OS | PATH |
|
|
||||||
| :- | :--- |
|
|
||||||
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
|
|
||||||
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
|
|
||||||
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
|
|
||||||
|
|
||||||
#### Recommended Step
|
|
||||||
|
|
||||||
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
|
|
||||||
so that you have your own copy that you can modify, then install by cloning the
|
|
||||||
fork to your machine using one of the commands below, depending on your OS.
|
|
||||||
|
|
||||||
> **NOTE**
|
|
||||||
> Your fork's url will be something like this:
|
|
||||||
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
|
||||||
|
|
||||||
#### Clone kickstart.nvim
|
|
||||||
> **NOTE**
|
|
||||||
> If following the recommended step above (i.e., forking the repo), replace
|
|
||||||
> `nvim-lua` with `<your_github_username>` in the commands below
|
|
||||||
|
|
||||||
<details><summary> Linux and Mac </summary>
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary> Windows </summary>
|
|
||||||
|
|
||||||
If you're using `cmd.exe`:
|
|
||||||
|
|
||||||
```
|
|
||||||
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
|
|
||||||
```
|
|
||||||
|
|
||||||
If you're using `powershell.exe`
|
|
||||||
|
|
||||||
```
|
|
||||||
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### Post Installation
|
|
||||||
|
|
||||||
Start Neovim
|
|
||||||
|
|
||||||
```sh
|
|
||||||
nvim
|
|
||||||
```
|
|
||||||
|
|
||||||
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
|
||||||
current plugin status. Hit `q` to close the window.
|
|
||||||
|
|
||||||
Read through the `init.lua` file in your configuration folder for more
|
|
||||||
information about extending and exploring Neovim. That also includes
|
|
||||||
examples of adding popularly requested plugins.
|
|
||||||
|
|
||||||
|
|
||||||
### Getting Started
|
|
||||||
|
|
||||||
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
|
|
||||||
|
|
||||||
### FAQ
|
|
||||||
|
|
||||||
* What should I do if I already have a pre-existing neovim configuration?
|
|
||||||
* You should back it up and then delete all associated files.
|
|
||||||
* This includes your existing init.lua and the neovim files in `~/.local`
|
|
||||||
which can be deleted with `rm -rf ~/.local/share/nvim/`
|
|
||||||
* Can I keep my existing configuration in parallel to kickstart?
|
|
||||||
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
|
|
||||||
to maintain multiple configurations. For example, you can install the kickstart
|
|
||||||
configuration in `~/.config/nvim-kickstart` and create an alias:
|
|
||||||
```
|
|
||||||
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
|
|
||||||
```
|
|
||||||
When you run Neovim using `nvim-kickstart` alias it will use the alternative
|
|
||||||
config directory and the matching local directory
|
|
||||||
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
|
|
||||||
distribution that you would like to try out.
|
|
||||||
* What if I want to "uninstall" this configuration:
|
|
||||||
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
|
|
||||||
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
|
|
||||||
* The main purpose of kickstart is to serve as a teaching tool and a reference
|
|
||||||
configuration that someone can easily use to `git clone` as a basis for their own.
|
|
||||||
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
|
|
||||||
into smaller parts. A fork of kickstart that does this while maintaining the
|
|
||||||
same functionality is available here:
|
|
||||||
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
|
|
||||||
* Discussions on this topic can be found here:
|
|
||||||
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
|
||||||
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
|
||||||
|
|
||||||
### Install Recipes
|
|
||||||
|
|
||||||
Below you can find OS specific install instructions for Neovim and dependencies.
|
|
||||||
|
|
||||||
After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step.
|
|
||||||
|
|
||||||
#### Windows Installation
|
|
||||||
|
|
||||||
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
|
|
||||||
Installation may require installing build tools and updating the run command for `telescope-fzf-native`
|
|
||||||
|
|
||||||
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
|
||||||
|
|
||||||
This requires:
|
|
||||||
|
|
||||||
- Install CMake and the Microsoft C++ Build Tools on Windows
|
|
||||||
|
|
||||||
```lua
|
|
||||||
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
<details><summary>Windows with gcc/make using chocolatey</summary>
|
|
||||||
Alternatively, one can install gcc and make which don't require changing the config,
|
|
||||||
the easiest way is to use choco:
|
|
||||||
|
|
||||||
1. install [chocolatey](https://chocolatey.org/install)
|
|
||||||
either follow the instructions on the page or use winget,
|
|
||||||
run in cmd as **admin**:
|
|
||||||
```
|
|
||||||
winget install --accept-source-agreements chocolatey.chocolatey
|
|
||||||
```
|
|
||||||
|
|
||||||
2. install all requirements using choco, exit previous cmd and
|
|
||||||
open a new one so that choco path is set, and run in cmd as **admin**:
|
|
||||||
```
|
|
||||||
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
<details><summary>WSL (Windows Subsystem for Linux)</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
wsl --install
|
|
||||||
wsl
|
|
||||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install make gcc ripgrep unzip git xclip neovim
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
#### Linux Install
|
|
||||||
<details><summary>Ubuntu Install Steps</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install make gcc ripgrep unzip git xclip neovim
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
<details><summary>Debian Install Steps</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install make gcc ripgrep unzip git xclip curl
|
|
||||||
|
|
||||||
# Now we install nvim
|
|
||||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
|
|
||||||
sudo rm -rf /opt/nvim-linux64
|
|
||||||
sudo mkdir -p /opt/nvim-linux64
|
|
||||||
sudo chmod a+rX /opt/nvim-linux64
|
|
||||||
sudo tar -C /opt -xzf nvim-linux64.tar.gz
|
|
||||||
|
|
||||||
# make it available in /usr/local/bin, distro installs to /usr/bin
|
|
||||||
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
<details><summary>Fedora Install Steps</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details><summary>Arch Install Steps</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
|
|
||||||
```
|
|
||||||
</details>
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
================================================================================
|
|
||||||
INTRODUCTION *kickstart.nvim*
|
|
||||||
|
|
||||||
Kickstart.nvim is a project to help you get started on your neovim journey.
|
|
||||||
|
|
||||||
*kickstart-is-not*
|
|
||||||
It is not:
|
|
||||||
- Complete framework for every plugin under the sun
|
|
||||||
- Place to add every plugin that could ever be useful
|
|
||||||
|
|
||||||
*kickstart-is*
|
|
||||||
It is:
|
|
||||||
- Somewhere that has a good start for the most common "IDE" type features:
|
|
||||||
- autocompletion
|
|
||||||
- goto-definition
|
|
||||||
- find references
|
|
||||||
- fuzzy finding
|
|
||||||
- and hinting at what more can be done :)
|
|
||||||
- A place to _kickstart_ your journey.
|
|
||||||
- You should fork this project and use/modify it so that it matches your
|
|
||||||
style and preferences. If you don't want to do that, there are probably
|
|
||||||
other projects that would fit much better for you (and that's great!)!
|
|
||||||
|
|
||||||
vim:tw=78:ts=8:ft=help:norl:
|
|
1023
nvim/init.lua
1023
nvim/init.lua
File diff suppressed because it is too large
Load Diff
58
nvim/lazy-lock.json
Normal file
58
nvim/lazy-lock.json
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"CopilotChat.nvim": { "branch": "main", "commit": "df550ff3f9f2d028160946d674db08dad432fdd3" },
|
||||||
|
"LazyVim": { "branch": "main", "commit": "3f034d0a7f58031123300309f2efd3bb0356ee21" },
|
||||||
|
"SchemaStore.nvim": { "branch": "main", "commit": "d307d291f38678d064cb987112926df6d9134de3" },
|
||||||
|
"blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" },
|
||||||
|
"blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
|
"catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },
|
||||||
|
"conform.nvim": { "branch": "master", "commit": "f9ef25a7ef00267b7d13bfc00b0dea22d78702d5" },
|
||||||
|
"copilot.lua": { "branch": "master", "commit": "535ebb53880ae67e33d9e50b503d25f9ef3ca06c" },
|
||||||
|
"crates.nvim": { "branch": "main", "commit": "fd2bbca7aa588f24ffc3517831934b4c4a9588e9" },
|
||||||
|
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
|
||||||
|
"focus.nvim": { "branch": "master", "commit": "d76338e58e49f844e8f6a7aff16a74a2a55a80ef" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||||
|
"grug-far.nvim": { "branch": "main", "commit": "00fa27119620bc2314d560d0d11aac936a183abb" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" },
|
||||||
|
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||||
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "ea387e0819ab189d536bb4067e4d8ece3801a292" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
|
"mini.ai": { "branch": "main", "commit": "978ffc65c6b513fde9ef075326d34d89197f1ea5" },
|
||||||
|
"mini.icons": { "branch": "main", "commit": "86a633f0dffcfd80110bac86681dbf4b5c37ba5c" },
|
||||||
|
"mini.pairs": { "branch": "main", "commit": "b90e36aa5ca5e0d825e77ad67aac22214a4d9096" },
|
||||||
|
"mini.surround": { "branch": "main", "commit": "c92d262deae79545b7674b2069332116461a85f3" },
|
||||||
|
"neotest": { "branch": "master", "commit": "dddbe8fe358b05b2b7e54fe4faab50563171a76d" },
|
||||||
|
"neotest-golang": { "branch": "main", "commit": "5650ad9d19d05167ae994a9f63f5c34efdafc246" },
|
||||||
|
"neotest-jest": { "branch": "main", "commit": "514fd4eae7da15fd409133086bb8e029b65ac43f" },
|
||||||
|
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||||
|
"nvim-ansible": { "branch": "main", "commit": "bba61168b7aef735e7f950fdfece5ef6c388eacf" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" },
|
||||||
|
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
|
||||||
|
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
|
||||||
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" },
|
||||||
|
"nvim-lint": { "branch": "master", "commit": "93b8040115c9114dac1047311763bef275e752dc" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "85e0dd26b710e834a105d679200d01e326a3d2b0" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "da5825bf70cc2ea7eacd1e60c32c07baf19adeba" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
|
||||||
|
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||||
|
"persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"render-markdown.nvim": { "branch": "main", "commit": "c91fa46fc8d79f5577beac70a459f30ec17a60c2" },
|
||||||
|
"rustaceanvim": { "branch": "master", "commit": "1486b5a2cc0de646d6d0837ec77127c9d6e2c50f" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
|
"ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" },
|
||||||
|
"vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" },
|
||||||
|
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||||
|
"vim-dadbod-ui": { "branch": "master", "commit": "685e75b34ee0e12f92ec4507ea8bb7f1aaa936e5" },
|
||||||
|
"vim-tmux-navigator": { "branch": "master", "commit": "791dacfcfc8ccb7f6eb1c853050883b03e5a22fe" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
|
}
|
26
nvim/lazyvim.json
Normal file
26
nvim/lazyvim.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
"lazyvim.plugins.extras.ai.copilot",
|
||||||
|
"lazyvim.plugins.extras.ai.copilot-chat",
|
||||||
|
"lazyvim.plugins.extras.coding.mini-surround",
|
||||||
|
"lazyvim.plugins.extras.dap.core",
|
||||||
|
"lazyvim.plugins.extras.formatting.prettier",
|
||||||
|
"lazyvim.plugins.extras.lang.ansible",
|
||||||
|
"lazyvim.plugins.extras.lang.go",
|
||||||
|
"lazyvim.plugins.extras.lang.json",
|
||||||
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
|
"lazyvim.plugins.extras.lang.rust",
|
||||||
|
"lazyvim.plugins.extras.lang.sql",
|
||||||
|
"lazyvim.plugins.extras.lang.svelte",
|
||||||
|
"lazyvim.plugins.extras.lang.tailwind",
|
||||||
|
"lazyvim.plugins.extras.lang.typescript",
|
||||||
|
"lazyvim.plugins.extras.lang.yaml",
|
||||||
|
"lazyvim.plugins.extras.linting.eslint",
|
||||||
|
"lazyvim.plugins.extras.test.core"
|
||||||
|
],
|
||||||
|
"install_version": 8,
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "10960"
|
||||||
|
},
|
||||||
|
"version": 8
|
||||||
|
}
|
8
nvim/lua/config/autocmds.lua
Normal file
8
nvim/lua/config/autocmds.lua
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
|
--
|
||||||
|
-- Add any additional autocmds here
|
||||||
|
-- with `vim.api.nvim_create_autocmd`
|
||||||
|
--
|
||||||
|
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
||||||
|
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
3
nvim/lua/config/keymaps.lua
Normal file
3
nvim/lua/config/keymaps.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
|
-- Add any additional keymaps here
|
53
nvim/lua/config/lazy.lua
Normal file
53
nvim/lua/config/lazy.lua
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- add LazyVim and import its plugins
|
||||||
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
|
lazy = false,
|
||||||
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
|
-- have outdated releases, which may break your Neovim install.
|
||||||
|
version = false, -- always use the latest git commit
|
||||||
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "catppuccin-latte" } },
|
||||||
|
checker = {
|
||||||
|
enabled = true, -- check for plugin updates periodically
|
||||||
|
notify = false, -- notify on update
|
||||||
|
}, -- automatically check for plugin updates
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
-- "matchit",
|
||||||
|
-- "matchparen",
|
||||||
|
-- "netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
9
nvim/lua/config/options.lua
Normal file
9
nvim/lua/config/options.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
|
-- Add any additional options here
|
||||||
|
|
||||||
|
-- Minimal number of screen lines to keep above and below the cursor.
|
||||||
|
vim.opt.scrolloff = 10
|
||||||
|
|
||||||
|
-- Only run prettier in directories where there is a config file.
|
||||||
|
vim.g.lazyvim_prettier_needs_config = true
|
@ -1,93 +0,0 @@
|
|||||||
-- AI-powered coding
|
|
||||||
-- https://github.com/olimorris/codecompanion.nvim
|
|
||||||
return {
|
|
||||||
'olimorris/codecompanion.nvim',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
'hrsh7th/nvim-cmp', -- Optional: For using slash commands and variables in the chat buffer
|
|
||||||
'nvim-telescope/telescope.nvim', -- Optional: For using slash commands
|
|
||||||
{ 'stevearc/dressing.nvim', opts = {} }, -- Optional: Improves the default Neovim UI
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ '<leader>aa', '<cmd>CodeCompanionActions<CR>', desc = 'Actions' },
|
|
||||||
{ '<leader>at', '<cmd>CodeCompanionToggle<CR>', desc = 'Toggle chat' },
|
|
||||||
{ '<leader>aA', '<cmd>CodeCompanionAdd<CR>', desc = 'Add to chat', mode = 'v' },
|
|
||||||
{ '<leader>ax', '<cmd>CodeCompanion /explain<CR>', desc = 'Explain', mode = '' },
|
|
||||||
{ '<leader>af', '<cmd>CodeCompanion /fix<CR>', desc = 'Fix', mode = 'v' },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('codecompanion').setup {
|
|
||||||
strategies = {
|
|
||||||
chat = {
|
|
||||||
adapter = 'codellama_direct',
|
|
||||||
},
|
|
||||||
inline = {
|
|
||||||
adapter = 'codellama_direct',
|
|
||||||
},
|
|
||||||
agent = {
|
|
||||||
adapter = 'codellama_direct',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
adapters = {
|
|
||||||
-- Not working yet to go through openwebui. Only works when connecting directly to ollama.
|
|
||||||
ollama = function()
|
|
||||||
return require('codecompanion.adapters').extend('ollama', {
|
|
||||||
env = {
|
|
||||||
url = 'https://openwebui.grosinger.net/ollama',
|
|
||||||
api_key = 'cmd:cat /home/tgrosinger/.openwebui',
|
|
||||||
},
|
|
||||||
headers = {
|
|
||||||
['Content-Type'] = 'application/json',
|
|
||||||
['Authorization'] = 'Bearer ${api_key}',
|
|
||||||
},
|
|
||||||
parameters = {
|
|
||||||
sync = true,
|
|
||||||
},
|
|
||||||
schema = {
|
|
||||||
model = {
|
|
||||||
default = 'codellama:13b',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
codellama_direct = function()
|
|
||||||
return require('codecompanion.adapters').extend('ollama', {
|
|
||||||
env = {
|
|
||||||
url = 'http://192.168.1.66:11434',
|
|
||||||
},
|
|
||||||
headers = {
|
|
||||||
['Content-Type'] = 'application/json',
|
|
||||||
},
|
|
||||||
parameters = {
|
|
||||||
sync = true,
|
|
||||||
},
|
|
||||||
schema = {
|
|
||||||
model = {
|
|
||||||
default = 'codellama:13b',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
llama31_direct = function()
|
|
||||||
return require('codecompanion.adapters').extend('ollama', {
|
|
||||||
env = {
|
|
||||||
url = 'http://192.168.1.66:11434',
|
|
||||||
},
|
|
||||||
headers = {
|
|
||||||
['Content-Type'] = 'application/json',
|
|
||||||
},
|
|
||||||
parameters = {
|
|
||||||
sync = true,
|
|
||||||
},
|
|
||||||
schema = {
|
|
||||||
model = {
|
|
||||||
default = 'llama3.1:latest',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
-- UI for working with databases from within vim.
|
|
||||||
-- https://github.com/tpope/vim-dadbod
|
|
||||||
-- https://github.com/kristijanhusak/vim-dadbod-ui
|
|
||||||
return {
|
|
||||||
'tpope/vim-dadbod',
|
|
||||||
dependencies = {
|
|
||||||
'kristijanhusak/vim-dadbod-ui',
|
|
||||||
'kristijanhusak/vim-dadbod-completion',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
pattern = { 'sql', 'mysql', 'plsql' },
|
|
||||||
desc = 'Add dadbod-completion',
|
|
||||||
callback = function()
|
|
||||||
require('cmp').setup.buffer {
|
|
||||||
sources = {
|
|
||||||
{ name = 'vim-dadbod-completion' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
-- A small Neovim plugin for previewing native LSP's goto definition, type definition,
|
|
||||||
-- implementation, declaration and references calls in floating windows.
|
|
||||||
-- https://github.com/rmagatti/goto-preview
|
|
||||||
return {
|
|
||||||
'rmagatti/goto-preview',
|
|
||||||
event = 'VeryLazy',
|
|
||||||
config = function()
|
|
||||||
require('goto-preview').setup()
|
|
||||||
end,
|
|
||||||
keys = {
|
|
||||||
{ '<leader>pd', '<cmd>lua require("goto-preview").goto_preview_definition()<CR>', desc = 'Definition' },
|
|
||||||
{ '<leader>pt', '<cmd>lua require("goto-preview").goto_preview_type()<CR>', desc = 'Type' },
|
|
||||||
{ '<leader>pi', '<cmd>lua require("goto-preview").goto_preview_implementation()<CR>', desc = 'Implementation' },
|
|
||||||
{ '<leader>pD', '<cmd>lua require("goto-preview").goto_preview_declaration()<CR>', desc = 'Declaration' },
|
|
||||||
{ '<leader>pr', '<cmd>lua require("goto-preview").goto_preview_references()<CR>', desc = 'References' },
|
|
||||||
{ '<leader>pq', '<cmd>lua require("goto-preview").close_all_win()<CR>', desc = 'Close all' },
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
-- Highly configurable status line
|
|
||||||
-- https://github.com/nvim-lualine/lualine.nvim
|
|
||||||
return {
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
theme = 'catppuccin',
|
|
||||||
icons_enabled = true,
|
|
||||||
component_separators = { left = '', right = '' },
|
|
||||||
section_separators = { left = '', right = '' },
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = { 'mode' },
|
|
||||||
lualine_b = { 'diagnostics' },
|
|
||||||
lualine_c = {
|
|
||||||
{
|
|
||||||
'filename',
|
|
||||||
file_status = true, -- Displays file status (readonly status, modified status)
|
|
||||||
newfile_status = true, -- Display new file status (new file means no write after created)
|
|
||||||
path = 1, -- Relative path
|
|
||||||
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
|
||||||
symbols = {
|
|
||||||
modified = '', -- Text to show when the file is modified.
|
|
||||||
readonly = '', -- Text to show when the file is non-modifiable or readonly.
|
|
||||||
unnamed = '[No Name]', -- Text to show for unnamed buffers.
|
|
||||||
newfile = '', -- Text to show for newly created file before first write
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_x = { 'fileformat', 'filetype' },
|
|
||||||
lualine_y = { 'progress' },
|
|
||||||
lualine_z = { 'location' },
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {
|
|
||||||
{
|
|
||||||
'filename',
|
|
||||||
file_status = true, -- Displays file status (readonly status, modified status)
|
|
||||||
newfile_status = true, -- Display new file status (new file means no write after created)
|
|
||||||
path = 1, -- Relative path
|
|
||||||
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
|
||||||
symbols = {
|
|
||||||
modified = '', -- Text to show when the file is modified.
|
|
||||||
readonly = '', -- Text to show when the file is non-modifiable or readonly.
|
|
||||||
unnamed = '[No Name]', -- Text to show for unnamed buffers.
|
|
||||||
newfile = '', -- Text to show for newly created file before first write
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_x = { 'location' },
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
-- Display context that has scrolled off the top of the screen.
|
|
||||||
-- For example, signature of the current function, or if-case.
|
|
||||||
-- https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
'nvim-treesitter/nvim-treesitter-context',
|
|
||||||
opts = {
|
|
||||||
max_lines = 5,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
-- File explorer that lets you edit your filesystem like a normal Neovim buffer.
|
|
||||||
-- https://github.com/stevearc/oil.nvim
|
|
||||||
return {
|
|
||||||
'stevearc/oil.nvim',
|
|
||||||
event = 'VeryLazy',
|
|
||||||
opts = {},
|
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
-- A feature-rich Go development plugin, leveraging gopls, treesitter AST, Dap, and various Go tools.
|
|
||||||
-- https://github.com/ray-x/go.nvim
|
|
||||||
return {
|
|
||||||
'ray-x/go.nvim',
|
|
||||||
dependencies = { -- optional packages
|
|
||||||
'ray-x/guihua.lua',
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
require('go').setup()
|
|
||||||
end,
|
|
||||||
event = { 'CmdlineEnter' },
|
|
||||||
ft = { 'go', 'gomod' },
|
|
||||||
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
-- Highlight todo, notes, etc in comments
|
|
||||||
-- https://github.com/folke/todo-comments.nvim
|
|
||||||
return {
|
|
||||||
'folke/todo-comments.nvim',
|
|
||||||
event = 'VimEnter',
|
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
|
||||||
opts = {
|
|
||||||
signs = false,
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>st',
|
|
||||||
'<cmd>TodoTelescope<cr>',
|
|
||||||
desc = '[T]odo all files',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
-- Friendly display of problems in the codebase
|
|
||||||
-- https://github.com/folke/trouble.nvim
|
|
||||||
return {
|
|
||||||
'folke/trouble.nvim',
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>xx',
|
|
||||||
'<cmd>Trouble diagnostics toggle<cr>',
|
|
||||||
desc = 'Diagnostics (Trouble)',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>xX',
|
|
||||||
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
|
|
||||||
desc = 'Buffer Diagnostics (Trouble)',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>cs',
|
|
||||||
'<cmd>Trouble symbols toggle focus=false<cr>',
|
|
||||||
desc = 'Symbols (Trouble)',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>cl',
|
|
||||||
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
|
|
||||||
desc = 'LSP Definitions / references / ... (Trouble)',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>xL',
|
|
||||||
'<cmd>Trouble loclist toggle<cr>',
|
|
||||||
desc = 'Location List (Trouble)',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>xQ',
|
|
||||||
'<cmd>Trouble qflist toggle<cr>',
|
|
||||||
desc = 'Quickfix List (Trouble)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {},
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
-- The goal of nvim-ufo is to make Neovim's fold look modern and keep high performance.
|
|
||||||
-- https://github.com/kevinhwang91/nvim-ufo
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
'kevinhwang91/nvim-ufo',
|
|
||||||
enabled = false,
|
|
||||||
dependencies = {
|
|
||||||
'kevinhwang91/promise-async',
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'zR',
|
|
||||||
function()
|
|
||||||
require('ufo').openAllFolds()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'zM',
|
|
||||||
function()
|
|
||||||
require('ufo').closeAllFolds()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- { 'zr', function() require('ufo').openFoldsExceptKinds() end },
|
|
||||||
-- { 'zm', function() require('ufo').closeFoldsWith() end },
|
|
||||||
},
|
|
||||||
opts = function()
|
|
||||||
return {
|
|
||||||
-- More advanced config example: https://github.com/rafi/vim-config/blob/master/lua/rafi/plugins/extras/editor/ufo.lua
|
|
||||||
provider_selector = function(bufnr, filetype, buftype)
|
|
||||||
return { 'treesitter', 'indent' }
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
-- Seamless navigation between tmux and vim windows.
|
|
||||||
-- https://github.com/christoomey/vim-tmux-navigator
|
|
||||||
return {
|
|
||||||
'christoomey/vim-tmux-navigator',
|
|
||||||
cmd = {
|
|
||||||
'TmuxNavigateLeft',
|
|
||||||
'TmuxNavigateDown',
|
|
||||||
'TmuxNavigateUp',
|
|
||||||
'TmuxNavigateRight',
|
|
||||||
'TmuxNavigatePrevious',
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ '<c-h>', '<cmd><C-U>TmuxNavigateLeft<cr>' },
|
|
||||||
{ '<c-j>', '<cmd><C-U>TmuxNavigateDown<cr>' },
|
|
||||||
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>' },
|
|
||||||
{ '<c-l>', '<cmd><C-U>TmuxNavigateRight<cr>' },
|
|
||||||
{ '<c-\\>', '<cmd><C-U>TmuxNavigatePrevious<cr>' },
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.g.tmux_navigator_disable_when_zoomed = 1
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
--[[
|
|
||||||
--
|
|
||||||
-- This file is not required for your own configuration,
|
|
||||||
-- but helps people determine if their system is setup correctly.
|
|
||||||
--
|
|
||||||
--]]
|
|
||||||
|
|
||||||
local check_version = function()
|
|
||||||
local verstr = tostring(vim.version())
|
|
||||||
if not vim.version.ge then
|
|
||||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if vim.version.ge(vim.version(), '0.10-dev') then
|
|
||||||
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
|
||||||
else
|
|
||||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local check_external_reqs = function()
|
|
||||||
-- Basic utils: `git`, `make`, `unzip`
|
|
||||||
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
|
||||||
local is_executable = vim.fn.executable(exe) == 1
|
|
||||||
if is_executable then
|
|
||||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
|
||||||
else
|
|
||||||
vim.health.warn(string.format("Could not find executable: '%s'", exe))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
check = function()
|
|
||||||
vim.health.start 'kickstart.nvim'
|
|
||||||
|
|
||||||
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
|
||||||
|
|
||||||
Fix only warnings for plugins and languages you intend to use.
|
|
||||||
Mason will give warnings for languages that are not installed.
|
|
||||||
You do not need to install, unless you want to use those languages!]]
|
|
||||||
|
|
||||||
local uv = vim.uv or vim.loop
|
|
||||||
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
|
||||||
|
|
||||||
check_version()
|
|
||||||
check_external_reqs()
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
-- autopairs
|
|
||||||
-- https://github.com/windwp/nvim-autopairs
|
|
||||||
|
|
||||||
return {
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
event = 'InsertEnter',
|
|
||||||
-- Optional dependency
|
|
||||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
|
||||||
config = function()
|
|
||||||
require('nvim-autopairs').setup {}
|
|
||||||
-- 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,
|
|
||||||
}
|
|
@ -1,104 +0,0 @@
|
|||||||
-- debug.lua
|
|
||||||
--
|
|
||||||
-- Shows how to use the DAP plugin to debug your code.
|
|
||||||
--
|
|
||||||
-- Primarily focused on configuring the debugger for Go, but can
|
|
||||||
-- be extended to other languages as well. That's why it's called
|
|
||||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
|
||||||
|
|
||||||
return {
|
|
||||||
'mfussenegger/nvim-dap',
|
|
||||||
dependencies = {
|
|
||||||
-- Creates a beautiful debugger UI
|
|
||||||
'rcarriga/nvim-dap-ui',
|
|
||||||
'theHamsta/nvim-dap-virtual-text',
|
|
||||||
|
|
||||||
-- Required dependency for nvim-dap-ui
|
|
||||||
'nvim-neotest/nvim-nio',
|
|
||||||
|
|
||||||
-- Installs the debug adapters for you
|
|
||||||
'williamboman/mason.nvim',
|
|
||||||
'jay-babu/mason-nvim-dap.nvim',
|
|
||||||
|
|
||||||
-- Add your own debuggers here
|
|
||||||
'leoluz/nvim-dap-go',
|
|
||||||
},
|
|
||||||
keys = function(_, keys)
|
|
||||||
local dap = require 'dap'
|
|
||||||
local dapui = require 'dapui'
|
|
||||||
return {
|
|
||||||
-- Basic debugging keymaps, feel free to change to your liking!
|
|
||||||
{ '<F5>', dap.continue, desc = 'Debug: Start/Continue' },
|
|
||||||
{ '<F1>', dap.step_into, desc = 'Debug: Step Into' },
|
|
||||||
{ '<F2>', dap.step_over, desc = 'Debug: Step Over' },
|
|
||||||
{ '<F3>', dap.step_out, desc = 'Debug: Step Out' },
|
|
||||||
{ '<leader>b', dap.toggle_breakpoint, desc = 'Debug: Toggle Breakpoint' },
|
|
||||||
{
|
|
||||||
'<leader>B',
|
|
||||||
function()
|
|
||||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
|
||||||
end,
|
|
||||||
desc = 'Debug: Set Breakpoint',
|
|
||||||
},
|
|
||||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
|
||||||
{ '<F7>', dapui.toggle, desc = 'Debug: See last session result.' },
|
|
||||||
unpack(keys),
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
config = function()
|
|
||||||
local dap = require 'dap'
|
|
||||||
local dapui = require 'dapui'
|
|
||||||
|
|
||||||
require('mason-nvim-dap').setup {
|
|
||||||
-- Makes a best effort to setup the various debuggers with
|
|
||||||
-- reasonable debug configurations
|
|
||||||
automatic_installation = true,
|
|
||||||
|
|
||||||
-- You can provide additional configuration to the handlers,
|
|
||||||
-- see mason-nvim-dap README for more information
|
|
||||||
handlers = {},
|
|
||||||
|
|
||||||
-- You'll need to check that you have the required things installed
|
|
||||||
-- online, please don't ask me how to install them :)
|
|
||||||
ensure_installed = {
|
|
||||||
-- Update this to ensure that you have the debuggers for the langs you want
|
|
||||||
'delve',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Dap UI setup
|
|
||||||
-- For more information, see |:help nvim-dap-ui|
|
|
||||||
dapui.setup {
|
|
||||||
-- Set icons to characters that are more likely to work in every terminal.
|
|
||||||
-- Feel free to remove or use ones that you like more! :)
|
|
||||||
-- Don't feel like these are good choices.
|
|
||||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
|
||||||
controls = {
|
|
||||||
icons = {
|
|
||||||
pause = '⏸',
|
|
||||||
play = '▶',
|
|
||||||
step_into = '⏎',
|
|
||||||
step_over = '⏭',
|
|
||||||
step_out = '⏮',
|
|
||||||
step_back = 'b',
|
|
||||||
run_last = '▶▶',
|
|
||||||
terminate = '⏹',
|
|
||||||
disconnect = '⏏',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
|
||||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
|
||||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
|
||||||
|
|
||||||
-- Golang debugging is handled by ray-x/go instead of the below 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,
|
|
||||||
-- },
|
|
||||||
-- }
|
|
||||||
end,
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
-- GitSigns is a Neovim plugin which adds git related signs to the gutter,
|
|
||||||
-- as well as other utilities for managing changes.
|
|
||||||
-- https://github.com/lewis6991/gitsigns.nvim
|
|
||||||
--
|
|
||||||
-- Here is a more advanced example where we pass configuration
|
|
||||||
-- options to `gitsigns.nvim`. This is equivalent to the following Lua:
|
|
||||||
-- require('gitsigns').setup({ ... })
|
|
||||||
--
|
|
||||||
-- See `:help gitsigns` to understand what the configuration keys do
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
'lewis6991/gitsigns.nvim',
|
|
||||||
opts = {
|
|
||||||
signs = {
|
|
||||||
add = { text = '+' },
|
|
||||||
change = { text = '~' },
|
|
||||||
delete = { text = '_' },
|
|
||||||
topdelete = { text = '‾' },
|
|
||||||
changedelete = { text = '~' },
|
|
||||||
},
|
|
||||||
on_attach = function(bufnr)
|
|
||||||
local gitsigns = require 'gitsigns'
|
|
||||||
|
|
||||||
local function map(mode, l, r, opts)
|
|
||||||
opts = opts or {}
|
|
||||||
opts.buffer = bufnr
|
|
||||||
vim.keymap.set(mode, l, r, opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Navigation
|
|
||||||
map('n', ']c', function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
vim.cmd.normal { ']c', bang = true }
|
|
||||||
else
|
|
||||||
gitsigns.nav_hunk 'next'
|
|
||||||
end
|
|
||||||
end, { desc = 'Jump to next git [c]hange' })
|
|
||||||
|
|
||||||
map('n', '[c', function()
|
|
||||||
if vim.wo.diff then
|
|
||||||
vim.cmd.normal { '[c', bang = true }
|
|
||||||
else
|
|
||||||
gitsigns.nav_hunk 'prev'
|
|
||||||
end
|
|
||||||
end, { desc = 'Jump to previous git [c]hange' })
|
|
||||||
|
|
||||||
-- Actions
|
|
||||||
-- visual mode
|
|
||||||
map('v', '<leader>hs', function()
|
|
||||||
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
|
||||||
end, { desc = 'stage git hunk' })
|
|
||||||
map('v', '<leader>hr', function()
|
|
||||||
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
|
||||||
end, { desc = 'reset git hunk' })
|
|
||||||
-- normal mode
|
|
||||||
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
|
|
||||||
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
|
|
||||||
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
|
|
||||||
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
|
|
||||||
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
|
|
||||||
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
|
|
||||||
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
|
|
||||||
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
|
|
||||||
map('n', '<leader>hD', function()
|
|
||||||
gitsigns.diffthis '@'
|
|
||||||
end, { desc = 'git [D]iff against last commit' })
|
|
||||||
-- Toggles
|
|
||||||
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
|
|
||||||
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
{ -- Add indentation guides even on blank lines
|
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
|
||||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
|
||||||
-- See `:help ibl`
|
|
||||||
main = 'ibl',
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
return {
|
|
||||||
|
|
||||||
{ -- Linting
|
|
||||||
'mfussenegger/nvim-lint',
|
|
||||||
event = { 'BufReadPre', 'BufNewFile' },
|
|
||||||
config = function()
|
|
||||||
local lint = require 'lint'
|
|
||||||
|
|
||||||
-- Defining in this format allows other plugins to define linters.
|
|
||||||
-- require('lint').linters_by_ft
|
|
||||||
--
|
|
||||||
-- However, note that this will enable a set of default linters,
|
|
||||||
-- which will cause errors unless these tools are available:
|
|
||||||
-- {
|
|
||||||
-- clojure = { "clj-kondo" },
|
|
||||||
-- dockerfile = { "hadolint" },
|
|
||||||
-- inko = { "inko" },
|
|
||||||
-- janet = { "janet" },
|
|
||||||
-- json = { "jsonlint" },
|
|
||||||
-- markdown = { "vale" },
|
|
||||||
-- rst = { "vale" },
|
|
||||||
-- ruby = { "ruby" },
|
|
||||||
-- terraform = { "tflint" },
|
|
||||||
-- text = { "vale" }
|
|
||||||
-- }
|
|
||||||
lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
|
||||||
|
|
||||||
-- JS and TS already run eslint when formatting with conform.nvim.
|
|
||||||
-- Additionally, this causes issues in JS or TS projects that do not have an eslint config file.
|
|
||||||
-- lint.linters_by_ft['typescript'] = { 'eslint' }
|
|
||||||
-- lint.linters_by_ft['javascript'] = { 'eslint' }
|
|
||||||
|
|
||||||
-- You can disable the default linters by setting their filetypes to nil:
|
|
||||||
-- lint.linters_by_ft['clojure'] = nil
|
|
||||||
-- lint.linters_by_ft['dockerfile'] = nil
|
|
||||||
-- lint.linters_by_ft['inko'] = nil
|
|
||||||
-- lint.linters_by_ft['janet'] = nil
|
|
||||||
-- lint.linters_by_ft['json'] = nil
|
|
||||||
-- lint.linters_by_ft['markdown'] = nil
|
|
||||||
-- lint.linters_by_ft['rst'] = nil
|
|
||||||
-- lint.linters_by_ft['ruby'] = nil
|
|
||||||
-- lint.linters_by_ft['terraform'] = nil
|
|
||||||
-- lint.linters_by_ft['text'] = nil
|
|
||||||
|
|
||||||
-- Create autocommand which carries out the actual linting
|
|
||||||
-- on the specified events.
|
|
||||||
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
|
||||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
|
||||||
group = lint_augroup,
|
|
||||||
callback = function()
|
|
||||||
lint.try_lint()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
-- Neo-tree is a Neovim plugin to browse the file system
|
|
||||||
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
|
||||||
|
|
||||||
return {
|
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
|
||||||
version = '*',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
|
||||||
'MunifTanjim/nui.nvim',
|
|
||||||
},
|
|
||||||
cmd = 'Neotree',
|
|
||||||
keys = {
|
|
||||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal' },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
filesystem = {
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
['\\'] = 'close_window',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,129 +0,0 @@
|
|||||||
---@module Foldtext
|
|
||||||
---Based on https://www.reddit.com/r/neovim/comments/16sqyjz/finally_we_can_have_highlighted_folds/
|
|
||||||
---Retrieved from https://github.com/Wansmer/nvim-config/blob/main/lua/modules/foldtext.lua
|
|
||||||
---Updated with vim.treesitter._fold.foldtext()
|
|
||||||
|
|
||||||
local function parse_line(linenr)
|
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
|
||||||
|
|
||||||
local line = vim.api.nvim_buf_get_lines(bufnr, linenr - 1, linenr, false)[1]
|
|
||||||
if not line then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local ok, parser = pcall(vim.treesitter.get_parser, bufnr)
|
|
||||||
if not ok then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local query = vim.treesitter.query.get(parser:lang(), 'highlights')
|
|
||||||
if not query then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local tree = parser:parse({ linenr - 1, linenr })[1]
|
|
||||||
|
|
||||||
local result = {}
|
|
||||||
|
|
||||||
local line_pos = 0
|
|
||||||
|
|
||||||
for id, node, metadata in query:iter_captures(tree:root(), 0, linenr - 1, linenr) do
|
|
||||||
local name = query.captures[id]
|
|
||||||
local start_row, start_col, end_row, end_col = node:range()
|
|
||||||
|
|
||||||
local priority = tonumber(metadata.priority or vim.highlight.priorities.treesitter)
|
|
||||||
|
|
||||||
if start_row == linenr - 1 and end_row == linenr - 1 then
|
|
||||||
-- check for characters ignored by treesitter
|
|
||||||
if start_col > line_pos then
|
|
||||||
table.insert(result, {
|
|
||||||
line:sub(line_pos + 1, start_col),
|
|
||||||
{ { 'Folded', priority } },
|
|
||||||
range = { line_pos, start_col },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
line_pos = end_col
|
|
||||||
|
|
||||||
local text = line:sub(start_col + 1, end_col)
|
|
||||||
table.insert(result, { text, { { '@' .. name, priority } }, range = { start_col, end_col } })
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local i = 1
|
|
||||||
while i <= #result do
|
|
||||||
-- find first capture that is not in current range and apply highlights on the way
|
|
||||||
local j = i + 1
|
|
||||||
while j <= #result and result[j].range[1] >= result[i].range[1] and result[j].range[2] <= result[i].range[2] do
|
|
||||||
for k, v in ipairs(result[i][2]) do
|
|
||||||
if not vim.tbl_contains(result[j][2], v) then
|
|
||||||
table.insert(result[j][2], k, v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
j = j + 1
|
|
||||||
end
|
|
||||||
|
|
||||||
-- remove the parent capture if it is split into children
|
|
||||||
if j > i + 1 then
|
|
||||||
table.remove(result, i)
|
|
||||||
else
|
|
||||||
-- highlights need to be sorted by priority, on equal prio, the deeper nested capture (earlier
|
|
||||||
-- in list) should be considered higher prio
|
|
||||||
if #result[i][2] > 1 then
|
|
||||||
table.sort(result[i][2], function(a, b)
|
|
||||||
return a[2] < b[2]
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
result[i][2] = vim.tbl_map(function(tbl)
|
|
||||||
return tbl[1]
|
|
||||||
end, result[i][2])
|
|
||||||
result[i] = { result[i][1], result[i][2] }
|
|
||||||
|
|
||||||
i = i + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
function HighlightedFoldtext()
|
|
||||||
local result = parse_line(vim.v.foldstart)
|
|
||||||
if not result then
|
|
||||||
return vim.fn.foldtext()
|
|
||||||
end
|
|
||||||
|
|
||||||
local folded = {
|
|
||||||
{ ' ', 'FoldedIcon' },
|
|
||||||
{ '+' .. vim.v.foldend - vim.v.foldstart .. ' lines', 'FoldedText' },
|
|
||||||
{ ' ', 'FoldedIcon' },
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, item in ipairs(folded) do
|
|
||||||
table.insert(result, item)
|
|
||||||
end
|
|
||||||
|
|
||||||
local result2 = parse_line(vim.v.foldend)
|
|
||||||
if result2 then
|
|
||||||
local first = result2[1]
|
|
||||||
result2[1] = { vim.trim(first[1]), first[2] }
|
|
||||||
for _, item in ipairs(result2) do
|
|
||||||
table.insert(result, item)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
local function set_fold_hl()
|
|
||||||
local cl = vim.api.nvim_get_hl(0, { name = 'CursorLineNr' })
|
|
||||||
vim.api.nvim_set_hl(0, 'FoldedIcon', { fg = cl.bg })
|
|
||||||
vim.api.nvim_set_hl(0, 'FoldedText', { bg = cl.bg, fg = cl.fg, italic = true })
|
|
||||||
end
|
|
||||||
|
|
||||||
set_fold_hl()
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('ColorScheme', {
|
|
||||||
callback = set_fold_hl,
|
|
||||||
})
|
|
||||||
|
|
||||||
return 'luaeval("HighlightedFoldtext")()'
|
|
6
nvim/lua/plugins/colorscheme.lua
Normal file
6
nvim/lua/plugins/colorscheme.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "catppuccin-latte",
|
||||||
|
},
|
||||||
|
}
|
197
nvim/lua/plugins/example.lua
Normal file
197
nvim/lua/plugins/example.lua
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||||
|
-- stylua: ignore
|
||||||
|
if true then return {} end
|
||||||
|
|
||||||
|
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||||
|
--
|
||||||
|
-- In your plugin files, you can:
|
||||||
|
-- * add extra plugins
|
||||||
|
-- * disable/enabled LazyVim plugins
|
||||||
|
-- * override the configuration of LazyVim plugins
|
||||||
|
return {
|
||||||
|
-- add gruvbox
|
||||||
|
{ "ellisonleao/gruvbox.nvim" },
|
||||||
|
|
||||||
|
-- Configure LazyVim to load gruvbox
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "gruvbox",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- change trouble config
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
-- opts will be merged with the parent spec
|
||||||
|
opts = { use_diagnostic_signs = true },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- disable trouble
|
||||||
|
{ "folke/trouble.nvim", enabled = false },
|
||||||
|
|
||||||
|
-- override nvim-cmp and add cmp-emoji
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = { "hrsh7th/cmp-emoji" },
|
||||||
|
---@param opts cmp.ConfigSchema
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sources, { name = "emoji" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- change some telescope options and a keymap to browse plugin files
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
keys = {
|
||||||
|
-- add a keymap to browse plugin files
|
||||||
|
-- stylua: ignore
|
||||||
|
{
|
||||||
|
"<leader>fp",
|
||||||
|
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||||
|
desc = "Find Plugin File",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- change some options
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
layout_strategy = "horizontal",
|
||||||
|
layout_config = { prompt_position = "top" },
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
winblend = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add pyright to lspconfig
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
---@class PluginLspOpts
|
||||||
|
opts = {
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||||
|
pyright = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"jose-elias-alvarez/typescript.nvim",
|
||||||
|
init = function()
|
||||||
|
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||||
|
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
---@class PluginLspOpts
|
||||||
|
opts = {
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||||
|
tsserver = {},
|
||||||
|
},
|
||||||
|
-- you can do any additional lsp server setup here
|
||||||
|
-- return true if you don't want this server to be setup with lspconfig
|
||||||
|
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||||
|
setup = {
|
||||||
|
-- example to setup with typescript.nvim
|
||||||
|
tsserver = function(_, opts)
|
||||||
|
require("typescript").setup({ server = opts })
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
-- Specify * to use this function as a fallback for any server
|
||||||
|
-- ["*"] = function(server, opts) end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||||
|
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
|
||||||
|
-- add more treesitter parsers
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"python",
|
||||||
|
"query",
|
||||||
|
"regex",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vim",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||||
|
-- would overwrite `ensure_installed` with the new value.
|
||||||
|
-- If you'd rather extend the default config, use the code below instead:
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- add tsx and treesitter
|
||||||
|
vim.list_extend(opts.ensure_installed, {
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- the opts function can also be used to change the default opts:
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sections.lualine_x, {
|
||||||
|
function()
|
||||||
|
return "😄"
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- or you can return new options to override all the defaults
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
return {
|
||||||
|
--[[add your custom lualine config here]]
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- use mini.starter instead of alpha
|
||||||
|
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||||
|
|
||||||
|
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
|
||||||
|
-- add any tools you want to have installed below
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"stylua",
|
||||||
|
"shellcheck",
|
||||||
|
"shfmt",
|
||||||
|
"flake8",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
-- Resize window to prioritize the focused on.
|
-- Resize window to prioritize the focused on.
|
||||||
-- https://github.com/nvim-focus/focus.nvim
|
-- https://github.com/nvim-focus/focus.nvim
|
||||||
return {
|
return {
|
||||||
'nvim-focus/focus.nvim',
|
"nvim-focus/focus.nvim",
|
||||||
event = 'VeryLazy',
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
enable = true,
|
enable = true,
|
||||||
ui = {
|
ui = {
|
||||||
@ -14,13 +14,14 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require('focus').setup {}
|
require("focus").setup({})
|
||||||
|
|
||||||
local ignore_buftypes = { 'dbui' }
|
local ignore_buftypes = { "dbui", "nofile" }
|
||||||
local ignore_filetypes = { 'dbui', 'dapui_breakpoints', 'dapui_stacks', 'dapui_scopes', 'dap_repl', 'dapui_console' }
|
local ignore_filetypes =
|
||||||
local augroup = vim.api.nvim_create_augroup('FocusDisable', { clear = true })
|
{ "dbui", "dapui_breakpoints", "dapui_stacks", "dapui_scopes", "dap_repl", "dapui_console" }
|
||||||
|
local augroup = vim.api.nvim_create_augroup("FocusDisable", { clear = true })
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('WinEnter', {
|
vim.api.nvim_create_autocmd("WinEnter", {
|
||||||
group = augroup,
|
group = augroup,
|
||||||
callback = function(_)
|
callback = function(_)
|
||||||
if vim.tbl_contains(ignore_buftypes, vim.bo.buftype) then
|
if vim.tbl_contains(ignore_buftypes, vim.bo.buftype) then
|
||||||
@ -29,10 +30,10 @@ return {
|
|||||||
vim.w.focus_disable = false
|
vim.w.focus_disable = false
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
desc = 'Disable focus autoresize for BufType',
|
desc = "Disable focus autoresize for BufType",
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
group = augroup,
|
group = augroup,
|
||||||
callback = function(_)
|
callback = function(_)
|
||||||
if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then
|
if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then
|
||||||
@ -41,7 +42,7 @@ return {
|
|||||||
vim.b.focus_disable = false
|
vim.b.focus_disable = false
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
desc = 'Disable focus autoresize for FileType',
|
desc = "Disable focus autoresize for FileType",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
12
nvim/lua/plugins/lualine.lua
Normal file
12
nvim/lua/plugins/lualine.lua
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- Remove the git branch because it's already shown in tmux.
|
||||||
|
table.remove(opts.sections.lualine_b)
|
||||||
|
|
||||||
|
-- Remove the clock because I don't want it there.
|
||||||
|
table.remove(opts.sections.lualine_z)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
21
nvim/lua/plugins/test.lua
Normal file
21
nvim/lua/plugins/test.lua
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-neotest/neotest",
|
||||||
|
dependencies = {
|
||||||
|
"haydenmeade/neotest-jest",
|
||||||
|
},
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(
|
||||||
|
opts.adapters,
|
||||||
|
require("neotest-jest")({
|
||||||
|
jestCommand = "npm test",
|
||||||
|
jestConfigFile = "jest.config.ts",
|
||||||
|
-- env = { CI = true },
|
||||||
|
cwd = function()
|
||||||
|
return vim.fn.getcwd()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
18
nvim/lua/plugins/tmux-navigator.lua
Normal file
18
nvim/lua/plugins/tmux-navigator.lua
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
return {
|
||||||
|
"christoomey/vim-tmux-navigator",
|
||||||
|
cmd = {
|
||||||
|
"TmuxNavigateLeft",
|
||||||
|
"TmuxNavigateDown",
|
||||||
|
"TmuxNavigateUp",
|
||||||
|
"TmuxNavigateRight",
|
||||||
|
"TmuxNavigatePrevious",
|
||||||
|
"TmuxNavigatorProcessList",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||||
|
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||||
|
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||||
|
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||||
|
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||||
|
},
|
||||||
|
}
|
3
nvim/stylua.toml
Normal file
3
nvim/stylua.toml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
column_width = 120
|
Reference in New Issue
Block a user