···11----
22-name: Bug report
33-about: Create a report to help us improve
44-title: ''
55-labels: ''
66-assignees: ''
77-88----
99-1010-<!-- Any bug report not following this template will be immediately closed. Thanks -->
1111-1212-## Before Reporting an Issue
1313-- I have read the kickstart.nvim README.md.
1414-- I have read the appropriate plugin's documentation.
1515-- I have searched that this issue has not been reported before.
1616-1717-- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.**
1818-1919-## Describe the bug
2020-<!-- A clear and concise description of what the bug is. -->
2121-2222-## To Reproduce
2323-<!-- Steps to reproduce the behavior. -->
2424-1. ...
2525-2626-## Desktop
2727-<!-- please complete the following information. -->
2828-- OS:
2929-- Terminal:
3030-3131-## Neovim Version
3232-<!-- Output of running `:version` from inside of neovim. -->
3333-3434-```
3535-```
-8
nvim/.github/pull_request_template.md
···11-***************************************************************************
22-**NOTE**
33-Please verify that the `base repository` above has the intended destination!
44-Github by default opens Pull Requests against the parent of a forked repository.
55-If this is your personal fork and you didn't intend to open a PR for contribution
66-to the original project then adjust the `base repository` accordingly.
77-**************************************************************************
88-
···11-MIT License
22-33-Permission is hereby granted, free of charge, to any person obtaining a copy
44-of this software and associated documentation files (the "Software"), to deal
55-in the Software without restriction, including without limitation the rights
66-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
77-copies of the Software, and to permit persons to whom the Software is
88-furnished to do so, subject to the following conditions:
99-1010-The above copyright notice and this permission notice shall be included in all
1111-copies or substantial portions of the Software.
1212-1313-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1515-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919-SOFTWARE.
-241
nvim/README.md
···11-# kickstart.nvim
22-33-## Introduction
44-55-A starting point for Neovim that is:
66-77-* Small
88-* Single-file
99-* Completely Documented
1010-1111-**NOT** a Neovim distribution, but instead a starting point for your configuration.
1212-1313-## Installation
1414-1515-### Install Neovim
1616-1717-Kickstart.nvim targets *only* the latest
1818-['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
1919-['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
2020-If you are experiencing issues, please make sure you have the latest versions.
2121-2222-### Install External Dependencies
2323-2424-External Requirements:
2525-- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
2626-- [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
2727- [fd-find](https://github.com/sharkdp/fd#installation)
2828-- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
2929-- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
3030- - if you have it set `vim.g.have_nerd_font` in `init.lua` to true
3131-- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
3232-- Language Setup:
3333- - If you want to write Typescript, you need `npm`
3434- - If you want to write Golang, you will need `go`
3535- - etc.
3636-3737-> [!NOTE]
3838-> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
3939-> and quick install snippets
4040-4141-### Install Kickstart
4242-4343-> [!NOTE]
4444-> [Backup](#FAQ) your previous configuration (if any exists)
4545-4646-Neovim's configurations are located under the following paths, depending on your OS:
4747-4848-| OS | PATH |
4949-| :- | :--- |
5050-| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
5151-| Windows (cmd)| `%localappdata%\nvim\` |
5252-| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
5353-5454-#### Recommended Step
5555-5656-[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
5757-so that you have your own copy that you can modify, then install by cloning the
5858-fork to your machine using one of the commands below, depending on your OS.
5959-6060-> [!NOTE]
6161-> Your fork's URL will be something like this:
6262-> `https://github.com/<your_github_username>/kickstart.nvim.git`
6363-6464-You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
6565-too - it's ignored in the kickstart repo to make maintenance easier, but it's
6666-[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
6767-6868-#### Clone kickstart.nvim
6969-7070-> [!NOTE]
7171-> If following the recommended step above (i.e., forking the repo), replace
7272-> `nvim-lua` with `<your_github_username>` in the commands below
7373-7474-<details><summary> Linux and Mac </summary>
7575-7676-```sh
7777-git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
7878-```
7979-8080-</details>
8181-8282-<details><summary> Windows </summary>
8383-8484-If you're using `cmd.exe`:
8585-8686-```
8787-git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
8888-```
8989-9090-If you're using `powershell.exe`
9191-9292-```
9393-git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
9494-```
9595-9696-</details>
9797-9898-### Post Installation
9999-100100-Start Neovim
101101-102102-```sh
103103-nvim
104104-```
105105-106106-That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
107107-the current plugin status. Hit `q` to close the window.
108108-109109-#### Read The Friendly Documentation
110110-111111-Read through the `init.lua` file in your configuration folder for more
112112-information about extending and exploring Neovim. That also includes
113113-examples of adding popularly requested plugins.
114114-115115-> [!NOTE]
116116-> For more information about a particular plugin check its repository's documentation.
117117-118118-119119-### Getting Started
120120-121121-[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
122122-123123-### FAQ
124124-125125-* What should I do if I already have a pre-existing Neovim configuration?
126126- * You should back it up and then delete all associated files.
127127- * This includes your existing init.lua and the Neovim files in `~/.local`
128128- which can be deleted with `rm -rf ~/.local/share/nvim/`
129129-* Can I keep my existing configuration in parallel to kickstart?
130130- * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
131131- to maintain multiple configurations. For example, you can install the kickstart
132132- configuration in `~/.config/nvim-kickstart` and create an alias:
133133- ```
134134- alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
135135- ```
136136- When you run Neovim using `nvim-kickstart` alias it will use the alternative
137137- config directory and the matching local directory
138138- `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
139139- distribution that you would like to try out.
140140-* What if I want to "uninstall" this configuration:
141141- * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
142142-* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
143143- * The main purpose of kickstart is to serve as a teaching tool and a reference
144144- configuration that someone can easily use to `git clone` as a basis for their own.
145145- As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
146146- into smaller parts. A fork of kickstart that does this while maintaining the
147147- same functionality is available here:
148148- * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
149149- * Discussions on this topic can be found here:
150150- * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
151151- * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
152152-153153-### Install Recipes
154154-155155-Below you can find OS specific install instructions for Neovim and dependencies.
156156-157157-After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step.
158158-159159-#### Windows Installation
160160-161161-<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
162162-Installation may require installing build tools and updating the run command for `telescope-fzf-native`
163163-164164-See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
165165-166166-This requires:
167167-168168-- Install CMake and the Microsoft C++ Build Tools on Windows
169169-170170-```lua
171171-{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
172172-```
173173-</details>
174174-<details><summary>Windows with gcc/make using chocolatey</summary>
175175-Alternatively, one can install gcc and make which don't require changing the config,
176176-the easiest way is to use choco:
177177-178178-1. install [chocolatey](https://chocolatey.org/install)
179179-either follow the instructions on the page or use winget,
180180-run in cmd as **admin**:
181181-```
182182-winget install --accept-source-agreements chocolatey.chocolatey
183183-```
184184-185185-2. install all requirements using choco, exit the previous cmd and
186186-open a new one so that choco path is set, and run in cmd as **admin**:
187187-```
188188-choco install -y neovim git ripgrep wget fd unzip gzip mingw make
189189-```
190190-</details>
191191-<details><summary>WSL (Windows Subsystem for Linux)</summary>
192192-193193-```
194194-wsl --install
195195-wsl
196196-sudo add-apt-repository ppa:neovim-ppa/unstable -y
197197-sudo apt update
198198-sudo apt install make gcc ripgrep unzip git xclip neovim
199199-```
200200-</details>
201201-202202-#### Linux Install
203203-<details><summary>Ubuntu Install Steps</summary>
204204-205205-```
206206-sudo add-apt-repository ppa:neovim-ppa/unstable -y
207207-sudo apt update
208208-sudo apt install make gcc ripgrep unzip git xclip neovim
209209-```
210210-</details>
211211-<details><summary>Debian Install Steps</summary>
212212-213213-```
214214-sudo apt update
215215-sudo apt install make gcc ripgrep unzip git xclip curl
216216-217217-# Now we install nvim
218218-curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
219219-sudo rm -rf /opt/nvim-linux-x86_64
220220-sudo mkdir -p /opt/nvim-linux-x86_64
221221-sudo chmod a+rX /opt/nvim-linux-x86_64
222222-sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
223223-224224-# make it available in /usr/local/bin, distro installs to /usr/bin
225225-sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
226226-```
227227-</details>
228228-<details><summary>Fedora Install Steps</summary>
229229-230230-```
231231-sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
232232-```
233233-</details>
234234-235235-<details><summary>Arch Install Steps</summary>
236236-237237-```
238238-sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
239239-```
240240-</details>
241241-
-24
nvim/doc/kickstart.txt
···11-================================================================================
22-INTRODUCTION *kickstart.nvim*
33-44-Kickstart.nvim is a project to help you get started on your neovim journey.
55-66- *kickstart-is-not*
77-It is not:
88-- Complete framework for every plugin under the sun
99-- Place to add every plugin that could ever be useful
1010-1111- *kickstart-is*
1212-It is:
1313-- Somewhere that has a good start for the most common "IDE" type features:
1414- - autocompletion
1515- - goto-definition
1616- - find references
1717- - fuzzy finding
1818- - and hinting at what more can be done :)
1919-- A place to _kickstart_ your journey.
2020- - You should fork this project and use/modify it so that it matches your
2121- style and preferences. If you don't want to do that, there are probably
2222- other projects that would fit much better for you (and that's great!)!
2323-2424- vim:tw=78:ts=8:ft=help:norl:
-1045
nvim/init.lua
···11---[[
22-33-=====================================================================
44-==================== READ THIS BEFORE CONTINUING ====================
55-=====================================================================
66-======== .-----. ========
77-======== .----------------------. | === | ========
88-======== |.-""""""""""""""""""-.| |-----| ========
99-======== || || | === | ========
1010-======== || KICKSTART.NVIM || |-----| ========
1111-======== || || | === | ========
1212-======== || || |-----| ========
1313-======== ||:Tutor || |:::::| ========
1414-======== |'-..................-'| |____o| ========
1515-======== `"")----------------(""` ___________ ========
1616-======== /::::::::::| |::::::::::\ \ no mouse \ ========
1717-======== /:::========| |==hjkl==:::\ \ required \ ========
1818-======== '""""""""""""' '""""""""""""' '""""""""""' ========
1919-======== ========
2020-=====================================================================
2121-=====================================================================
2222-2323-What is Kickstart?
2424-2525- Kickstart.nvim is *not* a distribution.
2626-2727- Kickstart.nvim is a starting point for your own configuration.
2828- The goal is that you can read every line of code, top-to-bottom, understand
2929- what your configuration is doing, and modify it to suit your needs.
3030-3131- Once you've done that, you can start exploring, configuring and tinkering to
3232- make Neovim your own! That might mean leaving Kickstart just the way it is for a while
3333- or immediately breaking it into modular pieces. It's up to you!
3434-3535- If you don't know anything about Lua, I recommend taking some time to read through
3636- a guide. One possible example which will only take 10-15 minutes:
3737- - https://learnxinyminutes.com/docs/lua/
3838-3939- After understanding a bit more about Lua, you can use `:help lua-guide` as a
4040- reference for how Neovim integrates Lua.
4141- - :help lua-guide
4242- - (or HTML version): https://neovim.io/doc/user/lua-guide.html
4343-4444-Kickstart Guide:
4545-4646- TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
4747-4848- If you don't know what this means, type the following:
4949- - <escape key>
5050- - :
5151- - Tutor
5252- - <enter key>
5353-5454- (If you already know the Neovim basics, you can skip this step.)
5555-5656- Once you've completed that, you can continue working through **AND READING** the rest
5757- of the kickstart init.lua.
5858-5959- Next, run AND READ `:help`.
6060- This will open up a help window with some basic information
6161- about reading, navigating and searching the builtin help documentation.
6262-6363- This should be the first place you go to look when you're stuck or confused
6464- with something. It's one of my favorite Neovim features.
6565-6666- MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
6767- which is very useful when you're not exactly sure of what you're looking for.
6868-6969- I have left several `:help X` comments throughout the init.lua
7070- These are hints about where to find more information about the relevant settings,
7171- plugins or Neovim features used in Kickstart.
7272-7373- NOTE: Look for lines like this
7474-7575- Throughout the file. These are for you, the reader, to help you understand what is happening.
7676- Feel free to delete them once you know what you're doing, but they should serve as a guide
7777- for when you are first encountering a few different constructs in your Neovim config.
7878-7979-If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
8080-8181-I hope you enjoy your Neovim journey,
8282-- TJ
8383-8484-P.S. You can delete this when you're done too. It's your config now! :)
8585---]]
8686-8787--- Set <space> as the leader key
8888--- See `:help mapleader`
8989--- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
9090-vim.g.mapleader = ' '
9191-vim.g.maplocalleader = ' '
9292-9393--- Set to true if you have a Nerd Font installed and selected in the terminal
9494-vim.g.have_nerd_font = true
9595-9696--- [[ Setting options ]]
9797--- See `:help vim.o`
9898--- NOTE: You can change these options as you wish!
9999--- For more options, you can see `:help option-list`
100100-101101--- Make line numbers default
102102-vim.o.number = true
103103--- You can also add relative line numbers, to help with jumping.
104104--- Experiment for yourself to see if you like it!
105105-vim.o.relativenumber = true
106106-107107--- Enable mouse mode, can be useful for resizing splits for example!
108108-vim.o.mouse = 'a'
109109-110110--- Don't show the mode, since it's already in the status line
111111-vim.o.showmode = false
112112-113113--- Session config for rmagatti/auto-session
114114-vim.o.sessionoptions = 'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions'
115115-116116--- use OS slash as the path separator
117117-vim.opt.shellslash = false
118118-119119--- Sync clipboard between OS and Neovim.
120120--- Schedule the setting after `UiEnter` because it can increase startup-time.
121121--- Remove this option if you want your OS clipboard to remain independent.
122122--- See `:help 'clipboard'`
123123-vim.schedule(function()
124124- vim.o.clipboard = 'unnamedplus'
125125-end)
126126-127127--- Enable break indent
128128-vim.o.breakindent = true
129129-130130--- Save undo history
131131-vim.o.undofile = true
132132-133133--- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
134134-vim.o.ignorecase = true
135135-vim.o.smartcase = true
136136-137137--- Keep signcolumn on by default
138138-vim.o.signcolumn = 'yes'
139139-140140--- Decrease update time
141141-vim.o.updatetime = 250
142142-143143--- Decrease mapped sequence wait time
144144-vim.o.timeoutlen = 300
145145-146146--- Configure how new splits should be opened
147147-vim.o.splitright = true
148148-vim.o.splitbelow = true
149149-150150--- Sets how neovim will display certain whitespace characters in the editor.
151151--- See `:help 'list'`
152152--- and `:help 'listchars'`
153153---
154154--- Notice listchars is set using `vim.opt` instead of `vim.o`.
155155--- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
156156--- See `:help lua-options`
157157--- and `:help lua-options-guide`
158158-vim.o.list = true
159159-vim.opt.listchars = { tab = ' ', trail = '·', nbsp = '␣' } -- »
160160-vim.o.tabstop = 4
161161-vim.o.shiftwidth = 4
162162-vim.o.expandtab = true
163163-vim.o.smarttab = true
164164--- Preview substitutions live, as you type!
165165-vim.o.inccommand = 'split'
166166-167167--- Show which line your cursor is on
168168-vim.o.cursorline = true
169169-170170--- Minimal number of screen lines to keep above and below the cursor.
171171-vim.o.scrolloff = 10
172172-173173--- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
174174--- instead raise a dialog asking if you wish to save the current file(s)
175175--- See `:help 'confirm'`
176176-vim.o.confirm = true
177177-178178--- [[ Basic Keymaps ]]
179179--- See `:help vim.keymap.set()`
180180-181181--- Clear highlights on search when pressing <Esc> in normal mode
182182--- See `:help hlsearch`
183183-vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
184184-185185--- Diagnostic keymaps
186186-vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
187187-188188--- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
189189--- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
190190--- is not what someone will guess without a bit more experience.
191191---
192192--- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
193193--- or just use <C-\><C-n> to exit terminal mode
194194-vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
195195-196196--- TIP: Disable arrow keys in normal mode
197197--- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
198198--- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
199199--- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
200200--- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
201201-202202--- Keybinds to make split navigation easier.
203203--- Use CTRL+<hjkl> to switch between windows
204204---
205205--- See `:help wincmd` for a list of all window commands
206206-vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
207207-vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
208208-vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
209209-vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
210210-211211--- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
212212--- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
213213--- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
214214--- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
215215--- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
216216-217217--- [[ Basic Autocommands ]]
218218--- See `:help lua-guide-autocommands`
219219-220220--- Highlight when yanking (copying) text
221221--- Try it with `yap` in normal mode
222222--- See `:help vim.hl.on_yank()`
223223-vim.api.nvim_create_autocmd('TextYankPost', {
224224- desc = 'Highlight when yanking (copying) text',
225225- group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
226226- callback = function()
227227- vim.hl.on_yank()
228228- end,
229229-})
230230-231231--- [[ Install `lazy.nvim` plugin manager ]]
232232--- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
233233-local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
234234-if not (vim.uv or vim.loop).fs_stat(lazypath) then
235235- local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
236236- local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
237237- if vim.v.shell_error ~= 0 then
238238- error('Error cloning lazy.nvim:\n' .. out)
239239- end
240240-end
241241-242242----@type vim.Option
243243-local rtp = vim.opt.rtp
244244-rtp:prepend(lazypath)
245245-246246--- [[ Configure and install plugins ]]
247247---
248248--- To check the current status of your plugins, run
249249--- :Lazy
250250---
251251--- You can press `?` in this menu for help. Use `:q` to close the window
252252---
253253--- To update plugins you can run
254254--- :Lazy update
255255---
256256--- NOTE: Here is where you install your plugins.
257257-require('lazy').setup({
258258- -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
259259- 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
260260-261261- -- NOTE: Plugins can also be added by using a table,
262262- -- with the first argument being the link and the following
263263- -- keys can be used to configure plugin behavior/loading/etc.
264264- --
265265- -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded.
266266- --
267267-268268- -- Alternatively, use `config = function() ... end` for full control over the configuration.
269269- -- If you prefer to call `setup` explicitly, use:
270270- -- {
271271- -- 'lewis6991/gitsigns.nvim',
272272- -- config = function()
273273- -- require('gitsigns').setup({
274274- -- -- Your gitsigns configuration here
275275- -- })
276276- -- end,
277277- -- }
278278- --
279279- -- Here is a more advanced example where we pass configuration
280280- -- options to `gitsigns.nvim`.
281281- --
282282- -- See `:help gitsigns` to understand what the configuration keys do
283283- { -- Adds git related signs to the gutter, as well as utilities for managing changes
284284- 'lewis6991/gitsigns.nvim',
285285- opts = {
286286- signs = {
287287- add = { text = '+' },
288288- change = { text = '~' },
289289- delete = { text = '_' },
290290- topdelete = { text = '‾' },
291291- changedelete = { text = '~' },
292292- },
293293- },
294294- },
295295-296296- -- NOTE: Plugins can also be configured to run Lua code when they are loaded.
297297- --
298298- -- This is often very useful to both group configuration, as well as handle
299299- -- lazy loading plugins that don't need to be loaded immediately at startup.
300300- --
301301- -- For example, in the following configuration, we use:
302302- -- event = 'VimEnter'
303303- --
304304- -- which loads which-key before all the UI elements are loaded. Events can be
305305- -- normal autocommands events (`:help autocmd-events`).
306306- --
307307- -- Then, because we use the `opts` key (recommended), the configuration runs
308308- -- after the plugin has been loaded as `require(MODULE).setup(opts)`.
309309-310310- { -- Useful plugin to show you pending keybinds.
311311- 'folke/which-key.nvim',
312312- event = 'VimEnter', -- Sets the loading event to 'VimEnter'
313313- opts = {
314314- -- delay between pressing a key and opening which-key (milliseconds)
315315- -- this setting is independent of vim.o.timeoutlen
316316- delay = 0,
317317- icons = {
318318- -- set icon mappings to true if you have a Nerd Font
319319- mappings = vim.g.have_nerd_font,
320320- -- If you are using a Nerd Font: set icons.keys to an empty table which will use the
321321- -- default which-key.nvim defined Nerd Font icons, otherwise define a string table
322322- keys = vim.g.have_nerd_font and {} or {
323323- Up = '<Up> ',
324324- Down = '<Down> ',
325325- Left = '<Left> ',
326326- Right = '<Right> ',
327327- C = '<C-…> ',
328328- M = '<M-…> ',
329329- D = '<D-…> ',
330330- S = '<S-…> ',
331331- CR = '<CR> ',
332332- Esc = '<Esc> ',
333333- ScrollWheelDown = '<ScrollWheelDown> ',
334334- ScrollWheelUp = '<ScrollWheelUp> ',
335335- NL = '<NL> ',
336336- BS = '<BS> ',
337337- Space = '<Space> ',
338338- Tab = '<Tab> ',
339339- F1 = '<F1>',
340340- F2 = '<F2>',
341341- F3 = '<F3>',
342342- F4 = '<F4>',
343343- F5 = '<F5>',
344344- F6 = '<F6>',
345345- F7 = '<F7>',
346346- F8 = '<F8>',
347347- F9 = '<F9>',
348348- F10 = '<F10>',
349349- F11 = '<F11>',
350350- F12 = '<F12>',
351351- },
352352- },
353353-354354- -- Document existing key chains
355355- spec = {
356356- { '<leader>s', group = '[S]earch' },
357357- { '<leader>t', group = '[T]oggle' },
358358- { '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
359359- },
360360- },
361361- },
362362-363363- -- NOTE: Plugins can specify dependencies.
364364- --
365365- -- The dependencies are proper plugin specifications as well - anything
366366- -- you do for a plugin at the top level, you can do for a dependency.
367367- --
368368- -- Use the `dependencies` key to specify the dependencies of a particular plugin
369369-370370- { -- Fuzzy Finder (files, lsp, etc)
371371- 'nvim-telescope/telescope.nvim',
372372- event = 'VimEnter',
373373- dependencies = {
374374- 'nvim-lua/plenary.nvim',
375375- { -- If encountering errors, see telescope-fzf-native README for installation instructions
376376- 'nvim-telescope/telescope-fzf-native.nvim',
377377-378378- -- `build` is used to run some command when the plugin is installed/updated.
379379- -- This is only run then, not every time Neovim starts up.
380380- build = 'make',
381381-382382- -- `cond` is a condition used to determine whether this plugin should be
383383- -- installed and loaded.
384384- cond = function()
385385- return vim.fn.executable 'make' == 1
386386- end,
387387- },
388388- { 'nvim-telescope/telescope-ui-select.nvim' },
389389-390390- -- Useful for getting pretty icons, but requires a Nerd Font.
391391- { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
392392- },
393393- config = function()
394394- -- Telescope is a fuzzy finder that comes with a lot of different things that
395395- -- it can fuzzy find! It's more than just a "file finder", it can search
396396- -- many different aspects of Neovim, your workspace, LSP, and more!
397397- --
398398- -- The easiest way to use Telescope, is to start by doing something like:
399399- -- :Telescope help_tags
400400- --
401401- -- After running this command, a window will open up and you're able to
402402- -- type in the prompt window. You'll see a list of `help_tags` options and
403403- -- a corresponding preview of the help.
404404- --
405405- -- Two important keymaps to use while in Telescope are:
406406- -- - Insert mode: <c-/>
407407- -- - Normal mode: ?
408408- --
409409- -- This opens a window that shows you all of the keymaps for the current
410410- -- Telescope picker. This is really useful to discover what Telescope can
411411- -- do as well as how to actually do it!
412412-413413- -- [[ Configure Telescope ]]
414414- -- See `:help telescope` and `:help telescope.setup()`
415415- require('telescope').setup {
416416- -- You can put your default mappings / updates / etc. in here
417417- -- All the info you're looking for is in `:help telescope.setup()`
418418- --
419419- -- defaults = {
420420- -- mappings = {
421421- -- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
422422- -- },
423423- -- },
424424- -- pickers = {}
425425- extensions = {
426426- ['ui-select'] = {
427427- require('telescope.themes').get_dropdown(),
428428- },
429429- },
430430- }
431431-432432- -- Enable Telescope extensions if they are installed
433433- pcall(require('telescope').load_extension, 'fzf')
434434- pcall(require('telescope').load_extension, 'ui-select')
435435-436436- -- See `:help telescope.builtin`
437437- local builtin = require 'telescope.builtin'
438438- vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
439439- vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
440440- vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
441441- vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
442442- vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
443443- vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
444444- vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
445445- vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
446446- vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
447447- vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
448448-449449- -- Slightly advanced example of overriding default behavior and theme
450450- vim.keymap.set('n', '<leader>/', function()
451451- -- You can pass additional configuration to Telescope to change the theme, layout, etc.
452452- builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
453453- winblend = 10,
454454- previewer = false,
455455- })
456456- end, { desc = '[/] Fuzzily search in current buffer' })
457457-458458- -- It's also possible to pass additional configuration options.
459459- -- See `:help telescope.builtin.live_grep()` for information about particular keys
460460- vim.keymap.set('n', '<leader>s/', function()
461461- builtin.live_grep {
462462- grep_open_files = true,
463463- prompt_title = 'Live Grep in Open Files',
464464- }
465465- end, { desc = '[S]earch [/] in Open Files' })
466466-467467- -- Shortcut for searching your Neovim configuration files
468468- vim.keymap.set('n', '<leader>sn', function()
469469- builtin.find_files { cwd = vim.fn.stdpath 'config' }
470470- end, { desc = '[S]earch [N]eovim files' })
471471- end,
472472- },
473473-474474- -- LSP Plugins
475475- {
476476- -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
477477- -- used for completion, annotations and signatures of Neovim apis
478478- 'folke/lazydev.nvim',
479479- ft = 'lua',
480480- opts = {
481481- library = {
482482- -- Load luvit types when the `vim.uv` word is found
483483- { path = '${3rd}/luv/library', words = { 'vim%.uv' } },
484484- },
485485- },
486486- },
487487- {
488488- -- Main LSP Configuration
489489- 'neovim/nvim-lspconfig',
490490- dependencies = {
491491- -- Automatically install LSPs and related tools to stdpath for Neovim
492492- -- Mason must be loaded before its dependents so we need to set it up here.
493493- -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
494494- {
495495- 'mason-org/mason.nvim',
496496- opts = {
497497- registries = {
498498- 'github:mason-org/mason-registry',
499499- 'github:Crashdummyy/mason-registry',
500500- },
501501- },
502502- },
503503- 'mason-org/mason-lspconfig.nvim',
504504- 'WhoIsSethDaniel/mason-tool-installer.nvim',
505505-506506- -- Useful status updates for LSP.
507507- { 'j-hui/fidget.nvim', opts = {} },
508508-509509- -- Allows extra capabilities provided by blink.cmp
510510- 'saghen/blink.cmp',
511511- },
512512- config = function()
513513- -- Brief aside: **What is LSP?**
514514- --
515515- -- LSP is an initialism you've probably heard, but might not understand what it is.
516516- --
517517- -- LSP stands for Language Server Protocol. It's a protocol that helps editors
518518- -- and language tooling communicate in a standardized fashion.
519519- --
520520- -- In general, you have a "server" which is some tool built to understand a particular
521521- -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers
522522- -- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
523523- -- processes that communicate with some "client" - in this case, Neovim!
524524- --
525525- -- LSP provides Neovim with features like:
526526- -- - Go to definition
527527- -- - Find references
528528- -- - Autocompletion
529529- -- - Symbol Search
530530- -- - and more!
531531- --
532532- -- Thus, Language Servers are external tools that must be installed separately from
533533- -- Neovim. This is where `mason` and related plugins come into play.
534534- --
535535- -- If you're wondering about lsp vs treesitter, you can check out the wonderfully
536536- -- and elegantly composed help section, `:help lsp-vs-treesitter`
537537-538538- -- This function gets run when an LSP attaches to a particular buffer.
539539- -- That is to say, every time a new file is opened that is associated with
540540- -- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
541541- -- function will be executed to configure the current buffer
542542- vim.api.nvim_create_autocmd('LspAttach', {
543543- group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
544544- callback = function(event)
545545- -- NOTE: Remember that Lua is a real programming language, and as such it is possible
546546- -- to define small helper and utility functions so you don't have to repeat yourself.
547547- --
548548- -- In this case, we create a function that lets us more easily define mappings specific
549549- -- for LSP related items. It sets the mode, buffer and description for us each time.
550550- local map = function(keys, func, desc, mode)
551551- mode = mode or 'n'
552552- vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
553553- end
554554-555555- -- Rename the variable under your cursor.
556556- -- Most Language Servers support renaming across files, etc.
557557- map('grn', vim.lsp.buf.rename, '[R]e[n]ame')
558558-559559- -- Execute a code action, usually your cursor needs to be on top of an error
560560- -- or a suggestion from your LSP for this to activate.
561561- map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
562562-563563- -- Find references for the word under your cursor.
564564- map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
565565-566566- -- Jump to the implementation of the word under your cursor.
567567- -- Useful when your language has ways of declaring types without an actual implementation.
568568- map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
569569-570570- -- Jump to the definition of the word under your cursor.
571571- -- This is where a variable was first declared, or where a function is defined, etc.
572572- -- To jump back, press <C-t>.
573573- map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
574574-575575- -- WARN: This is not Goto Definition, this is Goto Declaration.
576576- -- For example, in C this would take you to the header.
577577- map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
578578-579579- -- Fuzzy find all the symbols in your current document.
580580- -- Symbols are things like variables, functions, types, etc.
581581- map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols')
582582-583583- -- Fuzzy find all the symbols in your current workspace.
584584- -- Similar to document symbols, except searches over your entire project.
585585- map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols')
586586-587587- -- Jump to the type of the word under your cursor.
588588- -- Useful when you're not sure what type a variable is and you want to see
589589- -- the definition of its *type*, not where it was *defined*.
590590- map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
591591-592592- -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
593593- ---@param client vim.lsp.Client
594594- ---@param method vim.lsp.protocol.Method
595595- ---@param bufnr? integer some lsp support methods only in specific files
596596- ---@return boolean
597597- local function client_supports_method(client, method, bufnr)
598598- if vim.fn.has 'nvim-0.11' == 1 then
599599- return client:supports_method(method, bufnr)
600600- else
601601- ---@diagnostic disable-next-line: param-type-mismatch
602602- return client.supports_method(method, { bufnr = bufnr })
603603- end
604604- end
605605-606606- -- The following two autocommands are used to highlight references of the
607607- -- word under your cursor when your cursor rests there for a little while.
608608- -- See `:help CursorHold` for information about when this is executed
609609- --
610610- -- When you move your cursor, the highlights will be cleared (the second autocommand).
611611- local client = vim.lsp.get_client_by_id(event.data.client_id)
612612- if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
613613- local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
614614- vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
615615- buffer = event.buf,
616616- group = highlight_augroup,
617617- callback = vim.lsp.buf.document_highlight,
618618- })
619619-620620- vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
621621- buffer = event.buf,
622622- group = highlight_augroup,
623623- callback = vim.lsp.buf.clear_references,
624624- })
625625-626626- vim.api.nvim_create_autocmd('LspDetach', {
627627- group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
628628- callback = function(event2)
629629- vim.lsp.buf.clear_references()
630630- vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
631631- end,
632632- })
633633- end
634634-635635- -- The following code creates a keymap to toggle inlay hints in your
636636- -- code, if the language server you are using supports them
637637- --
638638- -- This may be unwanted, since they displace some of your code
639639- if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
640640- map('<leader>th', function()
641641- vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
642642- end, '[T]oggle Inlay [H]ints')
643643- end
644644- end,
645645- })
646646-647647- -- Diagnostic Config
648648- -- See :help vim.diagnostic.Opts
649649- vim.diagnostic.config {
650650- severity_sort = true,
651651- float = { border = 'rounded', source = 'if_many' },
652652- underline = { severity = vim.diagnostic.severity.WARN },
653653- signs = vim.g.have_nerd_font and {
654654- text = {
655655- [vim.diagnostic.severity.ERROR] = ' ',
656656- [vim.diagnostic.severity.WARN] = ' ',
657657- [vim.diagnostic.severity.INFO] = ' ',
658658- [vim.diagnostic.severity.HINT] = ' ',
659659- },
660660- } or {},
661661- virtual_text = {
662662- source = 'if_many',
663663- spacing = 2,
664664- format = function(diagnostic)
665665- local diagnostic_message = {
666666- [vim.diagnostic.severity.ERROR] = diagnostic.message,
667667- [vim.diagnostic.severity.WARN] = diagnostic.message,
668668- [vim.diagnostic.severity.INFO] = diagnostic.message,
669669- [vim.diagnostic.severity.HINT] = diagnostic.message,
670670- }
671671- return diagnostic_message[diagnostic.severity]
672672- end,
673673- },
674674- }
675675-676676- -- LSP servers and clients are able to communicate to each other what features they support.
677677- -- By default, Neovim doesn't support everything that is in the LSP specification.
678678- -- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
679679- -- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
680680- local capabilities = require('blink.cmp').get_lsp_capabilities()
681681-682682- -- Enable the following language servers
683683- -- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
684684- --
685685- -- Add any additional override configuration in the following tables. Available keys are:
686686- -- - cmd (table): Override the default command used to start the server
687687- -- - filetypes (table): Override the default list of associated filetypes for the server
688688- -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
689689- -- - settings (table): Override the default settings passed when initializing the server.
690690- -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
691691- local servers = {
692692- -- clangd = {},
693693- -- gopls = {},
694694- -- pyright = {},
695695- -- rust_analyzer = {},
696696- -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
697697- --
698698- -- Some languages (like typescript) have entire language plugins that can be useful:
699699- -- https://github.com/pmizio/typescript-tools.nvim
700700- --
701701- -- But for many setups, the LSP (`ts_ls`) will work just fine
702702- -- ts_ls = {},
703703- --
704704-705705- lua_ls = {
706706- -- cmd = { ... },
707707- -- filetypes = { ... },
708708- -- capabilities = {},
709709- settings = {
710710- Lua = {
711711- completion = {
712712- callSnippet = 'Replace',
713713- },
714714- -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
715715- -- diagnostics = { disable = { 'missing-fields' } },
716716- },
717717- },
718718- },
719719- }
720720-721721- -- Ensure the servers and tools above are installed
722722- --
723723- -- To check the current status of installed tools and/or manually install
724724- -- other tools, you can run
725725- -- :Mason
726726- --
727727- -- You can press `g?` for help in this menu.
728728- --
729729- -- `mason` had to be setup earlier: to configure its options see the
730730- -- `dependencies` table for `nvim-lspconfig` above.
731731- --
732732- -- You can add other tools here that you want Mason to install
733733- -- for you, so that they are available from within Neovim.
734734- local ensure_installed = vim.tbl_keys(servers or {})
735735- vim.list_extend(ensure_installed, {
736736- 'stylua', -- Used to format Lua code
737737- })
738738- require('mason-tool-installer').setup { ensure_installed = ensure_installed }
739739-740740- require('mason-lspconfig').setup {
741741- ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
742742- automatic_installation = false,
743743- automatic_enable = true,
744744- handlers = {
745745- function(server_name)
746746- local server = servers[server_name] or {}
747747- -- This handles overriding only values explicitly passed
748748- -- by the server configuration above. Useful when disabling
749749- -- certain features of an LSP (for example, turning off formatting for ts_ls)
750750- server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
751751- require('lspconfig')[server_name].setup(server)
752752- end,
753753- },
754754- }
755755- end,
756756- },
757757-758758- { -- Autoformat
759759- 'stevearc/conform.nvim',
760760- event = { 'BufWritePre' },
761761- cmd = { 'ConformInfo' },
762762- keys = {
763763- {
764764- '<leader>f',
765765- function()
766766- require('conform').format { async = true, lsp_format = 'fallback' }
767767- end,
768768- mode = '',
769769- desc = '[F]ormat buffer',
770770- },
771771- },
772772- opts = {
773773- notify_on_error = false,
774774- format_on_save = function(bufnr)
775775- -- Disable "format_on_save lsp_fallback" for languages that don't
776776- -- have a well standardized coding style. You can add additional
777777- -- languages here or re-enable it for the disabled ones.
778778- local disable_filetypes = { c = true, cpp = true }
779779- if disable_filetypes[vim.bo[bufnr].filetype] then
780780- return nil
781781- else
782782- return {
783783- timeout_ms = 500,
784784- lsp_format = 'fallback',
785785- }
786786- end
787787- end,
788788- formatters_by_ft = {
789789- lua = { 'stylua' },
790790- -- Conform can also run multiple formatters sequentially
791791- -- python = { "isort", "black" },
792792- --
793793- -- You can use 'stop_after_first' to run the first available formatter from the list
794794- -- javascript = { "prettierd", "prettier", stop_after_first = true },
795795- },
796796- },
797797- },
798798-799799- { -- Autocompletion
800800- 'saghen/blink.cmp',
801801- event = 'VimEnter',
802802- version = '1.*',
803803- dependencies = {
804804- -- Snippet Engine
805805- {
806806- 'L3MON4D3/LuaSnip',
807807- version = '2.*',
808808- build = (function()
809809- -- Build Step is needed for regex support in snippets.
810810- -- This step is not supported in many windows environments.
811811- -- Remove the below condition to re-enable on windows.
812812- if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
813813- return
814814- end
815815- return 'make install_jsregexp'
816816- end)(),
817817- dependencies = {
818818- -- `friendly-snippets` contains a variety of premade snippets.
819819- -- See the README about individual language/framework/plugin snippets:
820820- -- https://github.com/rafamadriz/friendly-snippets
821821- {
822822- 'rafamadriz/friendly-snippets',
823823- config = function()
824824- require('luasnip.loaders.from_vscode').lazy_load()
825825- end,
826826- },
827827- },
828828- opts = {},
829829- },
830830- 'folke/lazydev.nvim',
831831- },
832832- --- @module 'blink.cmp'
833833- --- @type blink.cmp.Config
834834- opts = {
835835- keymap = {
836836- -- 'default' (recommended) for mappings similar to built-in completions
837837- -- <c-y> to accept ([y]es) the completion.
838838- -- This will auto-import if your LSP supports it.
839839- -- This will expand snippets if the LSP sent a snippet.
840840- -- 'super-tab' for tab to accept
841841- -- 'enter' for enter to accept
842842- -- 'none' for no mappings
843843- --
844844- -- For an understanding of why the 'default' preset is recommended,
845845- -- you will need to read `:help ins-completion`
846846- --
847847- -- No, but seriously. Please read `:help ins-completion`, it is really good!
848848- --
849849- -- All presets have the following mappings:
850850- -- <tab>/<s-tab>: move to right/left of your snippet expansion
851851- -- <c-space>: Open menu or open docs if already open
852852- -- <c-n>/<c-p> or <up>/<down>: Select next/previous item
853853- -- <c-e>: Hide menu
854854- -- <c-k>: Toggle signature help
855855- --
856856- -- See :h blink-cmp-config-keymap for defining your own keymap
857857- preset = 'default',
858858-859859- -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
860860- -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
861861- },
862862-863863- appearance = {
864864- -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
865865- -- Adjusts spacing to ensure icons are aligned
866866- nerd_font_variant = 'mono',
867867- },
868868-869869- completion = {
870870- -- By default, you may press `<c-space>` to show the documentation.
871871- -- Optionally, set `auto_show = true` to show the documentation after a delay.
872872- documentation = { auto_show = false, auto_show_delay_ms = 500 },
873873- },
874874-875875- sources = {
876876- default = { 'lsp', 'path', 'snippets', 'lazydev' },
877877- providers = {
878878- lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
879879- },
880880- },
881881-882882- snippets = { preset = 'luasnip' },
883883-884884- -- Blink.cmp includes an optional, recommended rust fuzzy matcher,
885885- -- which automatically downloads a prebuilt binary when enabled.
886886- --
887887- -- By default, we use the Lua implementation instead, but you may enable
888888- -- the rust implementation via `'prefer_rust_with_warning'`
889889- --
890890- -- See :h blink-cmp-config-fuzzy for more information
891891- fuzzy = { implementation = 'lua' },
892892-893893- -- Shows a signature help window while you type arguments for a function
894894- signature = { enabled = true },
895895- },
896896- },
897897-898898- { -- You can easily change to a different colorscheme.
899899- -- Change the name of the colorscheme plugin below, and then
900900- -- change the command in the config to whatever the name of that colorscheme is.
901901- --
902902- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
903903- 'wojciechkepka/vim-github-dark',
904904- priority = 1000, -- Make sure to load this before all the other start plugins.
905905- config = function()
906906- ---@diagnostic disable-next-line: missing-fields
907907- --require('vim-github-dark').setup {
908908- -- styles = {
909909- -- comments = { italic = false }, -- Disable italics in comments
910910- -- },
911911- --}
912912-913913- -- Load the colorscheme here.
914914- -- Like many other themes, this one has different styles, and you could load
915915- -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
916916- vim.cmd.colorscheme 'ghdark'
917917- end,
918918- },
919919-920920- -- Highlight todo, notes, etc in comments
921921- {
922922- 'folke/todo-comments.nvim',
923923- event = 'VimEnter',
924924- dependencies = { 'nvim-lua/plenary.nvim' },
925925- opts = { signs = true },
926926- },
927927-928928- { -- Collection of various small independent plugins/modules
929929- 'echasnovski/mini.nvim',
930930- config = function()
931931- -- Better Around/Inside textobjects
932932- --
933933- -- Examples:
934934- -- - va) - [V]isually select [A]round [)]paren
935935- -- - yinq - [Y]ank [I]nside [N]ext [Q]uote
936936- -- - ci' - [C]hange [I]nside [']quote
937937- require('mini.ai').setup { n_lines = 500 }
938938-939939- -- Add/delete/replace surroundings (brackets, quotes, etc.)
940940- --
941941- -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
942942- -- - sd' - [S]urround [D]elete [']quotes
943943- -- - sr)' - [S]urround [R]eplace [)] [']
944944- require('mini.surround').setup()
945945-946946- require('mini.tabline').setup {
947947- show_icons = vim.g.have_nerd_font,
948948- tabpage_section = 'right',
949949- }
950950-951951- -- Simple and easy statusline.
952952- -- You could remove this setup call if you don't like it,
953953- -- and try some other statusline plugin
954954- local statusline = require 'mini.statusline'
955955- -- set use_icons to true if you have a Nerd Font
956956- statusline.setup { use_icons = vim.g.have_nerd_font }
957957-958958- -- You can configure sections in the statusline by overriding their
959959- -- default behavior. For example, here we set the section for
960960- -- cursor location to LINE:COLUMN
961961- ---@diagnostic disable-next-line: duplicate-set-field
962962- statusline.section_location = function()
963963- return '%2l:%-2v'
964964- end
965965-966966- -- ... and there is more!
967967- -- Check out: https://github.com/echasnovski/mini.nvim
968968- end,
969969- },
970970- { -- Highlight, edit, and navigate code
971971- 'nvim-treesitter/nvim-treesitter',
972972- build = ':TSUpdate',
973973- main = 'nvim-treesitter.configs', -- Sets main module to use for opts
974974- -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
975975- opts = {
976976- ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
977977- -- Autoinstall languages that are not installed
978978- auto_install = true,
979979- highlight = {
980980- enable = true,
981981- -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
982982- -- If you are experiencing weird indenting issues, add the language to
983983- -- the list of additional_vim_regex_highlighting and disabled languages for indent.
984984- additional_vim_regex_highlighting = { 'ruby' },
985985- },
986986- indent = { enable = true, disable = { 'ruby' } },
987987- },
988988- -- There are additional nvim-treesitter modules that you can use to interact
989989- -- with nvim-treesitter. You should go explore a few and see what interests you:
990990- --
991991- -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
992992- -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
993993- -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
994994- },
995995-996996- -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
997997- -- init.lua. If you want these files, they are in the repository, so you can just download them and
998998- -- place them in the correct locations.
999999-10001000- -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
10011001- --
10021002- -- Here are some example plugins that I've included in the Kickstart repository.
10031003- -- Uncomment any of the lines below to enable them (you will need to restart nvim).
10041004- --
10051005- require 'kickstart.plugins.debug',
10061006- require 'kickstart.plugins.indent_line',
10071007- require 'kickstart.plugins.lint',
10081008- require 'kickstart.plugins.autopairs',
10091009- require 'kickstart.plugins.neo-tree',
10101010- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
10111011-10121012- -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
10131013- -- This is the easiest way to modularize your config.
10141014- --
10151015- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
10161016- { import = 'custom.plugins' },
10171017- --
10181018- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
10191019- -- Or use telescope!
10201020- -- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
10211021- -- you can continue same window with `<space>sr` which resumes last telescope search
10221022-}, {
10231023- ui = {
10241024- -- If you are using a Nerd Font: set icons to an empty table which will use the
10251025- -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
10261026- icons = vim.g.have_nerd_font and {} or {
10271027- cmd = '⌘',
10281028- config = '🛠',
10291029- event = '📅',
10301030- ft = '📂',
10311031- init = '⚙',
10321032- keys = '🗝',
10331033- plugin = '🔌',
10341034- runtime = '💻',
10351035- require = '🌙',
10361036- source = '📄',
10371037- start = '🚀',
10381038- task = '📌',
10391039- lazy = '💤 ',
10401040- },
10411041- },
10421042-})
10431043-10441044--- The line beneath this is called `modeline`. See `:help modeline`
10451045--- vim: ts=2 sts=2 sw=2 et
···11--- You can add your own plugins here or in other files in this directory!
22--- I promise not to create any merge conflicts in this directory :)
33---
44--- See the kickstart.nvim README for more information
55-return {
66- { import = 'custom.plugins.csharp' },
77- { 'wojciechkepka/vim-github-dark' },
88- { 'wellle/context.vim' },
99- { 'tpope/vim-fugitive' },
1010- { import = 'custom.plugins.chipsoft' },
1111-}
···11---[[
22---
33--- This file is not required for your own configuration,
44--- but helps people determine if their system is setup correctly.
55---
66---]]
77-88-local check_version = function()
99- local verstr = tostring(vim.version())
1010- if not vim.version.ge then
1111- vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
1212- return
1313- end
1414-1515- if vim.version.ge(vim.version(), '0.10-dev') then
1616- vim.health.ok(string.format("Neovim version is: '%s'", verstr))
1717- else
1818- vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
1919- end
2020-end
2121-2222-local check_external_reqs = function()
2323- -- Basic utils: `git`, `make`, `unzip`
2424- for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
2525- local is_executable = vim.fn.executable(exe) == 1
2626- if is_executable then
2727- vim.health.ok(string.format("Found executable: '%s'", exe))
2828- else
2929- vim.health.warn(string.format("Could not find executable: '%s'", exe))
3030- end
3131- end
3232-3333- return true
3434-end
3535-3636-return {
3737- check = function()
3838- vim.health.start 'kickstart.nvim'
3939-4040- vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
4141-4242- Fix only warnings for plugins and languages you intend to use.
4343- Mason will give warnings for languages that are not installed.
4444- You do not need to install, unless you want to use those languages!]]
4545-4646- local uv = vim.uv or vim.loop
4747- vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
4848-4949- check_version()
5050- check_external_reqs()
5151- end,
5252-}