Compare commits
29 Commits
b7d285a2a9
...
main
Author | SHA1 | Date | |
---|---|---|---|
95de6305b1 | |||
42928d5278 | |||
3a00d05aca | |||
04d819cfcf | |||
fda45f7bfc | |||
1253334a04 | |||
565a52b09d | |||
75d3e2ea95 | |||
db8c557fc4 | |||
c38317bb26 | |||
23b6233e72 | |||
b74afe39cd | |||
f891193f67 | |||
765bc09de1 | |||
374dc740e2 | |||
cf23989901 | |||
a138bc0451 | |||
052b2f991f | |||
8d1acc7550 | |||
c49c50b6af | |||
9351c8137f | |||
8c4334b66d | |||
38e098ac82 | |||
0fa11e05a5 | |||
deacba1fe8 | |||
6821c4db3f | |||
118bd28e2b | |||
3fbc03a5ca | |||
d1eb398c2e |
5
.bashrc
5
.bashrc
@ -28,6 +28,10 @@ if [ "$BASH" != "" ]; then
|
|||||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||||
. /etc/bash_completion
|
. /etc/bash_completion
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/share/bash-completion/completions/git ]; then
|
||||||
|
source /usr/share/bash-completion/completions/git
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${OSTYPE}" == "linux-gnu"* ]]; then
|
if [[ "${OSTYPE}" == "linux-gnu"* ]]; then
|
||||||
@ -178,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
|
||||||
|
3
.lazygit
3
.lazygit
@ -3,8 +3,11 @@ customCommands:
|
|||||||
context: 'global'
|
context: 'global'
|
||||||
command: 'git push --force-with-lease'
|
command: 'git push --force-with-lease'
|
||||||
description: 'Force push with lease.'
|
description: 'Force push with lease.'
|
||||||
|
os:
|
||||||
|
editPreset: "vscode"
|
||||||
gui:
|
gui:
|
||||||
timeFormat: '2006-01-02'
|
timeFormat: '2006-01-02'
|
||||||
|
nerdFontsVersion: '3'
|
||||||
mouseEvents: false
|
mouseEvents: false
|
||||||
theme:
|
theme:
|
||||||
activeBorderColor:
|
activeBorderColor:
|
||||||
|
@ -71,7 +71,7 @@ set -g @catppuccin_window_status_enable "no"
|
|||||||
|
|
||||||
# List of plugins
|
# List of plugins
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
# set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
set -g @plugin 'catppuccin/tmux'
|
set -g @plugin 'catppuccin/tmux'
|
||||||
|
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||||
|
@ -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:
|
|
997
nvim/init.lua
997
nvim/init.lua
@ -1,995 +1,2 @@
|
|||||||
--[[
|
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
|
require("config.lazy")
|
||||||
What is Kickstart?
|
|
||||||
|
|
||||||
Kickstart.nvim is *not* a distribution.
|
|
||||||
|
|
||||||
Kickstart.nvim is a starting point for your own configuration.
|
|
||||||
The goal is that you can read every line of code, top-to-bottom, understand
|
|
||||||
what your configuration is doing, and modify it to suit your needs.
|
|
||||||
|
|
||||||
Once you've done that, you can start exploring, configuring and tinkering to
|
|
||||||
make Neovim your own! That might mean leaving Kickstart just the way it is for a while
|
|
||||||
or immediately breaking it into modular pieces. It's up to you!
|
|
||||||
|
|
||||||
If you don't know anything about Lua, I recommend taking some time to read through
|
|
||||||
a guide. One possible example which will only take 10-15 minutes:
|
|
||||||
- https://learnxinyminutes.com/docs/lua/
|
|
||||||
|
|
||||||
After understanding a bit more about Lua, you can use `:help lua-guide` as a
|
|
||||||
reference for how Neovim integrates Lua.
|
|
||||||
- :help lua-guide
|
|
||||||
- (or HTML version): https://neovim.io/doc/user/lua-guide.html
|
|
||||||
|
|
||||||
Kickstart Guide:
|
|
||||||
|
|
||||||
First, run AND READ `:help`.
|
|
||||||
This will open up a help window with some basic information
|
|
||||||
about reading, navigating and searching the builtin help documentation.
|
|
||||||
|
|
||||||
This should be the first place you go to look when you're stuck or confused
|
|
||||||
with something. It's one of my favorite Neovim features.
|
|
||||||
|
|
||||||
MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
|
|
||||||
which is very useful when you're not exactly sure of what you're looking for.
|
|
||||||
|
|
||||||
I have left several `:help X` comments throughout the init.lua
|
|
||||||
These are hints about where to find more information about the relevant settings,
|
|
||||||
plugins or Neovim features used in Kickstart.
|
|
||||||
|
|
||||||
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
|
|
||||||
|
|
||||||
NOTE: Updated to 4120893
|
|
||||||
https://github.com/nvim-lua/kickstart.nvim/compare/4120893..master
|
|
||||||
|
|
||||||
--]]
|
|
||||||
|
|
||||||
-- Set <space> as the leader key
|
|
||||||
-- See `:help mapleader`
|
|
||||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
vim.g.maplocalleader = ' '
|
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
|
||||||
vim.g.have_nerd_font = true
|
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
|
||||||
-- See `:help vim.opt`
|
|
||||||
-- NOTE: You can change these options as you wish!
|
|
||||||
-- For more options, you can see `:help option-list`
|
|
||||||
|
|
||||||
-- Make line numbers default
|
|
||||||
vim.opt.number = true
|
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
|
||||||
-- Experiment for yourself to see if you like it!
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
|
||||||
vim.opt.mouse = 'a'
|
|
||||||
|
|
||||||
-- Don't show the mode, since it's already in the status line
|
|
||||||
vim.opt.showmode = false
|
|
||||||
|
|
||||||
-- Sync clipboard between OS and Neovim.
|
|
||||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
|
||||||
-- Remove this option if you want your OS clipboard to remain independent.
|
|
||||||
-- See `:help 'clipboard'`
|
|
||||||
vim.schedule(function()
|
|
||||||
vim.opt.clipboard = 'unnamedplus'
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Display tabs as 2 spaces
|
|
||||||
vim.opt.tabstop = 2
|
|
||||||
|
|
||||||
-- Enable break indent
|
|
||||||
vim.opt.breakindent = true
|
|
||||||
|
|
||||||
-- Save undo history
|
|
||||||
vim.opt.undofile = true
|
|
||||||
|
|
||||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
|
||||||
vim.opt.ignorecase = true
|
|
||||||
vim.opt.smartcase = true
|
|
||||||
|
|
||||||
-- Keep signcolumn on by default
|
|
||||||
vim.opt.signcolumn = 'yes'
|
|
||||||
|
|
||||||
-- Decrease update time
|
|
||||||
vim.opt.updatetime = 250
|
|
||||||
|
|
||||||
-- Configure how new splits should be opened
|
|
||||||
vim.opt.splitright = true
|
|
||||||
vim.opt.splitbelow = true
|
|
||||||
|
|
||||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
|
||||||
-- See `:help 'list'`
|
|
||||||
-- and `:help 'listchars'`
|
|
||||||
vim.opt.list = true
|
|
||||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
|
||||||
|
|
||||||
-- Preview substitutions live, as you type!
|
|
||||||
vim.opt.inccommand = 'split'
|
|
||||||
|
|
||||||
-- Show which line your cursor is on
|
|
||||||
vim.opt.cursorline = true
|
|
||||||
|
|
||||||
-- Minimal number of screen lines to keep above and below the cursor.
|
|
||||||
vim.opt.scrolloff = 10
|
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
|
||||||
-- See `:help vim.keymap.set()`
|
|
||||||
|
|
||||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
|
||||||
-- See `:help hlsearch`
|
|
||||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|
||||||
|
|
||||||
-- Diagnostic keymaps
|
|
||||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
|
||||||
|
|
||||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
|
||||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
|
||||||
-- is not what someone will guess without a bit more experience.
|
|
||||||
--
|
|
||||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
|
||||||
-- or just use <C-\><C-n> to exit terminal mode
|
|
||||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
|
||||||
|
|
||||||
-- TIP: Disable arrow keys in normal mode
|
|
||||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
|
||||||
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
|
||||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
|
||||||
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
|
||||||
|
|
||||||
-- Keybinds to make split navigation easier.
|
|
||||||
-- Use CTRL+<hjkl> to switch between windows
|
|
||||||
--
|
|
||||||
-- 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-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
|
||||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
|
||||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
|
||||||
|
|
||||||
-- [[ Utility functions ]]
|
|
||||||
|
|
||||||
-- Retreive selected text from the editor.
|
|
||||||
function vim.getVisualSelection()
|
|
||||||
vim.cmd 'noau normal! "vy"'
|
|
||||||
local text = vim.fn.getreg 'v'
|
|
||||||
vim.fn.setreg('v', {})
|
|
||||||
|
|
||||||
text = string.gsub(text, '\n', '')
|
|
||||||
if #text > 0 then
|
|
||||||
return text
|
|
||||||
else
|
|
||||||
return ''
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- [[ Basic Autocommands ]]
|
|
||||||
-- See `:help lua-guide-autocommands`
|
|
||||||
|
|
||||||
-- Highlight when yanking (copying) text
|
|
||||||
-- Try it with `yap` in normal mode
|
|
||||||
-- See `:help vim.highlight.on_yank()`
|
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
|
||||||
desc = 'Highlight when yanking (copying) text',
|
|
||||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
|
||||||
callback = function()
|
|
||||||
vim.highlight.on_yank()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Trim trailing whitespace on save.
|
|
||||||
vim.api.nvim_create_autocmd({ 'BufWritePre' }, {
|
|
||||||
pattern = { '*' },
|
|
||||||
command = [[%s/\s\+$//e]],
|
|
||||||
})
|
|
||||||
|
|
||||||
-- [[ Install `lazy.nvim` plugin manager ]]
|
|
||||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
|
||||||
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
|
|
||||||
error('Error cloning lazy.nvim:\n' .. out)
|
|
||||||
end
|
|
||||||
end ---@diagnostic disable-next-line: undefined-field
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
-- [[ Configure and install plugins ]]
|
|
||||||
--
|
|
||||||
-- To check the current status of your plugins, run
|
|
||||||
-- :Lazy
|
|
||||||
--
|
|
||||||
-- You can press `?` in this menu for help. Use `:q` to close the window
|
|
||||||
--
|
|
||||||
-- To update plugins you can run
|
|
||||||
-- :Lazy update
|
|
||||||
--
|
|
||||||
-- NOTE: Here is where you install your plugins.
|
|
||||||
require('lazy').setup({
|
|
||||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
|
||||||
|
|
||||||
-- Use `opts = {}` to force a plugin to be loaded.
|
|
||||||
|
|
||||||
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
|
||||||
--
|
|
||||||
-- This is often very useful to both group configuration, as well as handle
|
|
||||||
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
|
||||||
--
|
|
||||||
-- For example, in the following configuration, we use:
|
|
||||||
-- event = 'VimEnter'
|
|
||||||
--
|
|
||||||
-- which loads which-key before all the UI elements are loaded. Events can be
|
|
||||||
-- normal autocommands events (`:help autocmd-events`).
|
|
||||||
--
|
|
||||||
-- Then, because we use the `config` key, the configuration only runs
|
|
||||||
-- after the plugin has been loaded:
|
|
||||||
-- config = function() ... end
|
|
||||||
|
|
||||||
{ -- Useful plugin to show you pending keybinds.
|
|
||||||
'folke/which-key.nvim',
|
|
||||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
|
||||||
opts = {
|
|
||||||
icons = {
|
|
||||||
delay = 50,
|
|
||||||
|
|
||||||
-- set icon mappings to true if you have a Nerd Font
|
|
||||||
mappings = vim.g.have_nerd_font,
|
|
||||||
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
|
|
||||||
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
|
|
||||||
keys = vim.g.have_nerd_font and {} or {
|
|
||||||
Up = '<Up> ',
|
|
||||||
Down = '<Down> ',
|
|
||||||
Left = '<Left> ',
|
|
||||||
Right = '<Right> ',
|
|
||||||
C = '<C-…> ',
|
|
||||||
M = '<M-…> ',
|
|
||||||
D = '<D-…> ',
|
|
||||||
S = '<S-…> ',
|
|
||||||
CR = '<CR> ',
|
|
||||||
Esc = '<Esc> ',
|
|
||||||
ScrollWheelDown = '<ScrollWheelDown> ',
|
|
||||||
ScrollWheelUp = '<ScrollWheelUp> ',
|
|
||||||
NL = '<NL> ',
|
|
||||||
BS = '<BS> ',
|
|
||||||
Space = '<Space> ',
|
|
||||||
Tab = '<Tab> ',
|
|
||||||
F1 = '<F1>',
|
|
||||||
F2 = '<F2>',
|
|
||||||
F3 = '<F3>',
|
|
||||||
F4 = '<F4>',
|
|
||||||
F5 = '<F5>',
|
|
||||||
F6 = '<F6>',
|
|
||||||
F7 = '<F7>',
|
|
||||||
F8 = '<F8>',
|
|
||||||
F9 = '<F9>',
|
|
||||||
F10 = '<F10>',
|
|
||||||
F11 = '<F11>',
|
|
||||||
F12 = '<F12>',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Document existing key chains
|
|
||||||
spec = {
|
|
||||||
{ '<leader>a', group = '[A]i', mode = { 'n', 'v' } },
|
|
||||||
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
|
||||||
{ '<leader>d', group = '[D]ocument' },
|
|
||||||
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
|
||||||
{ '<leader>p', group = '[P]review' },
|
|
||||||
{ '<leader>r', group = '[R]ename' },
|
|
||||||
{ '<leader>s', group = '[S]earch' },
|
|
||||||
{ '<leader>t', group = '[T]oggle' },
|
|
||||||
{ '<leader>w', group = '[W]orkspace' },
|
|
||||||
{ '<leader>x', group = 'Trouble [X]' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Fuzzy Finder (files, lsp, etc)
|
|
||||||
'nvim-telescope/telescope.nvim',
|
|
||||||
event = 'VimEnter',
|
|
||||||
branch = '0.1.x',
|
|
||||||
dependencies = {
|
|
||||||
'nvim-lua/plenary.nvim',
|
|
||||||
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
|
||||||
'nvim-telescope/telescope-fzf-native.nvim',
|
|
||||||
|
|
||||||
-- `build` is used to run some command when the plugin is installed/updated.
|
|
||||||
-- This is only run then, not every time Neovim starts up.
|
|
||||||
build = 'make',
|
|
||||||
|
|
||||||
-- `cond` is a condition used to determine whether this plugin should be
|
|
||||||
-- installed and loaded.
|
|
||||||
cond = function()
|
|
||||||
return vim.fn.executable 'make' == 1
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
|
||||||
{ 'nvim-telescope/telescope-live-grep-args.nvim' },
|
|
||||||
|
|
||||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
|
||||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
|
||||||
-- it can fuzzy find! It's more than just a "file finder", it can search
|
|
||||||
-- many different aspects of Neovim, your workspace, LSP, and more!
|
|
||||||
--
|
|
||||||
-- The easiest way to use Telescope, is to start by doing something like:
|
|
||||||
-- :Telescope help_tags
|
|
||||||
--
|
|
||||||
-- After running this command, a window will open up and you're able to
|
|
||||||
-- type in the prompt window. You'll see a list of `help_tags` options and
|
|
||||||
-- a corresponding preview of the help.
|
|
||||||
--
|
|
||||||
-- Two important keymaps to use while in Telescope are:
|
|
||||||
-- - Insert mode: <c-/>
|
|
||||||
-- - Normal mode: ?
|
|
||||||
--
|
|
||||||
-- This opens a window that shows you all of the keymaps for the current
|
|
||||||
-- Telescope picker. This is really useful to discover what Telescope can
|
|
||||||
-- do as well as how to actually do it!
|
|
||||||
|
|
||||||
-- [[ Configure Telescope ]]
|
|
||||||
-- See `:help telescope` and `:help telescope.setup()`
|
|
||||||
require('telescope').setup {
|
|
||||||
-- You can put your default mappings / updates / etc. in here
|
|
||||||
-- All the info you're looking for is in `:help telescope.setup()`
|
|
||||||
--
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
n = {
|
|
||||||
-- Add action to delete a buffer from the Telescope list
|
|
||||||
['<c-d>'] = require('telescope.actions').delete_buffer,
|
|
||||||
},
|
|
||||||
i = {
|
|
||||||
-- ['<c-enter>'] = 'to_fuzzy_refine',
|
|
||||||
|
|
||||||
-- Add action to delete a buffer from the Telescope list
|
|
||||||
['<c-d>'] = require('telescope.actions').delete_buffer,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- pickers = {}
|
|
||||||
extensions = {
|
|
||||||
['ui-select'] = {
|
|
||||||
require('telescope.themes').get_dropdown(),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Enable Telescope extensions if they are installed
|
|
||||||
pcall(require('telescope').load_extension, 'fzf')
|
|
||||||
pcall(require('telescope').load_extension, 'ui-select')
|
|
||||||
pcall(require('telescope').load_extension 'live_grep_args')
|
|
||||||
|
|
||||||
local live_grep_args = require('telescope').extensions.live_grep_args
|
|
||||||
|
|
||||||
-- See `:help telescope.builtin`
|
|
||||||
local builtin = require 'telescope.builtin'
|
|
||||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
|
||||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
|
||||||
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
|
||||||
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
|
||||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
|
||||||
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
|
||||||
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
|
||||||
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
|
||||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
|
||||||
|
|
||||||
-- vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
|
||||||
vim.keymap.set('n', '<leader>s.', function()
|
|
||||||
builtin.oldfiles {
|
|
||||||
cwd_only = true,
|
|
||||||
}
|
|
||||||
end, { desc = '[S]earch Recent Files in CWD' })
|
|
||||||
|
|
||||||
vim.keymap.set('v', '<leader>g', function()
|
|
||||||
builtin.grep_string {
|
|
||||||
search = vim.getVisualSelection(),
|
|
||||||
prompt_title = 'Grep all files',
|
|
||||||
}
|
|
||||||
end, { desc = '[G]rep everywhere' })
|
|
||||||
|
|
||||||
-- Slightly advanced example of overriding default behavior and theme
|
|
||||||
vim.keymap.set('n', '<leader>/', function()
|
|
||||||
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
|
||||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
|
||||||
winblend = 10,
|
|
||||||
previewer = false,
|
|
||||||
})
|
|
||||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
|
||||||
|
|
||||||
-- It's also possible to pass additional configuration options.
|
|
||||||
-- See `:help telescope.builtin.live_grep()` for information about particular keys
|
|
||||||
vim.keymap.set('n', '<leader>s/', function()
|
|
||||||
builtin.live_grep {
|
|
||||||
grep_open_files = true,
|
|
||||||
prompt_title = 'Live Grep in Open Files',
|
|
||||||
}
|
|
||||||
end, { desc = '[S]earch [/] in Open Files' })
|
|
||||||
|
|
||||||
-- Shortcut for searching your Neovim configuration files
|
|
||||||
vim.keymap.set('n', '<leader>sn', function()
|
|
||||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
|
||||||
end, { desc = '[S]earch [N]eovim files' })
|
|
||||||
|
|
||||||
-- Search for TODO items in the current file
|
|
||||||
vim.keymap.set('n', '<leader>sT', function()
|
|
||||||
live_grep_args.live_grep_args {
|
|
||||||
default_text = '(TODO|XXX):.*',
|
|
||||||
search_dirs = { vim.fn.expand '%' },
|
|
||||||
}
|
|
||||||
end, { desc = '[S]earch [T]odo current file' })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- LSP Plugins
|
|
||||||
{
|
|
||||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
|
||||||
-- used for completion, annotations and signatures of Neovim apis
|
|
||||||
'folke/lazydev.nvim',
|
|
||||||
ft = 'lua',
|
|
||||||
opts = {
|
|
||||||
library = {
|
|
||||||
-- Load luvit types when the `vim.uv` word is found
|
|
||||||
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ 'Bilal2453/luvit-meta', lazy = true },
|
|
||||||
{
|
|
||||||
-- Main LSP Configuration
|
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
dependencies = {
|
|
||||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
|
||||||
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
|
|
||||||
'williamboman/mason-lspconfig.nvim',
|
|
||||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
|
||||||
|
|
||||||
-- Useful status updates for LSP.
|
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
|
||||||
|
|
||||||
-- Allows extra capabilities provided by nvim-cmp
|
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- LSP provides Neovim with features like:
|
|
||||||
-- - Go to definition
|
|
||||||
-- - Find references
|
|
||||||
-- - Autocompletion
|
|
||||||
-- - Symbol Search
|
|
||||||
-- - and more!
|
|
||||||
--
|
|
||||||
-- Thus, Language Servers are external tools that must be installed separately from
|
|
||||||
-- Neovim. This is where `mason` and related plugins come into play.
|
|
||||||
--
|
|
||||||
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
|
|
||||||
-- and elegantly composed help section, `:help lsp-vs-treesitter`
|
|
||||||
|
|
||||||
-- This function gets run when an LSP attaches to a particular buffer.
|
|
||||||
-- That is to say, every time a new file is opened that is associated with
|
|
||||||
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
|
|
||||||
-- function will be executed to configure the current buffer
|
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
|
||||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
|
||||||
callback = function(event)
|
|
||||||
-- Create a function that lets us more easily define mappings specific
|
|
||||||
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
|
||||||
local map = function(keys, func, desc, mode)
|
|
||||||
mode = mode or 'n'
|
|
||||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Jump to the definition of the word under your cursor.
|
|
||||||
-- This is where a variable was first declared, or where a function is defined, etc.
|
|
||||||
-- To jump back, press <C-t>.
|
|
||||||
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
|
||||||
|
|
||||||
-- Find references for the word under your cursor.
|
|
||||||
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
|
||||||
|
|
||||||
-- Jump to the implementation of the word under your cursor.
|
|
||||||
-- Useful when your language has ways of declaring types without an actual implementation.
|
|
||||||
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
|
||||||
|
|
||||||
-- Jump to the type of the word under your cursor.
|
|
||||||
-- Useful when you're not sure what type a variable is and you want to see
|
|
||||||
-- the definition of its *type*, not where it was *defined*.
|
|
||||||
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
|
||||||
|
|
||||||
-- Fuzzy find all the symbols in your current document.
|
|
||||||
-- Symbols are things like variables, functions, types, etc.
|
|
||||||
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
|
||||||
|
|
||||||
-- Fuzzy find all the symbols in your current workspace.
|
|
||||||
-- Similar to document symbols, except searches over your entire project.
|
|
||||||
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
|
||||||
|
|
||||||
-- Rename the variable under your cursor.
|
|
||||||
-- Most Language Servers support renaming across files, etc.
|
|
||||||
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
|
|
||||||
-- or a suggestion from your LSP for this to activate.
|
|
||||||
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
|
|
||||||
|
|
||||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
|
||||||
-- For example, in C this would take you to the header.
|
|
||||||
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
|
||||||
|
|
||||||
-- The following two autocommands are used to highlight references of the
|
|
||||||
-- word under your cursor when your cursor rests there for a little while.
|
|
||||||
-- See `:help CursorHold` for information about when this is executed
|
|
||||||
--
|
|
||||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
|
||||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
|
||||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
|
||||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
|
||||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
|
||||||
buffer = event.buf,
|
|
||||||
group = highlight_augroup,
|
|
||||||
callback = vim.lsp.buf.document_highlight,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
|
||||||
buffer = event.buf,
|
|
||||||
group = highlight_augroup,
|
|
||||||
callback = vim.lsp.buf.clear_references,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('LspDetach', {
|
|
||||||
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
|
||||||
callback = function(event2)
|
|
||||||
vim.lsp.buf.clear_references()
|
|
||||||
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- The following code creates a keymap to toggle inlay hints in your
|
|
||||||
-- code, if the language server you are using supports them
|
|
||||||
--
|
|
||||||
-- This may be unwanted, since they displace some of your code
|
|
||||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
|
||||||
map('<leader>th', function()
|
|
||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
|
||||||
end, '[T]oggle Inlay [H]ints')
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- LSP servers and clients are able to communicate to each other what features they support.
|
|
||||||
-- 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.
|
|
||||||
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
||||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
|
||||||
|
|
||||||
-- Enable the following language servers
|
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
|
||||||
--
|
|
||||||
-- Add any additional override configuration in the following tables. Available keys are:
|
|
||||||
-- - cmd (table): Override the default command used to start the server
|
|
||||||
-- - filetypes (table): Override the default list of associated filetypes for the server
|
|
||||||
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
|
||||||
-- - 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/
|
|
||||||
--
|
|
||||||
-- See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
|
||||||
local servers = {
|
|
||||||
gopls = {
|
|
||||||
gofumpt = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
html = {},
|
|
||||||
|
|
||||||
templ = {},
|
|
||||||
|
|
||||||
-- 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 (`ts_ls`) will work just fine
|
|
||||||
ts_ls = {},
|
|
||||||
|
|
||||||
eslint_d = {},
|
|
||||||
tailwindcss = {},
|
|
||||||
|
|
||||||
lua_ls = {
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
completion = {
|
|
||||||
callSnippet = 'Replace',
|
|
||||||
},
|
|
||||||
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
|
||||||
-- diagnostics = { disable = { 'missing-fields' } },
|
|
||||||
telemetry = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
|
||||||
-- To check the current status of installed tools and/or manually install
|
|
||||||
-- other tools, you can run
|
|
||||||
-- :Mason
|
|
||||||
--
|
|
||||||
-- You can press `g?` for help in this menu.
|
|
||||||
require('mason').setup()
|
|
||||||
|
|
||||||
-- You can add other tools here that you want Mason to install
|
|
||||||
-- for you, so that they are available from within Neovim.
|
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
|
||||||
vim.list_extend(ensure_installed, {
|
|
||||||
'stylua', -- Used to format Lua code
|
|
||||||
'goimports', -- Used to format Go code
|
|
||||||
'gofumpt', -- Used to format Go code
|
|
||||||
})
|
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
|
||||||
handlers = {
|
|
||||||
function(server_name)
|
|
||||||
local server = servers[server_name] or {}
|
|
||||||
-- This handles overriding only values explicitly passed
|
|
||||||
-- by the server configuration above. Useful when disabling
|
|
||||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
|
||||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
|
||||||
require('lspconfig')[server_name].setup(server)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Autoformat
|
|
||||||
'stevearc/conform.nvim',
|
|
||||||
event = { 'BufWritePre' },
|
|
||||||
cmd = { 'ConformInfo' },
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
'<leader>f',
|
|
||||||
function()
|
|
||||||
require('conform').format { async = true }
|
|
||||||
end,
|
|
||||||
mode = '',
|
|
||||||
desc = '[F]ormat buffer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
notify_on_error = false,
|
|
||||||
format_on_save = function(bufnr)
|
|
||||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
|
||||||
-- have a well standardized coding style. You can add additional
|
|
||||||
-- languages here or re-enable it for the disabled ones.
|
|
||||||
local disable_filetypes = { c = true, cpp = true }
|
|
||||||
local lsp_format_opt
|
|
||||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
|
||||||
lsp_format_opt = 'never'
|
|
||||||
else
|
|
||||||
lsp_format_opt = 'fallback'
|
|
||||||
end
|
|
||||||
return {
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_format = lsp_format_opt,
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
formatters_by_ft = {
|
|
||||||
go = { 'goimports', 'gofumpt' },
|
|
||||||
lua = { 'stylua' },
|
|
||||||
templ = { 'templ' },
|
|
||||||
typescript = { 'eslint_d' },
|
|
||||||
-- Conform can also run multiple formatters sequentially
|
|
||||||
-- python = { "isort", "black" },
|
|
||||||
--
|
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
|
||||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Autocompletion
|
|
||||||
'hrsh7th/nvim-cmp',
|
|
||||||
event = 'InsertEnter',
|
|
||||||
dependencies = {
|
|
||||||
-- Snippet Engine & its associated nvim-cmp source
|
|
||||||
{
|
|
||||||
'L3MON4D3/LuaSnip',
|
|
||||||
build = (function()
|
|
||||||
-- Build Step is needed for regex support in snippets.
|
|
||||||
-- This step is not supported in many windows environments.
|
|
||||||
-- Remove the below condition to re-enable on windows.
|
|
||||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
return 'make install_jsregexp'
|
|
||||||
end)(),
|
|
||||||
dependencies = {
|
|
||||||
-- `friendly-snippets` contains a variety of premade snippets.
|
|
||||||
-- See the README about individual language/framework/plugin snippets:
|
|
||||||
-- https://github.com/rafamadriz/friendly-snippets
|
|
||||||
{
|
|
||||||
'rafamadriz/friendly-snippets',
|
|
||||||
config = function()
|
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'saadparwaiz1/cmp_luasnip',
|
|
||||||
|
|
||||||
-- Adds other completion capabilities.
|
|
||||||
-- nvim-cmp does not ship with all sources by default. They are split
|
|
||||||
-- into multiple repos for maintenance purposes.
|
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
|
||||||
'hrsh7th/cmp-path',
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- See `:help cmp`
|
|
||||||
local cmp = require 'cmp'
|
|
||||||
local luasnip = require 'luasnip'
|
|
||||||
luasnip.config.setup {}
|
|
||||||
|
|
||||||
cmp.setup {
|
|
||||||
window = {
|
|
||||||
-- Optionally add a border to the completions windows.
|
|
||||||
-- Does not affect the <shift>-k window.
|
|
||||||
-- completion = cmp.config.window.bordered(),
|
|
||||||
-- documentation = cmp.config.window.bordered(),
|
|
||||||
},
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
completion = { completeopt = 'menu,menuone,noinsert' },
|
|
||||||
|
|
||||||
-- For an understanding of why these mappings were
|
|
||||||
-- chosen, you will need to read `:help ins-completion`
|
|
||||||
--
|
|
||||||
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
|
||||||
mapping = cmp.mapping.preset.insert {
|
|
||||||
-- Select the [n]ext item
|
|
||||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
|
||||||
-- Select the [p]revious item
|
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
|
||||||
|
|
||||||
-- Scroll the documentation window [b]ack / [f]orward
|
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
|
||||||
|
|
||||||
-- Accept ([y]es) the completion.
|
|
||||||
-- This will auto-import if your LSP supports it.
|
|
||||||
-- This will expand snippets if the LSP sent a snippet.
|
|
||||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
|
||||||
|
|
||||||
-- If you prefer more traditional completion keymaps,
|
|
||||||
-- you can uncomment the following lines
|
|
||||||
--['<CR>'] = cmp.mapping.confirm { select = true },
|
|
||||||
--['<Tab>'] = cmp.mapping.select_next_item(),
|
|
||||||
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
|
||||||
|
|
||||||
-- Manually trigger a completion from nvim-cmp.
|
|
||||||
-- Generally you don't need this, because nvim-cmp will display
|
|
||||||
-- completions whenever it has completion options available.
|
|
||||||
['<C-Space>'] = cmp.mapping.complete {},
|
|
||||||
|
|
||||||
-- Think of <c-l> as moving to the right of your snippet expansion.
|
|
||||||
-- So if you have a snippet that's like:
|
|
||||||
-- function $name($args)
|
|
||||||
-- $body
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- <c-l> will move you to the right of each of the expansion locations.
|
|
||||||
-- <c-h> is similar, except moving you backwards.
|
|
||||||
['<C-l>'] = cmp.mapping(function()
|
|
||||||
if luasnip.expand_or_locally_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
end
|
|
||||||
end, { 'i', 's' }),
|
|
||||||
['<C-h>'] = cmp.mapping(function()
|
|
||||||
if luasnip.locally_jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
end
|
|
||||||
end, { 'i', 's' }),
|
|
||||||
|
|
||||||
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
|
||||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
|
||||||
},
|
|
||||||
sources = {
|
|
||||||
{
|
|
||||||
name = 'lazydev',
|
|
||||||
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
|
||||||
group_index = 0,
|
|
||||||
},
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
{ name = 'luasnip' },
|
|
||||||
{ name = 'path' },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
'ray-x/lsp_signature.nvim',
|
|
||||||
event = 'VeryLazy',
|
|
||||||
opts = {
|
|
||||||
hint_enable = false,
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require('lsp_signature').setup(opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
-- Set the colorscheme.
|
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
|
||||||
'catppuccin/nvim',
|
|
||||||
name = 'catppuccin',
|
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
|
||||||
opts = {
|
|
||||||
flavour = 'latte',
|
|
||||||
integrations = {
|
|
||||||
cmp = true,
|
|
||||||
dap = true,
|
|
||||||
diffview = true,
|
|
||||||
gitsigns = true,
|
|
||||||
mason = true,
|
|
||||||
native_lsp = {
|
|
||||||
enabled = true,
|
|
||||||
virtual_text = {
|
|
||||||
errors = { 'italic' },
|
|
||||||
hints = { 'italic' },
|
|
||||||
warnings = { 'italic' },
|
|
||||||
information = { 'italic' },
|
|
||||||
ok = { 'italic' },
|
|
||||||
},
|
|
||||||
underlines = {
|
|
||||||
errors = { 'underline' },
|
|
||||||
hints = { 'underline' },
|
|
||||||
warnings = { 'underline' },
|
|
||||||
information = { 'underline' },
|
|
||||||
ok = { 'underline' },
|
|
||||||
},
|
|
||||||
inlay_hints = {
|
|
||||||
background = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
telescope = true,
|
|
||||||
which_key = true,
|
|
||||||
},
|
|
||||||
custom_highlights = function(C)
|
|
||||||
return {
|
|
||||||
WinSeparator = { fg = C.pink },
|
|
||||||
NormalFloat = { bg = C.crust },
|
|
||||||
Pmenu = { bg = C.crust },
|
|
||||||
PmenuSel = { fg = C.text, bg = C.surface0, style = { 'bold' } },
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
vim.cmd.colorscheme 'catppuccin'
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{ -- Collection of various small independent plugins/modules
|
|
||||||
'echasnovski/mini.nvim',
|
|
||||||
config = function()
|
|
||||||
-- Better Around/Inside textobjects
|
|
||||||
--
|
|
||||||
-- Examples:
|
|
||||||
-- - va) - [V]isually select [A]round [)]paren
|
|
||||||
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
|
||||||
-- - ci' - [C]hange [I]nside [']quote
|
|
||||||
require('mini.ai').setup { n_lines = 500 }
|
|
||||||
|
|
||||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
|
||||||
--
|
|
||||||
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
|
||||||
-- - sd' - [S]urround [D]elete [']quotes
|
|
||||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
|
||||||
require('mini.surround').setup()
|
|
||||||
|
|
||||||
-- Expand and collapse object definitions.
|
|
||||||
require('mini.splitjoin').setup {
|
|
||||||
mappings = {
|
|
||||||
-- Remove default mapping
|
|
||||||
toggle = '',
|
|
||||||
},
|
|
||||||
|
|
||||||
vim.keymap.set('n', 'gs', '<cmd>lua MiniSplitjoin.toggle()<CR>', { desc = '[S]plitjoin toggle' }),
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Startup dashboard
|
|
||||||
require('mini.starter').setup {
|
|
||||||
footer = '',
|
|
||||||
}
|
|
||||||
|
|
||||||
-- ... and there is more!
|
|
||||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ -- Highlight, edit, and navigate code
|
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
build = ':TSUpdate',
|
|
||||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
'bash',
|
|
||||||
'diff',
|
|
||||||
'html',
|
|
||||||
'lua',
|
|
||||||
'luadoc',
|
|
||||||
'markdown',
|
|
||||||
'markdown_inline',
|
|
||||||
'query',
|
|
||||||
'vim',
|
|
||||||
'vimdoc',
|
|
||||||
'sql',
|
|
||||||
'go',
|
|
||||||
'templ',
|
|
||||||
'typescript',
|
|
||||||
'javascript',
|
|
||||||
},
|
|
||||||
-- Autoinstall languages that are not installed
|
|
||||||
auto_install = true,
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
|
||||||
-- If you are experiencing weird indenting issues, add the language to
|
|
||||||
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
|
||||||
additional_vim_regex_highlighting = { 'ruby' },
|
|
||||||
},
|
|
||||||
indent = { enable = true, disable = { 'ruby' } },
|
|
||||||
},
|
|
||||||
-- There are additional nvim-treesitter modules that you can use to interact
|
|
||||||
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
|
||||||
--
|
|
||||||
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
|
||||||
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
||||||
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
|
||||||
},
|
|
||||||
--
|
|
||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
|
||||||
--
|
|
||||||
require 'kickstart.plugins.debug',
|
|
||||||
-- require 'kickstart.plugins.indent_line',
|
|
||||||
require 'kickstart.plugins.lint',
|
|
||||||
require 'kickstart.plugins.autopairs',
|
|
||||||
-- require 'kickstart.plugins.neo-tree',
|
|
||||||
require 'kickstart.plugins.gitsigns',
|
|
||||||
--
|
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
|
||||||
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
|
||||||
{ import = 'custom.plugins' },
|
|
||||||
}, {
|
|
||||||
ui = {
|
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
|
||||||
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
|
||||||
icons = vim.g.have_nerd_font and {} or {
|
|
||||||
cmd = '⌘',
|
|
||||||
config = '🛠',
|
|
||||||
event = '📅',
|
|
||||||
ft = '📂',
|
|
||||||
init = '⚙',
|
|
||||||
keys = '🗝',
|
|
||||||
plugin = '🔌',
|
|
||||||
runtime = '💻',
|
|
||||||
require = '🌙',
|
|
||||||
source = '📄',
|
|
||||||
start = '🚀',
|
|
||||||
task = '📌',
|
|
||||||
lazy = '💤 ',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
|
||||||
|
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,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',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
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
|
@ -74,11 +74,49 @@
|
|||||||
"command": "-extension.vim_navigateCtrlL",
|
"command": "-extension.vim_navigateCtrlL",
|
||||||
"when": "editorTextFocus && vim.active && vim.use<C-l> && !inDebugRepl"
|
"when": "editorTextFocus && vim.active && vim.use<C-l> && !inDebugRepl"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+p",
|
||||||
|
"command": "-workbench.action.quickOpen"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+e",
|
||||||
|
"command": "-workbench.action.quickOpen"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+f12",
|
||||||
|
"command": "-editor.action.revealDefinition",
|
||||||
|
"when": "editorHasDefinitionProvider && editorTextFocus && isWeb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "f12",
|
||||||
|
"command": "-editor.action.revealDefinition",
|
||||||
|
"when": "editorHasDefinitionProvider && editorTextFocus"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+shift+m",
|
||||||
|
"command": "-workbench.actions.view.problems",
|
||||||
|
"when": "workbench.panel.markers.view.active"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "alt+left",
|
||||||
|
"command": "-workbench.action.navigateBack",
|
||||||
|
"when": "canNavigateBack"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "alt+right",
|
||||||
|
"command": "-workbench.action.navigateForward",
|
||||||
|
"when": "canNavigateForward && editorTextFocus && vim.active"
|
||||||
|
},
|
||||||
// Editing
|
// Editing
|
||||||
{
|
{
|
||||||
"key": "shift+k",
|
"key": "shift+k",
|
||||||
"command": "editor.action.showHover",
|
"command": "editor.action.showHover",
|
||||||
"when": "editorTextFocus"
|
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "escape",
|
||||||
|
"command": "workbench.action.closeSidebar",
|
||||||
|
"when": "sideBarVisible"
|
||||||
},
|
},
|
||||||
// Editor pane navigation and management
|
// Editor pane navigation and management
|
||||||
{
|
{
|
||||||
@ -160,7 +198,7 @@
|
|||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+b up",
|
"key": "ctrl+k",
|
||||||
"command": "workbench.action.terminal.sendSequence",
|
"command": "workbench.action.terminal.sendSequence",
|
||||||
"args": {
|
"args": {
|
||||||
"text": "\u0002\u001b[A"
|
"text": "\u0002\u001b[A"
|
||||||
@ -168,7 +206,7 @@
|
|||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+b down",
|
"key": "ctrl+j",
|
||||||
"command": "workbench.action.terminal.sendSequence",
|
"command": "workbench.action.terminal.sendSequence",
|
||||||
"args": {
|
"args": {
|
||||||
"text": "\u0002\u001b[B"
|
"text": "\u0002\u001b[B"
|
||||||
@ -176,7 +214,7 @@
|
|||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+b left",
|
"key": "ctrl+h",
|
||||||
"command": "workbench.action.terminal.sendSequence",
|
"command": "workbench.action.terminal.sendSequence",
|
||||||
"args": {
|
"args": {
|
||||||
"text": "\u0002\u001b[D"
|
"text": "\u0002\u001b[D"
|
||||||
@ -184,7 +222,7 @@
|
|||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "ctrl+b right",
|
"key": "ctrl+l",
|
||||||
"command": "workbench.action.terminal.sendSequence",
|
"command": "workbench.action.terminal.sendSequence",
|
||||||
"args": {
|
"args": {
|
||||||
"text": "\u0002\u001b[C"
|
"text": "\u0002\u001b[C"
|
||||||
@ -246,5 +284,23 @@
|
|||||||
"text": "\u0002\u007a"
|
"text": "\u0002\u007a"
|
||||||
},
|
},
|
||||||
"when": "terminalFocus"
|
"when": "terminalFocus"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+b g",
|
||||||
|
"command": "workbench.action.terminal.sendSequence",
|
||||||
|
"args": {
|
||||||
|
"text": "\u0002\u0067"
|
||||||
|
},
|
||||||
|
"when": "terminalFocus"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+o",
|
||||||
|
"command": "workbench.action.navigateBack",
|
||||||
|
"when": "canNavigateBack"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ctrl+i",
|
||||||
|
"command": "workbench.action.navigateForward",
|
||||||
|
"when": "canNavigateForward && editorTextFocus && vim.active"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
//
|
||||||
// Languages
|
// Languages
|
||||||
|
//
|
||||||
"[html]": {
|
"[html]": {
|
||||||
"editor.defaultFormatter": "vscode.html-language-features"
|
"editor.defaultFormatter": "vscode.html-language-features"
|
||||||
},
|
},
|
||||||
@ -19,7 +21,7 @@
|
|||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": "explicit"
|
"source.fixAll.eslint": "explicit"
|
||||||
},
|
},
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||||
},
|
},
|
||||||
"[typescriptreact]": {
|
"[typescriptreact]": {
|
||||||
"editor.defaultFormatter": "vscode.typescript-language-features"
|
"editor.defaultFormatter": "vscode.typescript-language-features"
|
||||||
@ -30,6 +32,8 @@
|
|||||||
"go.buildTags": "unit",
|
"go.buildTags": "unit",
|
||||||
"go.toolsManagement.autoUpdate": true,
|
"go.toolsManagement.autoUpdate": true,
|
||||||
"gopls": {
|
"gopls": {
|
||||||
|
// Supported by Catppuccin
|
||||||
|
"ui.semanticTokens": true,
|
||||||
"build.buildFlags": [
|
"build.buildFlags": [
|
||||||
"-tags=unit"
|
"-tags=unit"
|
||||||
]
|
]
|
||||||
@ -39,16 +43,30 @@
|
|||||||
"templ": "html"
|
"templ": "html"
|
||||||
},
|
},
|
||||||
"typescript.updateImportsOnFileMove.enabled": "always",
|
"typescript.updateImportsOnFileMove.enabled": "always",
|
||||||
|
//
|
||||||
// Remote Settings
|
// Remote Settings
|
||||||
|
//
|
||||||
"dev.containers.dockerPath": "docker",
|
"dev.containers.dockerPath": "docker",
|
||||||
"dev.containers.executeInWSL": true,
|
"dev.containers.executeInWSL": true,
|
||||||
"dotfiles.installCommand": "install.sh",
|
"dotfiles.installCommand": "install.sh",
|
||||||
"dotfiles.repository": "https://github.com/tgrosinger/dotfiles.git",
|
"dotfiles.repository": "https://github.com/tgrosinger/dotfiles.git",
|
||||||
"dotfiles.targetPath": "~/.dotfiles",
|
"dotfiles.targetPath": "~/.dotfiles",
|
||||||
|
//
|
||||||
// Fonts and Appearance
|
// Fonts and Appearance
|
||||||
|
//
|
||||||
"editor.fontFamily": "JetBrainsMono Nerd Font, JetBrains Mono, 'Courier New', monospace",
|
"editor.fontFamily": "JetBrainsMono Nerd Font, JetBrains Mono, 'Courier New', monospace",
|
||||||
"editor.fontLigatures": true,
|
"editor.fontLigatures": true,
|
||||||
|
//
|
||||||
|
// Theme
|
||||||
|
//
|
||||||
|
"editor.semanticHighlighting.enabled": true,
|
||||||
|
// prevent VSCode from modifying the terminal colors
|
||||||
|
"terminal.integrated.minimumContrastRatio": 1,
|
||||||
|
// make the window's titlebar use the workbench colors
|
||||||
|
"window.titleBarStyle": "custom",
|
||||||
|
//
|
||||||
// Editor Behavior
|
// Editor Behavior
|
||||||
|
//
|
||||||
"diffEditor.experimental.showMoves": true,
|
"diffEditor.experimental.showMoves": true,
|
||||||
"editor.accessibilitySupport": "off",
|
"editor.accessibilitySupport": "off",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
@ -65,7 +83,9 @@
|
|||||||
"git.ignoreMissingGitWarning": true,
|
"git.ignoreMissingGitWarning": true,
|
||||||
"githubPullRequests.pullBranch": "never",
|
"githubPullRequests.pullBranch": "never",
|
||||||
"githubPullRequests.terminalLinksHandler": "github",
|
"githubPullRequests.terminalLinksHandler": "github",
|
||||||
|
//
|
||||||
// GitLens
|
// GitLens
|
||||||
|
//
|
||||||
"gitlens.advanced.telemetry.enabled": false,
|
"gitlens.advanced.telemetry.enabled": false,
|
||||||
"gitlens.hovers.currentLine.over": "line",
|
"gitlens.hovers.currentLine.over": "line",
|
||||||
"gitlens.telemetry.enabled": false,
|
"gitlens.telemetry.enabled": false,
|
||||||
@ -77,13 +97,21 @@
|
|||||||
"settingsSync.ignoredExtensions": [
|
"settingsSync.ignoredExtensions": [
|
||||||
"bradlc.vscode-tailwindcss"
|
"bradlc.vscode-tailwindcss"
|
||||||
],
|
],
|
||||||
|
//
|
||||||
// Telemetry
|
// Telemetry
|
||||||
|
//
|
||||||
"telemetry.telemetryLevel": "off",
|
"telemetry.telemetryLevel": "off",
|
||||||
"workbench.enableExperiments": false,
|
"workbench.enableExperiments": false,
|
||||||
"workbench.settings.enableNaturalLanguageSearch": false,
|
"workbench.settings.enableNaturalLanguageSearch": false,
|
||||||
"extensions.ignoreRecommendations": true,
|
"extensions.ignoreRecommendations": true,
|
||||||
|
//
|
||||||
// Vim
|
// Vim
|
||||||
|
//
|
||||||
"vim.leader": " ",
|
"vim.leader": " ",
|
||||||
|
"vim.handleKeys": {
|
||||||
|
// ctrl-o functionality in the plugin is not very reliable or predictable.
|
||||||
|
"<C-o>": false
|
||||||
|
},
|
||||||
"vim.normalModeKeyBindings": [
|
"vim.normalModeKeyBindings": [
|
||||||
{
|
{
|
||||||
"before": [
|
"before": [
|
||||||
@ -93,11 +121,74 @@
|
|||||||
"commands": [
|
"commands": [
|
||||||
"editor.action.rename"
|
"editor.action.rename"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": [
|
||||||
|
"leader",
|
||||||
|
"s",
|
||||||
|
"f"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"workbench.action.quickOpen"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": [
|
||||||
|
"leader",
|
||||||
|
"s",
|
||||||
|
"g"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"workbench.action.findInFiles"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": [
|
||||||
|
"leader",
|
||||||
|
"g",
|
||||||
|
"r"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"editor.action.goToReferences"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": [
|
||||||
|
"leader",
|
||||||
|
"r",
|
||||||
|
"n"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"editor.action.rename"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": [
|
||||||
|
"leader",
|
||||||
|
"q"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"workbench.actions.view.problems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"before": [
|
||||||
|
"leader",
|
||||||
|
"c",
|
||||||
|
"a"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"editor.action.quickFix"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
//
|
||||||
// Window
|
// Window
|
||||||
|
//
|
||||||
"window.newWindowDimensions": "inherit",
|
"window.newWindowDimensions": "inherit",
|
||||||
"workbench.colorTheme": "Visual Studio Light",
|
"workbench.colorTheme": "Catppuccin Latte",
|
||||||
"workbench.editor.empty.hint": "hidden",
|
"workbench.editor.empty.hint": "hidden",
|
||||||
"workbench.sideBar.location": "right"
|
"workbench.sideBar.location": "right",
|
||||||
|
"workbench.iconTheme": "catppuccin-latte",
|
||||||
|
"lazygit-vscode.autoMaximizeWindow": true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user