woohooo
This commit is contained in:
commit
085347ddac
49 changed files with 1931 additions and 0 deletions
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Any bug report not following this template will be immediately closed. Thanks -->
|
||||
|
||||
## Before Reporting an Issue
|
||||
- I have read the kickstart.nvim README.md.
|
||||
- I have read the appropriate plugin's documentation.
|
||||
- I have searched that this issue has not been reported before.
|
||||
|
||||
- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.**
|
||||
|
||||
## Describe the bug
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
## To Reproduce
|
||||
<!-- Steps to reproduce the behavior. -->
|
||||
1. ...
|
||||
|
||||
## Desktop
|
||||
<!-- please complete the following information. -->
|
||||
- OS:
|
||||
- Terminal:
|
||||
|
||||
## Neovim Version
|
||||
<!-- Output of running `:version` from inside of neovim. -->
|
||||
|
||||
```
|
||||
```
|
||||
8
.github/pull_request_template.md
vendored
Normal file
8
.github/pull_request_template.md
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
***************************************************************************
|
||||
**NOTE**
|
||||
Please verify that the `base repository` above has the intended destination!
|
||||
Github by default opens Pull Requests against the parent of a forked repository.
|
||||
If this is your personal fork and you didn't intend to open a PR for contribution
|
||||
to the original project then adjust the `base repository` accordingly.
|
||||
**************************************************************************
|
||||
|
||||
21
.github/workflows/stylua.yml
vendored
Normal file
21
.github/workflows/stylua.yml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Check Lua Formatting
|
||||
name: Check Lua Formatting
|
||||
on: pull_request_target
|
||||
|
||||
jobs:
|
||||
stylua-check:
|
||||
if: github.repository == 'nvim-lua/kickstart.nvim'
|
||||
name: Stylua Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Stylua Check
|
||||
uses: JohnnyMorganz/stylua-action@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: --check .
|
||||
|
||||
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
tags
|
||||
test.sh
|
||||
.luarc.json
|
||||
nvim
|
||||
CLAUDE.md
|
||||
spell/
|
||||
lazy-lock.json
|
||||
.claude/
|
||||
6
.stylua.toml
Normal file
6
.stylua.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
column_width = 160
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "None"
|
||||
164
COMMANDS.md
Normal file
164
COMMANDS.md
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
# Neovim Key Bindings Reference
|
||||
|
||||
Leader key: `<Space>`
|
||||
|
||||
## General
|
||||
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<Esc>` | Normal | Clear search highlights |
|
||||
| `<leader>q` | Normal | Open diagnostic quickfix list |
|
||||
| `-` | Normal | Open Oil.nvim file explorer |
|
||||
|
||||
## Window Navigation
|
||||
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<C-h>` | Normal | Move focus to the left window |
|
||||
| `<C-l>` | Normal | Move focus to the right window |
|
||||
| `<C-j>` | Normal | Move focus to the lower window |
|
||||
| `<C-k>` | Normal | Move focus to the upper window |
|
||||
|
||||
## Terminal
|
||||
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<Esc><Esc>` | Terminal | Exit terminal mode |
|
||||
|
||||
**Note:** There's no built-in keymap to open a terminal. Use these commands:
|
||||
- `:terminal` - Open terminal in current window
|
||||
- `:split \| terminal` - Open terminal in horizontal split
|
||||
- `:vsplit \| terminal` - Open terminal in vertical split
|
||||
|
||||
## Toggle Commands
|
||||
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<leader>ts` | Normal | Toggle spell check |
|
||||
| `<leader>tw` | Normal | Toggle word wrap |
|
||||
| `<leader>tc` | Normal | Toggle colorcolumn (80 chars) |
|
||||
| `<leader>tt` | Normal | Toggle textwidth auto-wrap |
|
||||
| `<leader>th` | Normal | Toggle LSP inlay hints (when supported) |
|
||||
|
||||
## Column Settings
|
||||
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<leader>cc` | Normal | Set colorcolumn width (prompts for value) |
|
||||
|
||||
## Text Editing
|
||||
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<C-/>` | Normal | Toggle comment on current line |
|
||||
| `<C-/>` | Visual | Toggle comment on selected lines |
|
||||
| `<leader>f` | Normal/Visual | Format buffer/selection |
|
||||
| `z/` | Normal | Find synonyms for word under cursor (thesaurus) |
|
||||
|
||||
## Search (Telescope)
|
||||
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<leader>sf` | Normal | Search files |
|
||||
| `<leader>sg` | Normal | Search by grep (live grep) |
|
||||
| `<leader>sw` | Normal | Search current word |
|
||||
| `<leader>sh` | Normal | Search help documentation |
|
||||
| `<leader>sk` | Normal | Search keymaps |
|
||||
| `<leader>ss` | Normal | Search select Telescope pickers |
|
||||
| `<leader>sd` | Normal | Search diagnostics |
|
||||
| `<leader>sr` | Normal | Resume last search |
|
||||
| `<leader>s.` | Normal | Search recent files |
|
||||
| `<leader>sn` | Normal | Search Neovim config files |
|
||||
| `<leader>s/` | Normal | Search in open files |
|
||||
| `<leader>/` | Normal | Fuzzy search in current buffer |
|
||||
| `<leader><leader>` | Normal | Find existing buffers |
|
||||
|
||||
## LSP (Language Server Protocol)
|
||||
|
||||
These keymaps are only available when an LSP is attached to the buffer.
|
||||
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `grn` | Normal | Rename symbol |
|
||||
| `gra` | Normal/Visual | Code action |
|
||||
| `grr` | Normal | Find references |
|
||||
| `grd` | Normal | Go to definition |
|
||||
| `grD` | Normal | Go to declaration |
|
||||
| `gri` | Normal | Go to implementation |
|
||||
| `grt` | Normal | Go to type definition |
|
||||
| `gO` | Normal | Document symbols |
|
||||
| `gW` | Normal | Workspace symbols |
|
||||
|
||||
**LSP Navigation Tip:** After jumping to a definition with `grd`, press `<C-t>` to jump back.
|
||||
|
||||
## AI Assistants
|
||||
|
||||
### Claude Code
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<C-,>` | Normal/Terminal | Toggle Claude Code terminal |
|
||||
| `<leader>cC` | Normal | Continue last conversation |
|
||||
| `<leader>cV` | Normal | Verbose mode |
|
||||
|
||||
### GitHub Copilot
|
||||
| Key | Mode | Description |
|
||||
|-----|------|-------------|
|
||||
| `<C-g>` | Insert | Accept Copilot suggestion |
|
||||
|
||||
**Commands:**
|
||||
- `:CopilotChat` - Open Copilot chat
|
||||
- `:CopilotChatModels` - View available models
|
||||
|
||||
## Godot Integration
|
||||
|
||||
**Commands:**
|
||||
- `:GodotDebug` - Start debugging
|
||||
- `:GodotBreakAtCursor` - Set breakpoint at cursor
|
||||
- `:GodotStep` - Step through debugger
|
||||
- `:GodotQuit` - Quit debugger
|
||||
- `:GodotContinue` - Continue execution
|
||||
|
||||
## Plugin Management
|
||||
|
||||
**Commands:**
|
||||
- `:Lazy` - Open lazy.nvim UI
|
||||
- `:Lazy update` - Update all plugins
|
||||
- `:Lazy sync` - Install missing and update existing plugins
|
||||
- `:Lazy clean` - Remove unused plugins
|
||||
|
||||
## LSP & Tools Management
|
||||
|
||||
**Commands:**
|
||||
- `:Mason` - Open Mason UI to manage LSP servers
|
||||
- `:checkhealth` - Run health checks
|
||||
- `:checkhealth lsp` - Check LSP configuration
|
||||
|
||||
## Autocompletion (Blink.cmp)
|
||||
|
||||
In insert mode during completion:
|
||||
|
||||
| Key | Description |
|
||||
|-----|-------------|
|
||||
| `<C-y>` | Accept completion (default preset) |
|
||||
| `<Tab>` / `<S-Tab>` | Move to next/previous snippet field |
|
||||
| `<C-Space>` | Open menu or toggle documentation |
|
||||
| `<C-n>` / `<C-p>` | Select next/previous item |
|
||||
| `<Up>` / `<Down>` | Select next/previous item |
|
||||
| `<C-e>` | Hide menu |
|
||||
| `<C-k>` | Toggle signature help |
|
||||
|
||||
## Useful Neovim Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `:Tutor` | Interactive Neovim tutorial |
|
||||
| `:help` | Open help documentation |
|
||||
| `:ConformInfo` | View formatting configuration |
|
||||
| `:Thesaurus` | Manual thesaurus lookup |
|
||||
|
||||
## Tips
|
||||
|
||||
1. Press `<leader>` and wait briefly to see all available leader key combinations (via which-key)
|
||||
2. In Telescope search, press `<C-/>` (insert mode) or `?` (normal mode) to see available keymaps
|
||||
3. The colorscheme is Catppuccin Macchiato (change at init.lua:1043)
|
||||
4. Format-on-save is enabled by default (except for C/C++)
|
||||
19
LICENSE.md
Normal file
19
LICENSE.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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.
|
||||
241
README.md
Normal file
241
README.md
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
# 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),
|
||||
[fd-find](https://github.com/sharkdp/fd#installation)
|
||||
- Clipboard tool (xclip/xsel/win32yank or other depending on the 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
|
||||
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
|
||||
- Language Setup:
|
||||
- If you want to write Typescript, you need `npm`
|
||||
- If you 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)| `%localappdata%\nvim\` |
|
||||
| Windows (powershell)| `$env:LOCALAPPDATA\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`
|
||||
|
||||
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
|
||||
too - it's ignored in the kickstart repo to make maintenance easier, but it's
|
||||
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
|
||||
|
||||
#### 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 "%localappdata%\nvim"
|
||||
```
|
||||
|
||||
If you're using `powershell.exe`
|
||||
|
||||
```
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Post Installation
|
||||
|
||||
Start Neovim
|
||||
|
||||
```sh
|
||||
nvim
|
||||
```
|
||||
|
||||
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
||||
the current plugin status. Hit `q` to close the window.
|
||||
|
||||
#### Read The Friendly Documentation
|
||||
|
||||
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.
|
||||
|
||||
> [!NOTE]
|
||||
> For more information about a particular plugin check its repository's documentation.
|
||||
|
||||
|
||||
### 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://lazy.folke.io/usage#-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 the 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-linux-x86_64.tar.gz
|
||||
sudo rm -rf /opt/nvim-linux-x86_64
|
||||
sudo mkdir -p /opt/nvim-linux-x86_64
|
||||
sudo chmod a+rX /opt/nvim-linux-x86_64
|
||||
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
|
||||
|
||||
# make it available in /usr/local/bin, distro installs to /usr/bin
|
||||
sudo ln -sf /opt/nvim-linux-x86_64/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>
|
||||
|
||||
155
colors/custom.lua
Normal file
155
colors/custom.lua
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
local colors = {
|
||||
bg = '#050505',
|
||||
fg = '#c5c8c6',
|
||||
|
||||
normal = {
|
||||
black = '#282a2e',
|
||||
red = '#a54242',
|
||||
green = '#8c9440',
|
||||
yellow = '#de935f',
|
||||
blue = '#5f819d',
|
||||
magenta = '#85678f',
|
||||
cyan = '#5e8d87',
|
||||
white = '#707880',
|
||||
},
|
||||
bright = {
|
||||
black = '#373b41',
|
||||
red = '#cc6666',
|
||||
green = '#b5bd68',
|
||||
yellow = '#f0c674',
|
||||
blue = '#81a2be',
|
||||
magenta = '#b294bb',
|
||||
cyan = '#8abeb7',
|
||||
white = '#c5c8c6',
|
||||
},
|
||||
}
|
||||
|
||||
vim.cmd 'hi clear'
|
||||
if vim.fn.exists 'syntax_on' then
|
||||
vim.cmd 'syntax reset'
|
||||
end
|
||||
vim.o.termguicolors = true
|
||||
vim.g.colors_name = 'custom'
|
||||
|
||||
-- Terminal colors
|
||||
vim.g.terminal_color_0 = colors.normal.black
|
||||
vim.g.terminal_color_1 = colors.normal.red
|
||||
vim.g.terminal_color_2 = colors.normal.green
|
||||
vim.g.terminal_color_3 = colors.normal.yellow
|
||||
vim.g.terminal_color_4 = colors.normal.blue
|
||||
vim.g.terminal_color_5 = colors.normal.magenta
|
||||
vim.g.terminal_color_6 = colors.normal.cyan
|
||||
vim.g.terminal_color_7 = colors.normal.white
|
||||
vim.g.terminal_color_8 = colors.bright.black
|
||||
vim.g.terminal_color_9 = colors.bright.red
|
||||
vim.g.terminal_color_10 = colors.bright.green
|
||||
vim.g.terminal_color_11 = colors.bright.yellow
|
||||
vim.g.terminal_color_12 = colors.bright.blue
|
||||
vim.g.terminal_color_13 = colors.bright.magenta
|
||||
vim.g.terminal_color_14 = colors.bright.cyan
|
||||
vim.g.terminal_color_15 = colors.bright.white
|
||||
|
||||
local set_hl = function(group, opts)
|
||||
vim.api.nvim_set_hl(0, group, opts)
|
||||
end
|
||||
|
||||
-- Syntax Highlights
|
||||
set_hl('Normal', { fg = colors.fg, bg = colors.bg })
|
||||
set_hl('NonText', { fg = colors.normal.black })
|
||||
set_hl('Comment', { fg = colors.normal.white, italic = true })
|
||||
set_hl('Constant', { fg = colors.normal.yellow })
|
||||
set_hl('String', { fg = colors.normal.green })
|
||||
set_hl('Character', { fg = colors.normal.green })
|
||||
set_hl('Number', { fg = colors.normal.yellow })
|
||||
set_hl('Boolean', { fg = colors.normal.yellow })
|
||||
set_hl('Float', { fg = colors.normal.yellow })
|
||||
set_hl('Identifier', { fg = colors.normal.red })
|
||||
set_hl('Function', { fg = colors.normal.blue })
|
||||
set_hl('Statement', { fg = colors.normal.magenta })
|
||||
set_hl('Conditional', { fg = colors.normal.magenta })
|
||||
set_hl('Repeat', { fg = colors.normal.magenta })
|
||||
set_hl('Label', { fg = colors.normal.magenta })
|
||||
set_hl('Operator', { fg = colors.fg })
|
||||
set_hl('Keyword', { fg = colors.normal.magenta })
|
||||
set_hl('Exception', { fg = colors.normal.magenta })
|
||||
set_hl('PreProc', { fg = colors.normal.magenta })
|
||||
set_hl('Include', { fg = colors.normal.magenta })
|
||||
set_hl('Define', { fg = colors.normal.magenta })
|
||||
set_hl('Macro', { fg = colors.normal.magenta })
|
||||
set_hl('PreCondit', { fg = colors.normal.magenta })
|
||||
set_hl('Type', { fg = colors.normal.yellow })
|
||||
set_hl('StorageClass', { fg = colors.normal.yellow })
|
||||
set_hl('Structure', { fg = colors.normal.yellow })
|
||||
set_hl('Typedef', { fg = colors.normal.yellow })
|
||||
set_hl('Special', { fg = colors.normal.red })
|
||||
set_hl('SpecialChar', { fg = colors.normal.red })
|
||||
set_hl('Tag', { fg = colors.normal.red })
|
||||
set_hl('Delimiter', { fg = colors.fg })
|
||||
set_hl('SpecialComment', { fg = colors.normal.white })
|
||||
set_hl('Debug', { fg = colors.normal.red })
|
||||
set_hl('Underlined', { fg = colors.normal.blue, underline = true })
|
||||
set_hl('Ignore', { fg = colors.bg })
|
||||
set_hl('Error', { fg = colors.normal.red, bold = true })
|
||||
set_hl('Todo', { fg = colors.normal.yellow, bold = true })
|
||||
|
||||
-- UI Highlights
|
||||
set_hl('ColorColumn', { bg = colors.normal.black })
|
||||
set_hl('Cursor', { fg = colors.bg, bg = colors.fg })
|
||||
set_hl('CursorLine', { bg = colors.normal.black })
|
||||
set_hl('CursorLineNr', { fg = colors.normal.yellow, bold = true })
|
||||
set_hl('Directory', { fg = colors.normal.blue })
|
||||
set_hl('DiffAdd', { fg = colors.normal.green, bg = colors.normal.black })
|
||||
set_hl('DiffChange', { fg = colors.normal.yellow, bg = colors.normal.black })
|
||||
set_hl('DiffDelete', { fg = colors.normal.red, bg = colors.normal.black })
|
||||
set_hl('DiffText', { fg = colors.normal.blue, bg = colors.normal.black })
|
||||
set_hl('ErrorMsg', { fg = colors.normal.red })
|
||||
set_hl('VertSplit', { fg = colors.bright.black })
|
||||
set_hl('Folded', { fg = colors.normal.white, bg = colors.normal.black })
|
||||
set_hl('FoldColumn', { fg = colors.normal.white, bg = colors.normal.black })
|
||||
set_hl('SignColumn', { fg = colors.normal.white, bg = colors.bg })
|
||||
set_hl('IncSearch', { fg = colors.bg, bg = colors.normal.yellow })
|
||||
set_hl('LineNr', { fg = colors.bright.black })
|
||||
set_hl('MatchParen', { bg = colors.bright.black, bold = true })
|
||||
set_hl('Pmenu', { fg = colors.fg, bg = colors.normal.black })
|
||||
set_hl('PmenuSel', { fg = colors.bg, bg = colors.normal.blue })
|
||||
set_hl('PmenuSbar', { bg = colors.normal.black })
|
||||
set_hl('PmenuThumb', { bg = colors.normal.white })
|
||||
set_hl('Question', { fg = colors.normal.green })
|
||||
set_hl('Search', { fg = colors.bg, bg = colors.normal.yellow })
|
||||
set_hl('SpecialKey', { fg = colors.bright.black })
|
||||
set_hl('SpellBad', { sp = colors.normal.red, underline = true })
|
||||
set_hl('SpellCap', { sp = colors.normal.blue, underline = true })
|
||||
set_hl('SpellLocal', { sp = colors.normal.magenta, underline = true })
|
||||
set_hl('SpellRare', { sp = colors.normal.cyan, underline = true })
|
||||
set_hl('StatusLine', { fg = colors.fg, bg = colors.normal.black })
|
||||
set_hl('StatusLineNC', { fg = colors.normal.white, bg = colors.normal.black })
|
||||
set_hl('TabLine', { fg = colors.normal.white, bg = colors.normal.black })
|
||||
set_hl('TabLineFill', { fg = colors.normal.white, bg = colors.normal.black })
|
||||
set_hl('TabLineSel', { fg = colors.normal.green, bg = colors.normal.black })
|
||||
set_hl('Title', { fg = colors.normal.blue })
|
||||
set_hl('Visual', { bg = colors.bright.black })
|
||||
set_hl('VisualNOS', { bg = colors.bright.black })
|
||||
set_hl('WarningMsg', { fg = colors.normal.red })
|
||||
set_hl('WildMenu', { fg = colors.bg, bg = colors.normal.blue })
|
||||
|
||||
-- Diagnostic Highlights (likely needed for LSP)
|
||||
set_hl('DiagnosticError', { fg = colors.normal.red })
|
||||
set_hl('DiagnosticWarn', { fg = colors.normal.yellow })
|
||||
set_hl('DiagnosticInfo', { fg = colors.normal.blue })
|
||||
set_hl('DiagnosticHint', { fg = colors.normal.cyan })
|
||||
set_hl('DiagnosticUnderlineError', { sp = colors.normal.red, underline = true })
|
||||
set_hl('DiagnosticUnderlineWarn', { sp = colors.normal.yellow, underline = true })
|
||||
set_hl('DiagnosticUnderlineInfo', { sp = colors.normal.blue, underline = true })
|
||||
set_hl('DiagnosticUnderlineHint', { sp = colors.normal.cyan, underline = true })
|
||||
|
||||
-- GitSigns (if installed)
|
||||
set_hl('GitSignsAdd', { fg = colors.normal.green })
|
||||
set_hl('GitSignsChange', { fg = colors.normal.yellow })
|
||||
set_hl('GitSignsDelete', { fg = colors.normal.red })
|
||||
|
||||
-- Telescope (if installed)
|
||||
set_hl('TelescopeBorder', { fg = colors.bright.black })
|
||||
set_hl('TelescopePromptBorder', { fg = colors.bright.black })
|
||||
set_hl('TelescopeResultsBorder', { fg = colors.bright.black })
|
||||
set_hl('TelescopePreviewBorder', { fg = colors.bright.black })
|
||||
set_hl('TelescopeSelection', { bg = colors.normal.black, bold = true })
|
||||
24
doc/kickstart.txt
Normal file
24
doc/kickstart.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
================================================================================
|
||||
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:
|
||||
44
init.lua
Normal file
44
init.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
-- Set <space> as the leader key (must happen before plugins load)
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- Load core configuration
|
||||
require 'config.options'
|
||||
require 'config.keymaps'
|
||||
require 'config.autocmds'
|
||||
|
||||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
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
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- [[ Configure and install plugins ]]
|
||||
-- All plugin specs are auto-loaded from lua/plugins/*.lua
|
||||
require('lazy').setup('plugins', {
|
||||
ui = {
|
||||
icons = vim.g.have_nerd_font and {} or {
|
||||
cmd = '⌘',
|
||||
config = '🛠',
|
||||
event = '📅',
|
||||
ft = '📂',
|
||||
init = '⚙',
|
||||
keys = '🗝',
|
||||
plugin = '🔌',
|
||||
runtime = '💻',
|
||||
require = '🌙',
|
||||
source = '📄',
|
||||
start = '🚀',
|
||||
task = '📌',
|
||||
lazy = '💤 ',
|
||||
},
|
||||
},
|
||||
})
|
||||
22
lua/config/autocmds.lua
Normal file
22
lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-- [[ Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
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.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set indent for C/C++ to 2 spaces
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'c', 'cpp' },
|
||||
callback = function()
|
||||
vim.bo.tabstop = 2
|
||||
vim.bo.shiftwidth = 2
|
||||
vim.bo.softtabstop = 2
|
||||
vim.bo.expandtab = true
|
||||
end,
|
||||
})
|
||||
61
lua/config/keymaps.lua
Normal file
61
lua/config/keymaps.lua
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||
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' })
|
||||
|
||||
-- Toggle spell check
|
||||
vim.keymap.set('n', '<leader>ts', function()
|
||||
vim.o.spell = not vim.o.spell
|
||||
print(vim.o.spell and 'Spell check enabled' or 'Spell check disabled')
|
||||
end, { desc = '[T]oggle [S]pell check' })
|
||||
|
||||
-- Toggle word wrap
|
||||
vim.keymap.set('n', '<leader>tw', function()
|
||||
vim.o.wrap = not vim.o.wrap
|
||||
vim.cmd 'redraw'
|
||||
print(vim.o.wrap and 'Wrap enabled' or 'Wrap disabled')
|
||||
end, { desc = '[T]oggle [W]rap' })
|
||||
|
||||
-- Toggle colorcolumn
|
||||
vim.keymap.set('n', '<leader>tc', function()
|
||||
if vim.wo.colorcolumn == '' then
|
||||
vim.wo.colorcolumn = '80'
|
||||
else
|
||||
vim.wo.colorcolumn = ''
|
||||
end
|
||||
end, { desc = '[T]oggle [C]olorcolumn' })
|
||||
|
||||
-- Set colorcolumn to a specific value
|
||||
vim.keymap.set('n', '<leader>cc', function()
|
||||
local col = vim.fn.input 'Set colorcolumn to: '
|
||||
if col ~= '' then
|
||||
vim.wo.colorcolumn = col
|
||||
vim.bo.textwidth = tonumber(col) or 80
|
||||
end
|
||||
end, { desc = 'Set [C]olor[c]olumn width' })
|
||||
|
||||
-- Toggle textwidth auto-wrapping
|
||||
vim.keymap.set('n', '<leader>tt', function()
|
||||
if vim.bo.textwidth == 0 then
|
||||
local cc = vim.wo.colorcolumn
|
||||
local width = tonumber(cc) or 80
|
||||
vim.bo.textwidth = width
|
||||
print('Textwidth enabled (' .. width .. ')')
|
||||
else
|
||||
vim.bo.textwidth = 0
|
||||
print 'Textwidth disabled'
|
||||
end
|
||||
end, { desc = '[T]oggle [T]extwidth auto-wrap' })
|
||||
|
||||
-- Exit terminal mode
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- Window navigation
|
||||
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' })
|
||||
34
lua/config/options.lua
Normal file
34
lua/config/options.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.mouse = 'a'
|
||||
vim.o.showmode = false
|
||||
vim.o.completeopt = 'menuone,noinsert,noselect'
|
||||
|
||||
vim.schedule(function()
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
end)
|
||||
|
||||
vim.o.breakindent = true
|
||||
vim.o.wrap = true
|
||||
vim.o.linebreak = true
|
||||
vim.o.undofile = true
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
vim.o.signcolumn = 'yes'
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeoutlen = 300
|
||||
vim.o.splitright = true
|
||||
vim.o.splitbelow = true
|
||||
vim.opt.cmdheight = 0
|
||||
|
||||
vim.o.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
|
||||
vim.o.inccommand = 'split'
|
||||
vim.o.cursorline = true
|
||||
vim.o.scrolloff = 10
|
||||
vim.o.confirm = true
|
||||
vim.opt.termguicolors = true
|
||||
61
lua/custom/claude-code.lua
Normal file
61
lua/custom/claude-code.lua
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
require('claude-code').setup {
|
||||
-- Terminal window settings
|
||||
window = {
|
||||
split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits)
|
||||
position = 'botright', -- Position of the window: "botright", "topleft", "vertical", "float", etc.
|
||||
enter_insert = true, -- Whether to enter insert mode when opening Claude Code
|
||||
hide_numbers = true, -- Hide line numbers in the terminal window
|
||||
hide_signcolumn = true, -- Hide the sign column in the terminal window
|
||||
|
||||
-- Floating window configuration (only applies when position = "float")
|
||||
float = {
|
||||
width = '80%', -- Width: number of columns or percentage string
|
||||
height = '80%', -- Height: number of rows or percentage string
|
||||
row = 'center', -- Row position: number, "center", or percentage string
|
||||
col = 'center', -- Column position: number, "center", or percentage string
|
||||
relative = 'editor', -- Relative to: "editor" or "cursor"
|
||||
border = 'rounded', -- Border style: "none", "single", "double", "rounded", "solid", "shadow"
|
||||
},
|
||||
},
|
||||
-- File refresh settings
|
||||
refresh = {
|
||||
enable = true, -- Enable file change detection
|
||||
updatetime = 100, -- updatetime when Claude Code is active (milliseconds)
|
||||
timer_interval = 1000, -- How often to check for file changes (milliseconds)
|
||||
show_notifications = true, -- Show notification when files are reloaded
|
||||
},
|
||||
-- Git project settings
|
||||
git = {
|
||||
use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project)
|
||||
},
|
||||
-- Shell-specific settings
|
||||
shell = {
|
||||
separator = '&&', -- Command separator used in shell commands
|
||||
pushd_cmd = 'pushd', -- Command to push directory onto stack (e.g., 'pushd' for bash/zsh, 'enter' for nushell)
|
||||
popd_cmd = 'popd', -- Command to pop directory from stack (e.g., 'popd' for bash/zsh, 'exit' for nushell)
|
||||
},
|
||||
-- Command settings
|
||||
command = 'claude', -- Command used to launch Claude Code
|
||||
-- Command variants
|
||||
command_variants = {
|
||||
-- Conversation management
|
||||
continue = '--continue', -- Resume the most recent conversation
|
||||
resume = '--resume', -- Display an interactive conversation picker
|
||||
|
||||
-- Output options
|
||||
verbose = '--verbose', -- Enable verbose logging with full turn-by-turn output
|
||||
},
|
||||
-- Keymaps
|
||||
keymaps = {
|
||||
toggle = {
|
||||
normal = '<C-,>', -- Normal mode keymap for toggling Claude Code, false to disable
|
||||
terminal = '<C-,>', -- Terminal mode keymap for toggling Claude Code, false to disable
|
||||
variants = {
|
||||
continue = '<leader>cC', -- Normal mode keymap for Claude Code with continue flag
|
||||
verbose = '<leader>cV', -- Normal mode keymap for Claude Code with verbose flag
|
||||
},
|
||||
},
|
||||
window_navigation = true, -- Enable window navigation keymaps (<C-h/j/k/l>)
|
||||
scrolling = true, -- Enable scrolling keymaps (<C-f/b>) for page up/down
|
||||
},
|
||||
}
|
||||
28
lua/custom/godot_config.lua
Normal file
28
lua/custom/godot_config.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
local godot = require 'godot'
|
||||
|
||||
godot.setup {
|
||||
bin = 'C:\\Program Files\\godot\\Godot_v4.5.1-stable_win64.exe',
|
||||
dap = {
|
||||
host = '127.0.0.1',
|
||||
port = 6006,
|
||||
},
|
||||
gui = {
|
||||
console_config = {
|
||||
anchor = 'SW',
|
||||
border = 'double',
|
||||
col = 1,
|
||||
height = 10,
|
||||
relative = 'editor',
|
||||
row = 99999,
|
||||
style = 'minimal',
|
||||
width = 99999,
|
||||
},
|
||||
},
|
||||
expose_commands = true,
|
||||
}
|
||||
|
||||
require('godot_lsp_setup').setup {
|
||||
lsp_opts = {
|
||||
cmd = { 'nc', '-w', '3', '127.0.0.1', '6005' },
|
||||
},
|
||||
}
|
||||
209
lua/custom/oil_config.lua
Normal file
209
lua/custom/oil_config.lua
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
-- lua/custom/oil_config.lua
|
||||
local oil = require 'oil'
|
||||
|
||||
oil.setup {
|
||||
|
||||
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
|
||||
-- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.
|
||||
default_file_explorer = true,
|
||||
-- Id is automatically added at the beginning, and name at the end
|
||||
-- See :help oil-columns
|
||||
columns = {
|
||||
'icon',
|
||||
-- "permissions",
|
||||
-- "size",
|
||||
-- "mtime",
|
||||
},
|
||||
-- Buffer-local options to use for oil buffers
|
||||
buf_options = {
|
||||
buflisted = false,
|
||||
bufhidden = 'hide',
|
||||
},
|
||||
-- Window-local options to use for oil buffers
|
||||
win_options = {
|
||||
wrap = false,
|
||||
signcolumn = 'no',
|
||||
cursorcolumn = false,
|
||||
foldcolumn = '0',
|
||||
spell = false,
|
||||
list = false,
|
||||
conceallevel = 3,
|
||||
concealcursor = 'nvic',
|
||||
},
|
||||
-- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
|
||||
delete_to_trash = false,
|
||||
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
|
||||
skip_confirm_for_simple_edits = false,
|
||||
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
|
||||
-- (:help prompt_save_on_select_new_entry)
|
||||
prompt_save_on_select_new_entry = true,
|
||||
-- Oil will automatically delete hidden buffers after this delay
|
||||
-- You can set the delay to false to disable cleanup entirely
|
||||
-- Note that the cleanup process only starts when none of the oil buffers are currently displayed
|
||||
cleanup_delay_ms = 2000,
|
||||
lsp_file_methods = {
|
||||
-- Enable or disable LSP file operations
|
||||
enabled = true,
|
||||
-- Time to wait for LSP file operations to complete before skipping
|
||||
timeout_ms = 1000,
|
||||
-- Set to true to autosave buffers that are updated with LSP willRenameFiles
|
||||
-- Set to "unmodified" to only save unmodified buffers
|
||||
autosave_changes = false,
|
||||
},
|
||||
-- Constrain the cursor to the editable parts of the oil buffer
|
||||
-- Set to `false` to disable, or "name" to keep it on the file names
|
||||
constrain_cursor = 'editable',
|
||||
-- Set to true to watch the filesystem for changes and reload oil
|
||||
watch_for_changes = false,
|
||||
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
||||
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
||||
-- Additionally, if it is a string that matches "actions.<name>",
|
||||
-- it will use the mapping at require("oil.actions").<name>
|
||||
-- Set to `false` to remove a keymap
|
||||
-- See :help oil-actions for a list of all available actions
|
||||
|
||||
keymaps = {
|
||||
['g?'] = { 'actions.show_help', mode = 'n' },
|
||||
['<CR>'] = 'actions.select',
|
||||
['<C-s>'] = { 'actions.select', opts = { vertical = true } },
|
||||
['<C-h>'] = { 'actions.select', opts = { horizontal = true } },
|
||||
['<C-t>'] = { 'actions.select', opts = { tab = true } },
|
||||
['<C-p>'] = 'actions.preview',
|
||||
['<C-c>'] = { 'actions.close', mode = 'n' },
|
||||
['<C-l>'] = 'actions.refresh',
|
||||
['<C-]>'] = { 'actions.parent', mode = 'n' },
|
||||
['<C-\\>'] = { 'actions.open_cwd', mode = 'n' },
|
||||
['`'] = { 'actions.cd', mode = 'n' },
|
||||
['~'] = { 'actions.cd', opts = { scope = 'tab' }, mode = 'n' },
|
||||
['gs'] = { 'actions.change_sort', mode = 'n' },
|
||||
['gx'] = 'actions.open_external',
|
||||
['g.'] = { 'actions.toggle_hidden', mode = 'n' },
|
||||
['g\\'] = { 'actions.toggle_trash', mode = 'n' },
|
||||
},
|
||||
-- Set to false to disable all of the above keymaps
|
||||
use_default_keymaps = true,
|
||||
view_options = {
|
||||
-- Show files and directories that start with "."
|
||||
show_hidden = true,
|
||||
-- This function defines what is considered a "hidden" file
|
||||
is_hidden_file = function(name, bufnr)
|
||||
local m = name:match '^%.'
|
||||
return m ~= nil
|
||||
end,
|
||||
-- This function defines what will never be shown, even when `show_hidden` is set
|
||||
is_always_hidden = function(name, bufnr)
|
||||
return false
|
||||
end,
|
||||
-- Sort file names with numbers in a more intuitive order for humans.
|
||||
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
|
||||
natural_order = 'fast',
|
||||
-- Sort file and directory names case insensitive
|
||||
case_insensitive = false,
|
||||
sort = {
|
||||
-- sort order can be "asc" or "desc"
|
||||
-- see :help oil-columns to see which columns are sortable
|
||||
{ 'type', 'asc' },
|
||||
{ 'name', 'asc' },
|
||||
},
|
||||
-- Customize the highlight group for the file name
|
||||
highlight_filename = function(entry, is_hidden, is_link_target, is_link_orphan)
|
||||
return nil
|
||||
end,
|
||||
},
|
||||
-- Extra arguments to pass to SCP when moving/copying files over SSH
|
||||
extra_scp_args = {},
|
||||
-- EXPERIMENTAL support for performing file operations with git
|
||||
git = {
|
||||
-- Return true to automatically git add/mv/rm files
|
||||
add = function(path)
|
||||
return false
|
||||
end,
|
||||
mv = function(src_path, dest_path)
|
||||
return false
|
||||
end,
|
||||
rm = function(path)
|
||||
return false
|
||||
end,
|
||||
},
|
||||
-- Configuration for the floating window in oil.open_float
|
||||
float = {
|
||||
-- Padding around the floating window
|
||||
padding = 2,
|
||||
-- max_width and max_height can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
max_width = 0,
|
||||
max_height = 0,
|
||||
border = nil,
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
-- optionally override the oil buffers window title with custom function: fun(winid: integer): string
|
||||
get_win_title = nil,
|
||||
-- preview_split: Split direction: "auto", "left", "right", "above", "below".
|
||||
preview_split = 'auto',
|
||||
-- This is the config that will be passed to nvim_open_win.
|
||||
-- Change values here to customize the layout
|
||||
override = function(conf)
|
||||
return conf
|
||||
end,
|
||||
},
|
||||
-- Configuration for the file preview window
|
||||
preview_win = {
|
||||
-- Whether the preview window is automatically updated when the cursor is moved
|
||||
update_on_cursor_moved = true,
|
||||
-- How to open the preview window "load"|"scratch"|"fast_scratch"
|
||||
preview_method = 'fast_scratch',
|
||||
-- A function that returns true to disable preview on a file e.g. to avoid lag
|
||||
disable_preview = function(filename)
|
||||
return false
|
||||
end,
|
||||
-- Window-local options to use for preview window buffers
|
||||
win_options = {},
|
||||
},
|
||||
-- Configuration for the floating action confirmation window
|
||||
confirmation = {
|
||||
-- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
-- min_width and max_width can be a single value or a list of mixed integer/float types.
|
||||
-- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"
|
||||
max_width = 0.9,
|
||||
-- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
|
||||
min_width = { 40, 0.4 },
|
||||
-- optionally define an integer/float for the exact width of the preview window
|
||||
width = nil,
|
||||
-- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
-- min_height and max_height can be a single value or a list of mixed integer/float types.
|
||||
-- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"
|
||||
max_height = 0.9,
|
||||
-- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"
|
||||
min_height = { 5, 0.1 },
|
||||
-- optionally define an integer/float for the exact height of the preview window
|
||||
height = nil,
|
||||
border = nil,
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
-- Configuration for the floating progress window
|
||||
progress = {
|
||||
max_width = 0.9,
|
||||
min_width = { 40, 0.4 },
|
||||
width = nil,
|
||||
max_height = { 10, 0.9 },
|
||||
min_height = { 5, 0.1 },
|
||||
height = nil,
|
||||
border = nil,
|
||||
minimized_border = 'none',
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
-- Configuration for the floating SSH window
|
||||
ssh = {
|
||||
border = nil,
|
||||
},
|
||||
-- Configuration for the floating keymaps help window
|
||||
keymaps_help = {
|
||||
border = nil,
|
||||
},
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '-', oil.open, { noremap = true })
|
||||
52
lua/kickstart/health.lua
Normal file
52
lua/kickstart/health.lua
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
--[[
|
||||
--
|
||||
-- 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,
|
||||
}
|
||||
39
lua/plugins/alpha.lua
Normal file
39
lua/plugins/alpha.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
return {
|
||||
'goolord/alpha-nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
event = 'VimEnter',
|
||||
config = function()
|
||||
local alpha = require 'alpha'
|
||||
local dashboard = require 'alpha.themes.dashboard'
|
||||
|
||||
dashboard.section.header.val = {
|
||||
' ',
|
||||
' ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗',
|
||||
' ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║',
|
||||
' ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║',
|
||||
' ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║',
|
||||
' ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║',
|
||||
' ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝',
|
||||
' ',
|
||||
}
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button('f', ' Find file', '<cmd>Telescope find_files<cr>'),
|
||||
dashboard.button('r', ' Recent files', '<cmd>Telescope oldfiles<cr>'),
|
||||
dashboard.button('g', ' Grep text', '<cmd>Telescope live_grep<cr>'),
|
||||
dashboard.button('c', ' Configuration', '<cmd>e $MYVIMRC<cr>'),
|
||||
dashboard.button('l', ' Lazy', '<cmd>Lazy<cr>'),
|
||||
dashboard.button('q', ' Quit', '<cmd>qa<cr>'),
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
|
||||
-- Disable folding on alpha buffer
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'alpha',
|
||||
callback = function()
|
||||
vim.opt_local.foldenable = false
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
5
lua/plugins/autopairs.lua
Normal file
5
lua/plugins/autopairs.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts = {},
|
||||
}
|
||||
54
lua/plugins/blink-cmp.lua
Normal file
54
lua/plugins/blink-cmp.lua
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
return {
|
||||
'saghen/blink.cmp',
|
||||
event = 'VimEnter',
|
||||
version = '1.*',
|
||||
dependencies = {
|
||||
{
|
||||
'L3MON4D3/LuaSnip',
|
||||
version = '2.*',
|
||||
build = (function()
|
||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
||||
return
|
||||
end
|
||||
return 'make install_jsregexp'
|
||||
end)(),
|
||||
opts = {},
|
||||
},
|
||||
'folke/lazydev.nvim',
|
||||
},
|
||||
--- @module 'blink.cmp'
|
||||
--- @type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = 'default',
|
||||
['<Tab>'] = { 'select_and_accept', 'fallback' },
|
||||
['<Esc>'] = { 'cancel', 'fallback' },
|
||||
},
|
||||
appearance = {
|
||||
nerd_font_variant = 'mono',
|
||||
},
|
||||
completion = {
|
||||
menu = { auto_show = true },
|
||||
ghost_text = {
|
||||
enabled = true,
|
||||
show_without_selection = true,
|
||||
show_with_menu = true,
|
||||
},
|
||||
documentation = { auto_show = true, auto_show_delay_ms = 500 },
|
||||
},
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'lazydev', 'codecompanion' },
|
||||
providers = {
|
||||
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
|
||||
codecompanion = {
|
||||
name = 'codecompanion',
|
||||
module = 'codecompanion.providers.completion.blink',
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
snippets = { preset = 'luasnip' },
|
||||
fuzzy = { implementation = 'lua' },
|
||||
signature = { enabled = true },
|
||||
},
|
||||
}
|
||||
23
lua/plugins/bufferline.lua
Normal file
23
lua/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
version = '*',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
event = 'VimEnter',
|
||||
opts = {
|
||||
options = {
|
||||
diagnostics = 'nvim_lsp',
|
||||
offsets = {
|
||||
{ filetype = 'undotree', text = 'Undo Tree', highlight = 'Directory', separator = true },
|
||||
},
|
||||
show_buffer_close_icons = false,
|
||||
show_close_icon = false,
|
||||
separator_style = 'slant',
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ '<S-h>', '<cmd>BufferLineCyclePrev<cr>', desc = 'Prev Buffer' },
|
||||
{ '<S-l>', '<cmd>BufferLineCycleNext<cr>', desc = 'Next Buffer' },
|
||||
{ '<leader>bd', '<cmd>bdelete<cr>', desc = '[B]uffer [D]elete' },
|
||||
{ '<leader>bp', '<cmd>BufferLineTogglePin<cr>', desc = '[B]uffer [P]in' },
|
||||
},
|
||||
}
|
||||
9
lua/plugins/claude-code.lua
Normal file
9
lua/plugins/claude-code.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'greggh/claude-code.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
config = function()
|
||||
require 'custom.claude-code'
|
||||
end,
|
||||
}
|
||||
53
lua/plugins/codecompanion.lua
Normal file
53
lua/plugins/codecompanion.lua
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
return {
|
||||
'olimorris/codecompanion.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'saghen/blink.cmp',
|
||||
},
|
||||
cmd = { 'CodeCompanion', 'CodeCompanionChat', 'CodeCompanionActions' },
|
||||
keys = {
|
||||
{ '<leader>a', '<cmd>CodeCompanionActions<cr>', mode = { 'n', 'v' }, desc = 'CodeCompanion Actions' },
|
||||
{ '<leader>ac', '<cmd>CodeCompanionChat Toggle<cr>', mode = { 'n', 'v' }, desc = 'CodeCompanion Chat' },
|
||||
{ 'ga', '<cmd>CodeCompanionChat Add<cr>', mode = 'v', desc = 'Add to CodeCompanion Chat' },
|
||||
},
|
||||
opts = {
|
||||
log_level = 'DEBUG',
|
||||
adapters = {
|
||||
local_model = function()
|
||||
return require('codecompanion.adapters').extend('openai_compatible', {
|
||||
env = {
|
||||
url = 'http://localhost:8000/api/v1/chat/completions',
|
||||
api_key = 'dummy-key',
|
||||
},
|
||||
schema = {
|
||||
model = { default = '' },
|
||||
temperature = { default = 0.3 },
|
||||
},
|
||||
})
|
||||
end,
|
||||
mistral = function()
|
||||
return require('codecompanion.adapters').extend('mistral', {
|
||||
url = 'https://codestral.mistral.ai/v1/chat/completions',
|
||||
env = {
|
||||
api_key = 'cmd:echo $MISTRAL_API_KEY',
|
||||
},
|
||||
schema = {
|
||||
model = { default = 'codestral-latest' },
|
||||
},
|
||||
})
|
||||
end,
|
||||
ollama = function()
|
||||
return require('codecompanion.adapters').extend('ollama', {
|
||||
schema = {
|
||||
model = { default = 'qwen2.5-coder:latest' },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
strategies = {
|
||||
chat = { adapter = 'anthropic' },
|
||||
inline = { adapter = 'anthropic' },
|
||||
},
|
||||
},
|
||||
}
|
||||
11
lua/plugins/comment.lua
Normal file
11
lua/plugins/comment.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
event = 'VimEnter',
|
||||
config = function()
|
||||
require('Comment').setup()
|
||||
vim.keymap.set('n', '<C-/>', '<Plug>(comment_toggle_linewise_current)', { desc = 'Toggle comment' })
|
||||
vim.keymap.set('n', '<C-_>', '<Plug>(comment_toggle_linewise_current)', { desc = 'Toggle comment' })
|
||||
vim.keymap.set('v', '<C-/>', '<Plug>(comment_toggle_linewise_visual)', { desc = 'Toggle comment' })
|
||||
vim.keymap.set('v', '<C-_>', '<Plug>(comment_toggle_linewise_visual)', { desc = 'Toggle comment' })
|
||||
end,
|
||||
}
|
||||
41
lua/plugins/conform.lua
Normal file
41
lua/plugins/conform.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
return {
|
||||
'stevearc/conform.nvim',
|
||||
event = { 'BufWritePre' },
|
||||
cmd = { 'ConformInfo' },
|
||||
keys = {
|
||||
{
|
||||
'<leader>f',
|
||||
function()
|
||||
require('conform').format { async = true, lsp_format = 'fallback' }
|
||||
end,
|
||||
mode = '',
|
||||
desc = '[F]ormat buffer',
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
format_on_save = function(bufnr)
|
||||
-- Skip special buffers (e.g. CodeCompanion chat, terminals)
|
||||
if vim.bo[bufnr].buftype ~= '' then
|
||||
return nil
|
||||
end
|
||||
local disable_filetypes = {}
|
||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||
return nil
|
||||
end
|
||||
return { timeout_ms = 500, lsp_format = 'fallback' }
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
c = { 'clang-format' },
|
||||
cpp = { 'clang-format' },
|
||||
python = { 'isort', 'black' },
|
||||
go = { 'goimports', 'gofmt' },
|
||||
java = { 'google-java-format' },
|
||||
html = { 'prettier' },
|
||||
css = { 'prettier' },
|
||||
markdown = { 'prettier' },
|
||||
toml = { 'taplo' },
|
||||
},
|
||||
},
|
||||
}
|
||||
12
lua/plugins/flash.lua
Normal file
12
lua/plugins/flash.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'folke/flash.nvim',
|
||||
event = 'VeryLazy',
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
keys = {
|
||||
{ 's', mode = { 'n', 'x', 'o' }, function() require('flash').jump() end, desc = 'Flash' },
|
||||
{ 'S', mode = { 'n', 'x', 'o' }, function() require('flash').treesitter() end, desc = 'Flash Treesitter' },
|
||||
{ 'r', mode = 'o', function() require('flash').remote() end, desc = 'Remote Flash' },
|
||||
{ 'R', mode = { 'o', 'x' }, function() require('flash').treesitter_search() end, desc = 'Treesitter Search' },
|
||||
},
|
||||
}
|
||||
12
lua/plugins/gitsigns.lua
Normal file
12
lua/plugins/gitsigns.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
},
|
||||
}
|
||||
8
lua/plugins/godot.lua
Normal file
8
lua/plugins/godot.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
'lommix/godot.nvim',
|
||||
lazy = true,
|
||||
cmd = { 'GodotDebug', 'GodotBreakAtCursor', 'GodotStep', 'GodotQuit', 'GodotContinue' },
|
||||
config = function()
|
||||
require 'custom.godot_config'
|
||||
end,
|
||||
}
|
||||
11
lua/plugins/gruvbox.lua
Normal file
11
lua/plugins/gruvbox.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'ellisonleao/gruvbox.nvim',
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require('gruvbox').setup {
|
||||
contrast = 'hard',
|
||||
transparent_mode = false,
|
||||
}
|
||||
vim.cmd.colorscheme 'gruvbox'
|
||||
end,
|
||||
}
|
||||
4
lua/plugins/guess-indent.lua
Normal file
4
lua/plugins/guess-indent.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
'NMAC427/guess-indent.nvim',
|
||||
opts = {},
|
||||
}
|
||||
17
lua/plugins/harpoon.lua
Normal file
17
lua/plugins/harpoon.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local harpoon = require 'harpoon'
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set('n', '<leader>ha', function() harpoon:list():add() end, { desc = '[H]arpoon [A]dd' })
|
||||
vim.keymap.set('n', '<leader>hh', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { desc = '[H]arpoon Menu' })
|
||||
|
||||
vim.keymap.set('n', '<leader>1', function() harpoon:list():select(1) end, { desc = 'Harpoon File 1' })
|
||||
vim.keymap.set('n', '<leader>2', function() harpoon:list():select(2) end, { desc = 'Harpoon File 2' })
|
||||
vim.keymap.set('n', '<leader>3', function() harpoon:list():select(3) end, { desc = 'Harpoon File 3' })
|
||||
vim.keymap.set('n', '<leader>4', function() harpoon:list():select(4) end, { desc = 'Harpoon File 4' })
|
||||
end,
|
||||
}
|
||||
12
lua/plugins/indent-blankline.lua
Normal file
12
lua/plugins/indent-blankline.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
main = 'ibl',
|
||||
event = { 'BufReadPost', 'BufNewFile' },
|
||||
opts = {
|
||||
indent = { char = '│' },
|
||||
scope = { enabled = true, show_start = true },
|
||||
exclude = {
|
||||
filetypes = { 'help', 'alpha', 'dashboard', 'lazy', 'mason', 'oil' },
|
||||
},
|
||||
},
|
||||
}
|
||||
153
lua/plugins/lsp.lua
Normal file
153
lua/plugins/lsp.lua
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
return {
|
||||
{
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua',
|
||||
opts = {
|
||||
library = {
|
||||
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
{ 'mason-org/mason.nvim', opts = {} },
|
||||
'mason-org/mason-lspconfig.nvim',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
{ 'j-hui/fidget.nvim', opts = {} },
|
||||
'saghen/blink.cmp',
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||
callback = function(event)
|
||||
local map = function(keys, func, desc, mode)
|
||||
mode = mode or 'n'
|
||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||
end
|
||||
|
||||
map('grn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
|
||||
map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||
map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||
map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols')
|
||||
map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols')
|
||||
map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
|
||||
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
|
||||
---@param c vim.lsp.Client
|
||||
---@param method vim.lsp.protocol.Method
|
||||
---@param bufnr? integer
|
||||
---@return boolean
|
||||
local function client_supports_method(c, method, bufnr)
|
||||
if vim.fn.has 'nvim-0.11' == 1 then
|
||||
return c:supports_method(method, bufnr)
|
||||
else
|
||||
return c.supports_method(method, { bufnr = bufnr })
|
||||
end
|
||||
end
|
||||
|
||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) 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
|
||||
|
||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) 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,
|
||||
})
|
||||
|
||||
vim.diagnostic.config {
|
||||
severity_sort = true,
|
||||
float = { border = 'rounded', source = 'if_many' },
|
||||
underline = { severity = vim.diagnostic.severity.ERROR },
|
||||
signs = vim.g.have_nerd_font and {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = ' ',
|
||||
[vim.diagnostic.severity.WARN] = ' ',
|
||||
[vim.diagnostic.severity.INFO] = ' ',
|
||||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
},
|
||||
} or {},
|
||||
virtual_text = {
|
||||
source = 'if_many',
|
||||
spacing = 2,
|
||||
},
|
||||
}
|
||||
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
|
||||
local servers = {
|
||||
clangd = {
|
||||
cmd = { 'clangd', '--background-index', '--clang-tidy' },
|
||||
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' },
|
||||
},
|
||||
gopls = {},
|
||||
pyright = {},
|
||||
jdtls = {},
|
||||
html = {},
|
||||
cssls = {},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = { callSnippet = 'Replace' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua',
|
||||
'clang-format',
|
||||
'isort',
|
||||
'black',
|
||||
'goimports',
|
||||
'prettier',
|
||||
'taplo',
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
ensure_installed = {},
|
||||
automatic_installation = false,
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
require('lspconfig')[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
-- Godot LSP (not managed by Mason)
|
||||
vim.lsp.config.gdscript = {
|
||||
cmd = { 'ncat', '127.0.0.1', '6005' },
|
||||
name = 'godot',
|
||||
root_markers = { 'project.godot', '.godot' },
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
19
lua/plugins/lualine.lua
Normal file
19
lua/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = {
|
||||
options = {
|
||||
theme = 'gruvbox',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { { 'filename', path = 1 } },
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
},
|
||||
}
|
||||
7
lua/plugins/mini.lua
Normal file
7
lua/plugins/mini.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'echasnovski/mini.nvim',
|
||||
config = function()
|
||||
require('mini.ai').setup { n_lines = 500 }
|
||||
require('mini.surround').setup()
|
||||
end,
|
||||
}
|
||||
11
lua/plugins/neoscroll.lua
Normal file
11
lua/plugins/neoscroll.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'karb94/neoscroll.nvim',
|
||||
event = { 'BufReadPost', 'BufNewFile' },
|
||||
opts = {
|
||||
mappings = { '<C-u>', '<C-d>', '<C-b>', '<C-f>', 'zt', 'zz', 'zb' },
|
||||
hide_cursor = true,
|
||||
stop_eof = true,
|
||||
respect_scrolloff = false,
|
||||
cursor_scrolls_alone = true,
|
||||
},
|
||||
}
|
||||
24
lua/plugins/noice.lua
Normal file
24
lua/plugins/noice.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
'folke/noice.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'MunifTanjim/nui.nvim',
|
||||
'rcarriga/nvim-notify',
|
||||
},
|
||||
opts = {
|
||||
lsp = {
|
||||
override = {
|
||||
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
||||
['vim.lsp.util.stylize_markdown'] = true,
|
||||
['cmp.entry.get_documentation'] = true,
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
bottom_search = true,
|
||||
command_palette = true,
|
||||
long_message_to_split = true,
|
||||
inc_rename = false,
|
||||
lsp_doc_border = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
7
lua/plugins/oil.lua
Normal file
7
lua/plugins/oil.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'stevearc/oil.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require 'custom.oil_config'
|
||||
end,
|
||||
}
|
||||
6
lua/plugins/rainbow-csv.lua
Normal file
6
lua/plugins/rainbow-csv.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'cameron-wags/rainbow_csv.nvim',
|
||||
config = true,
|
||||
ft = { 'csv', 'tsv', 'csv_semicolon', 'csv_whitespace', 'csv_pipe', 'rfc_csv', 'rfc_semicolon' },
|
||||
cmd = { 'RainbowDelim', 'RainbowDelimSimple', 'RainbowDelimQuoted', 'RainbowMultiDelim' },
|
||||
}
|
||||
9
lua/plugins/spectre.lua
Normal file
9
lua/plugins/spectre.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'nvim-pack/nvim-spectre',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
cmd = 'Spectre',
|
||||
keys = {
|
||||
{ '<leader>sr', function() require('spectre').open() end, desc = '[S]earch & [R]eplace (Spectre)' },
|
||||
{ '<leader>srw', function() require('spectre').open_visual { select_word = true } end, desc = '[S]pectre current [W]ord' },
|
||||
},
|
||||
}
|
||||
58
lua/plugins/telescope.lua
Normal file
58
lua/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
event = 'VimEnter',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'make',
|
||||
cond = function()
|
||||
return vim.fn.executable 'make' == 1
|
||||
end,
|
||||
},
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||
},
|
||||
config = function()
|
||||
require('telescope').setup {
|
||||
extensions = {
|
||||
['ui-select'] = {
|
||||
require('telescope.themes').get_dropdown(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
||||
pcall(require('telescope').load_extension, 'ui-select')
|
||||
|
||||
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>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||
|
||||
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' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sn', function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||
end, { desc = '[S]earch [N]eovim files' })
|
||||
end,
|
||||
}
|
||||
9
lua/plugins/thesaurus.lua
Normal file
9
lua/plugins/thesaurus.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'Ron89/thesaurus_query.vim',
|
||||
cmd = { 'Thesaurus', 'ThesaurusQueryReplaceCurrentWord' },
|
||||
init = function()
|
||||
vim.g.tq_enabled_backends = { 'datamuse_com', 'openoffice_en' }
|
||||
vim.g.tq_use_vim_autocomplete = 0
|
||||
vim.keymap.set('n', 'z/', '<cmd>ThesaurusQueryReplaceCurrentWord<CR>', { desc = 'Find synonyms (thesaurus)' })
|
||||
end,
|
||||
}
|
||||
6
lua/plugins/todo-comments.lua
Normal file
6
lua/plugins/todo-comments.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'folke/todo-comments.nvim',
|
||||
event = 'VimEnter',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = { signs = false },
|
||||
}
|
||||
36
lua/plugins/treesitter.lua
Normal file
36
lua/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
main = 'nvim-treesitter.configs',
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
'bash',
|
||||
'c',
|
||||
'cpp',
|
||||
'css',
|
||||
'diff',
|
||||
'go',
|
||||
'html',
|
||||
'java',
|
||||
'javascript',
|
||||
'json',
|
||||
'lua',
|
||||
'luadoc',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'python',
|
||||
'query',
|
||||
'toml',
|
||||
'typescript',
|
||||
'vim',
|
||||
'vimdoc',
|
||||
'yaml',
|
||||
},
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { 'ruby' },
|
||||
},
|
||||
indent = { enable = true, disable = { 'ruby' } },
|
||||
},
|
||||
}
|
||||
13
lua/plugins/trouble.lua
Normal file
13
lua/plugins/trouble.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
'folke/trouble.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
cmd = 'Trouble',
|
||||
opts = {},
|
||||
keys = {
|
||||
{ '<leader>xx', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Diagnostics (Trouble)' },
|
||||
{ '<leader>xd', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', desc = 'Buffer Diagnostics (Trouble)' },
|
||||
{ '<leader>xs', '<cmd>Trouble symbols toggle focus=false<cr>', desc = 'Symbols (Trouble)' },
|
||||
{ '<leader>xl', '<cmd>Trouble lsp toggle focus=false win.position=right<cr>', desc = 'LSP Definitions / References (Trouble)' },
|
||||
{ '<leader>xq', '<cmd>Trouble qflist toggle<cr>', desc = 'Quickfix List (Trouble)' },
|
||||
},
|
||||
}
|
||||
6
lua/plugins/undotree.lua
Normal file
6
lua/plugins/undotree.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'mbbill/undotree',
|
||||
keys = {
|
||||
{ '<leader>u', '<cmd>UndotreeToggle<cr>', desc = '[U]ndotree Toggle' },
|
||||
},
|
||||
}
|
||||
17
lua/plugins/vim-tmux-navigator.lua
Normal file
17
lua/plugins/vim-tmux-navigator.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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>' },
|
||||
},
|
||||
}
|
||||
47
lua/plugins/which-key.lua
Normal file
47
lua/plugins/which-key.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
return {
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter',
|
||||
opts = {
|
||||
delay = 0,
|
||||
icons = {
|
||||
mappings = vim.g.have_nerd_font,
|
||||
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>',
|
||||
},
|
||||
},
|
||||
spec = {
|
||||
{ '<leader>s', group = '[S]earch' },
|
||||
{ '<leader>t', group = '[T]oggle' },
|
||||
{ '<leader>h', group = 'Git [H]unk / [H]arpoon', mode = { 'n', 'v' } },
|
||||
{ '<leader>x', group = 'Trouble' },
|
||||
{ '<leader>b', group = '[B]uffer' },
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue