···11+## where to store your database, default is your system data directory
22+## linux/mac: ~/.local/share/atuin/history.db
33+## windows: %USERPROFILE%/.local/share/atuin/history.db
44+# db_path = "~/.history.db"
55+66+## where to store your encryption key, default is your system data directory
77+## linux/mac: ~/.local/share/atuin/key
88+## windows: %USERPROFILE%/.local/share/atuin/key
99+# key_path = "~/.key"
1010+1111+## where to store your auth session token, default is your system data directory
1212+## linux/mac: ~/.local/share/atuin/session
1313+## windows: %USERPROFILE%/.local/share/atuin/session
1414+# session_path = "~/.session"
1515+1616+## date format used, either "us" or "uk"
1717+# dialect = "us"
1818+1919+## default timezone to use when displaying time
2020+## either "l", "local" to use the system's current local timezone, or an offset
2121+## from UTC in the format of "<+|->H[H][:M[M][:S[S]]]"
2222+## for example: "+9", "-05", "+03:30", "-01:23:45", etc.
2323+# timezone = "local"
2424+2525+## enable or disable automatic sync
2626+# auto_sync = true
2727+2828+## enable or disable automatic update checks
2929+# update_check = true
3030+3131+## address of the sync server
3232+# sync_address = "https://api.atuin.sh"
3333+3434+## how often to sync history. note that this is only triggered when a command
3535+## is ran, so sync intervals may well be longer
3636+## set it to 0 to sync after every command
3737+# sync_frequency = "10m"
3838+3939+## which search mode to use
4040+## possible values: prefix, fulltext, fuzzy, skim
4141+# search_mode = "fuzzy"
4242+4343+## which filter mode to use by default
4444+## possible values: "global", "host", "session", "directory", "workspace"
4545+## consider using search.filters to customize the enablement and order of filter modes
4646+# filter_mode = "global"
4747+4848+## With workspace filtering enabled, Atuin will filter for commands executed
4949+## in any directory within a git repository tree (default: false).
5050+##
5151+## To use workspace mode by default when available, set this to true and
5252+## set filter_mode to "workspace" or leave it unspecified and
5353+## set search.filters to include "workspace" before other filter modes.
5454+# workspaces = false
5555+5656+## which filter mode to use when atuin is invoked from a shell up-key binding
5757+## the accepted values are identical to those of "filter_mode"
5858+## leave unspecified to use same mode set in "filter_mode"
5959+# filter_mode_shell_up_key_binding = "global"
6060+6161+## which search mode to use when atuin is invoked from a shell up-key binding
6262+## the accepted values are identical to those of "search_mode"
6363+## leave unspecified to use same mode set in "search_mode"
6464+# search_mode_shell_up_key_binding = "fuzzy"
6565+6666+## which style to use
6767+## possible values: auto, full, compact
6868+# style = "auto"
6969+7070+## the maximum number of lines the interface should take up
7171+## set it to 0 to always go full screen
7272+# inline_height = 0
7373+7474+## Invert the UI - put the search bar at the top , Default to `false`
7575+# invert = false
7676+7777+## enable or disable showing a preview of the selected command
7878+## useful when the command is longer than the terminal width and is cut off
7979+# show_preview = true
8080+8181+## what to do when the escape key is pressed when searching
8282+## possible values: return-original, return-query
8383+# exit_mode = "return-original"
8484+8585+## possible values: emacs, subl
8686+# word_jump_mode = "emacs"
8787+8888+## characters that count as a part of a word
8989+# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
9090+9191+## number of context lines to show when scrolling by pages
9292+# scroll_context_lines = 1
9393+9494+## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts
9595+## alt-0 .. alt-9
9696+# ctrl_n_shortcuts = false
9797+9898+## default history list format - can also be specified with the --format arg
9999+# history_format = "{time}\t{command}\t{duration}"
100100+101101+## prevent commands matching any of these regexes from being written to history.
102102+## Note that these regular expressions are unanchored, i.e. if they don't start
103103+## with ^ or end with $, they'll match anywhere in the command.
104104+## For details on the supported regular expression syntax, see
105105+## https://docs.rs/regex/latest/regex/#syntax
106106+# history_filter = [
107107+# "^secret-cmd",
108108+# "^innocuous-cmd .*--secret=.+",
109109+# ]
110110+111111+## prevent commands run with cwd matching any of these regexes from being written
112112+## to history. Note that these regular expressions are unanchored, i.e. if they don't
113113+## start with ^ or end with $, they'll match anywhere in CWD.
114114+## For details on the supported regular expression syntax, see
115115+## https://docs.rs/regex/latest/regex/#syntax
116116+# cwd_filter = [
117117+# "^/very/secret/area",
118118+# ]
119119+120120+## Configure the maximum height of the preview to show.
121121+## Useful when you have long scripts in your history that you want to distinguish
122122+## by more than the first few lines.
123123+# max_preview_height = 4
124124+125125+## Configure whether or not to show the help row, which includes the current Atuin
126126+## version (and whether an update is available), a keymap hint, and the total
127127+## amount of commands in your history.
128128+# show_help = true
129129+130130+## Configure whether or not to show tabs for search and inspect
131131+# show_tabs = true
132132+133133+## Configure whether or not the tabs row may be auto-hidden, which includes the current Atuin
134134+## tab, such as Search or Inspector, and other tabs you may wish to see. This will
135135+## only be hidden if there are fewer than this count of lines available, and does not affect the use
136136+## of keyboard shortcuts to switch tab. 0 to never auto-hide, default is 8 (lines).
137137+## This is ignored except in `compact` mode.
138138+# auto_hide_height = 8
139139+140140+## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include
141141+## 1. AWS key id
142142+## 2. Github pat (old and new)
143143+## 3. Slack oauth tokens (bot, user)
144144+## 4. Slack webhooks
145145+## 5. Stripe live/test keys
146146+# secrets_filter = true
147147+148148+## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit.
149149+# This applies for new installs. Old installs will keep the old behaviour unless configured otherwise.
150150+enter_accept = true
151151+152152+## Defaults to "emacs". This specifies the keymap on the startup of `atuin
153153+## search`. If this is set to "auto", the startup keymap mode in the Atuin
154154+## search is automatically selected based on the shell's keymap where the
155155+## keybinding is defined. If this is set to "emacs", "vim-insert", or
156156+## "vim-normal", the startup keymap mode in the Atuin search is forced to be
157157+## the specified one.
158158+# keymap_mode = "auto"
159159+160160+## Cursor style in each keymap mode. If specified, the cursor style is changed
161161+## in entering the cursor shape. Available values are "default" and
162162+## "{blink,steady}-{block,underline,bar}".
163163+# keymap_cursor = { emacs = "blink-block", vim_insert = "blink-block", vim_normal = "steady-block" }
164164+165165+# network_connect_timeout = 5
166166+# network_timeout = 5
167167+168168+## Timeout (in seconds) for acquiring a local database connection (sqlite)
169169+# local_timeout = 5
170170+171171+## Set this to true and Atuin will minimize motion in the UI - timers will not update live, etc.
172172+## Alternatively, set env NO_MOTION=true
173173+# prefers_reduced_motion = false
174174+175175+[stats]
176176+## Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl
177177+# common_subcommands = [
178178+# "apt",
179179+# "cargo",
180180+# "composer",
181181+# "dnf",
182182+# "docker",
183183+# "git",
184184+# "go",
185185+# "ip",
186186+# "kubectl",
187187+# "nix",
188188+# "nmcli",
189189+# "npm",
190190+# "pecl",
191191+# "pnpm",
192192+# "podman",
193193+# "port",
194194+# "systemctl",
195195+# "tmux",
196196+# "yarn",
197197+# ]
198198+199199+## Set commands that should be totally stripped and ignored from stats
200200+# common_prefix = ["sudo"]
201201+202202+## Set commands that will be completely ignored from stats
203203+# ignored_commands = [
204204+# "cd",
205205+# "ls",
206206+# "vi"
207207+# ]
208208+209209+[keys]
210210+# Defaults to true. If disabled, using the up/down key won't exit the TUI when scrolled past the first/last entry.
211211+# scroll_exits = true
212212+213213+[sync]
214214+# Enable sync v2 by default
215215+# This ensures that sync v2 is enabled for new installs only
216216+# In a later release it will become the default across the board
217217+records = true
218218+219219+[preview]
220220+## which preview strategy to use to calculate the preview height (respects max_preview_height).
221221+## possible values: auto, static
222222+## auto: length of the selected command.
223223+## static: length of the longest command stored in the history.
224224+## fixed: use max_preview_height as fixed height.
225225+# strategy = "auto"
226226+227227+[daemon]
228228+## Enables using the daemon to sync. Requires the daemon to be running in the background. Start it with `atuin daemon`
229229+# enabled = false
230230+231231+## How often the daemon should sync in seconds
232232+# sync_frequency = 300
233233+234234+## The path to the unix socket used by the daemon (on unix systems)
235235+## linux/mac: ~/.local/share/atuin/atuin.sock
236236+## windows: Not Supported
237237+# socket_path = "~/.local/share/atuin/atuin.sock"
238238+239239+## Use systemd socket activation rather than opening the given path (the path must still be correct for the client)
240240+## linux: false
241241+## mac/windows: Not Supported
242242+# systemd_socket = false
243243+244244+## The port that should be used for TCP on non unix systems
245245+# tcp_port = 8889
246246+247247+# [theme]
248248+## Color theme to use for rendering in the terminal.
249249+## There are some built-in themes, including the base theme ("default"),
250250+## "autumn" and "marine". You can add your own themes to the "./themes" subdirectory of your
251251+## Atuin config (or ATUIN_THEME_DIR, if provided) as TOML files whose keys should be one or
252252+## more of AlertInfo, AlertWarn, AlertError, Annotation, Base, Guidance, Important, and
253253+## the string values as lowercase entries from this list:
254254+## https://ogeon.github.io/docs/palette/master/palette/named/index.html
255255+## If you provide a custom theme file, it should be called "NAME.toml" and the theme below
256256+## should be the stem, i.e. `theme = "NAME"` for your chosen NAME.
257257+# name = "autumn"
258258+259259+## Whether the theme manager should output normal or extra information to help fix themes.
260260+## Boolean, true or false. If unset, left up to the theme manager.
261261+# debug = true
262262+263263+[search]
264264+## The list of enabled filter modes, in order of priority.
265265+## The "workspace" mode is skipped when not in a workspace or workspaces = false.
266266+## Default filter mode can be overridden with the filter_mode setting.
267267+# filters = [ "global", "host", "session", "workspace", "directory" ]
···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:
+869
config/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 how 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 sure exactly 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 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 nvim 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
9494+vim.g.have_nerd_font = true
9595+9696+-- [[ Setting options ]]
9797+-- See `:help vim.opt`
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.opt.number = true
103103+-- You can also add relative line numbers, for help with jumping.
104104+-- Experiment for yourself to see if you like it!
105105+-- vim.opt.relativenumber = true
106106+107107+-- Enable mouse mode, can be useful for resizing splits for example!
108108+vim.opt.mouse = 'a'
109109+110110+-- Don't show the mode, since it's already in status line
111111+vim.opt.showmode = false
112112+113113+-- Sync clipboard between OS and Neovim.
114114+-- Remove this option if you want your OS clipboard to remain independent.
115115+-- See `:help 'clipboard'`
116116+vim.opt.clipboard = 'unnamedplus'
117117+118118+-- Enable break indent
119119+vim.opt.breakindent = true
120120+121121+-- Save undo history
122122+vim.opt.undofile = true
123123+124124+-- Case-insensitive searching UNLESS \C or capital in search
125125+vim.opt.ignorecase = true
126126+vim.opt.smartcase = true
127127+128128+-- Keep signcolumn on by default
129129+vim.opt.signcolumn = 'yes'
130130+131131+-- Decrease update time
132132+vim.opt.updatetime = 250
133133+vim.opt.timeoutlen = 300
134134+135135+-- Configure how new splits should be opened
136136+vim.opt.splitright = true
137137+vim.opt.splitbelow = true
138138+139139+-- Sets how neovim will display certain whitespace in the editor.
140140+-- See `:help 'list'`
141141+-- and `:help 'listchars'`
142142+vim.opt.list = true
143143+vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
144144+145145+-- Preview substitutions live, as you type!
146146+vim.opt.inccommand = 'split'
147147+148148+-- Show which line your cursor is on
149149+vim.opt.cursorline = true
150150+151151+-- Minimal number of screen lines to keep above and below the cursor.
152152+vim.opt.scrolloff = 10
153153+154154+-- [[ Basic Keymaps ]]
155155+-- See `:help vim.keymap.set()`
156156+157157+-- Set highlight on search, but clear on pressing <Esc> in normal mode
158158+vim.opt.hlsearch = true
159159+vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
160160+161161+-- Diagnostic keymaps
162162+vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
163163+vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
164164+vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
165165+vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
166166+167167+-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
168168+-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
169169+-- is not what someone will guess without a bit more experience.
170170+--
171171+-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
172172+-- or just use <C-\><C-n> to exit terminal mode
173173+vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
174174+175175+-- TIP: Disable arrow keys in normal mode
176176+-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
177177+-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
178178+-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
179179+-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
180180+181181+-- Keybinds to make split navigation easier.
182182+-- Use CTRL+<hjkl> to switch between windows
183183+--
184184+-- See `:help wincmd` for a list of all window commands
185185+vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
186186+vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
187187+vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
188188+vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
189189+190190+-- [[ Basic Autocommands ]]
191191+-- See `:help lua-guide-autocommands`
192192+193193+-- Highlight when yanking (copying) text
194194+-- Try it with `yap` in normal mode
195195+-- See `:help vim.highlight.on_yank()`
196196+vim.api.nvim_create_autocmd('TextYankPost', {
197197+ desc = 'Highlight when yanking (copying) text',
198198+ group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
199199+ callback = function()
200200+ vim.highlight.on_yank()
201201+ end,
202202+})
203203+204204+-- [[ Install `lazy.nvim` plugin manager ]]
205205+-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
206206+local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
207207+if not vim.loop.fs_stat(lazypath) then
208208+ local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
209209+ vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
210210+end ---@diagnostic disable-next-line: undefined-field
211211+vim.opt.rtp:prepend(lazypath)
212212+213213+-- [[ Configure and install plugins ]]
214214+--
215215+-- To check the current status of your plugins, run
216216+-- :Lazy
217217+--
218218+-- You can press `?` in this menu for help. Use `:q` to close the window
219219+--
220220+-- To update plugins, you can run
221221+-- :Lazy update
222222+--
223223+-- NOTE: Here is where you install your plugins.
224224+225225+require('lazy').setup({
226226+ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
227227+ 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
228228+229229+ {
230230+ 'supermaven-inc/supermaven-nvim',
231231+ config = function()
232232+ require('supermaven-nvim').setup {}
233233+ end,
234234+ },
235235+236236+ -- NOTE: Plugins can also be added by using a table,
237237+ -- with the first argument being the link and the following
238238+ -- keys can be used to configure plugin behavior/loading/etc.
239239+ --
240240+ -- Use `opts = {}` to force a plugin to be loaded.
241241+ --
242242+ -- This is equivalent to:
243243+ -- require('Comment').setup({})
244244+245245+ -- "gc" to comment visual regions/lines
246246+ { 'numToStr/Comment.nvim', opts = {} },
247247+248248+ -- Here is a more advanced example where we pass configuration
249249+ -- options to `gitsigns.nvim`. This is equivalent to the following lua:
250250+ -- require('gitsigns').setup({ ... })
251251+ --
252252+ -- See `:help gitsigns` to understand what the configuration keys do
253253+ { -- Adds git related signs to the gutter, as well as utilities for managing changes
254254+ 'lewis6991/gitsigns.nvim',
255255+ opts = {
256256+ signs = {
257257+ add = { text = '+' },
258258+ change = { text = '~' },
259259+ delete = { text = '_' },
260260+ topdelete = { text = '‾' },
261261+ changedelete = { text = '~' },
262262+ },
263263+ },
264264+ },
265265+266266+ -- NOTE: Plugins can also be configured to run lua code when they are loaded.
267267+ --
268268+ -- This is often very useful to both group configuration, as well as handle
269269+ -- lazy loading plugins that don't need to be loaded immediately at startup.
270270+ --
271271+ -- For example, in the following configuration, we use:
272272+ -- event = 'VimEnter'
273273+ --
274274+ -- which loads which-key before all the UI elements are loaded. Events can be
275275+ -- normal autocommands events (`:help autocmd-events`).
276276+ --
277277+ -- Then, because we use the `config` key, the configuration only runs
278278+ -- after the plugin has been loaded:
279279+ -- config = function() ... end
280280+281281+ -- { -- Useful plugin to show you pending keybinds.
282282+ -- 'folke/which-key.nvim',
283283+ -- event = 'VimEnter', -- Sets the loading event to 'VimEnter'
284284+ -- config = function() -- This is the function that runs, AFTER loading
285285+ -- require('which-key').setup()
286286+ -- require('which-key').register {
287287+ -- ['<leader>'] = {
288288+ -- c = { name = '[C]ode' },
289289+ -- d = { name = '[D]ocument' },
290290+ -- r = { name = '[R]ename' },
291291+ -- s = { name = '[S]earch' },
292292+ -- w = { name = '[W]orkspace' },
293293+ -- }
294294+ -- }
295295+ -- end,
296296+ -- },
297297+298298+ -- NOTE: Plugins can specify dependencies.
299299+ --
300300+ -- The dependencies are proper plugin specifications as well - anything
301301+ -- you do for a plugin at the top level, you can do for a dependency.
302302+ --
303303+ -- Use the `dependencies` key to specify the dependencies of a particular plugin
304304+ -- Use the `dependencies` key to specify the dependencies of a particular plugin
305305+306306+ { -- Fuzzy Finder (files, lsp, etc)
307307+ 'nvim-telescope/telescope.nvim',
308308+ event = 'VimEnter',
309309+ branch = '0.1.x',
310310+ dependencies = {
311311+ 'nvim-lua/plenary.nvim',
312312+ { -- If encountering errors, see telescope-fzf-native README for install instructions
313313+ 'nvim-telescope/telescope-fzf-native.nvim',
314314+315315+ -- `build` is used to run some command when the plugin is installed/updated.
316316+ -- This is only run then, not every time Neovim starts up.
317317+ build = 'make',
318318+319319+ -- `cond` is a condition used to determine whether this plugin should be
320320+ -- installed and loaded.
321321+ cond = function()
322322+ return vim.fn.executable 'make' == 1
323323+ end,
324324+ },
325325+ { 'nvim-telescope/telescope-ui-select.nvim' },
326326+327327+ -- Useful for getting pretty icons, but requires a Nerd Font.
328328+ { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
329329+ },
330330+ config = function()
331331+ -- Telescope is a fuzzy finder that comes with a lot of different things that
332332+ -- it can fuzzy find! It's more than just a "file finder", it can search
333333+ -- many different aspects of Neovim, your workspace, LSP, and more!
334334+ --
335335+ -- The easiest way to use telescope, is to start by doing something like:
336336+ -- :Telescope help_tags
337337+ --
338338+ -- After running this command, a window will open up and you're able to
339339+ -- type in the prompt window. You'll see a list of help_tags options and
340340+ -- a corresponding preview of the help.
341341+ --
342342+ -- Two important keymaps to use while in telescope are:
343343+ -- - Insert mode: <c-/>
344344+ -- - Normal mode: ?
345345+ --
346346+ -- This opens a window that shows you all of the keymaps for the current
347347+ -- telescope picker. This is really useful to discover what Telescope can
348348+ -- do as well as how to actually do it!
349349+350350+ -- [[ Configure Telescope ]]
351351+ -- See `:help telescope` and `:help telescope.setup()`
352352+ require('telescope').setup {
353353+ -- You can put your default mappings / updates / etc. in here
354354+ -- All the info you're looking for is in `:help telescope.setup()`
355355+ --
356356+ -- defaults = {
357357+ -- mappings = {
358358+ -- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
359359+ -- },
360360+ -- },
361361+ -- pickers = {}
362362+ extensions = {
363363+ ['ui-select'] = {
364364+ require('telescope.themes').get_dropdown(),
365365+ },
366366+ },
367367+ }
368368+369369+ -- Enable telescope extensions, if they are installed
370370+ pcall(require('telescope').load_extension, 'fzf')
371371+ pcall(require('telescope').load_extension, 'ui-select')
372372+373373+ -- See `:help telescope.builtin`
374374+ local builtin = require 'telescope.builtin'
375375+ vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
376376+ vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
377377+ vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
378378+ vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
379379+ vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
380380+ vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
381381+ vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
382382+ vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
383383+ vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
384384+ vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
385385+386386+ -- Slightly advanced example of overriding default behavior and theme
387387+ vim.keymap.set('n', '<leader>/', function()
388388+ -- You can pass additional configuration to telescope to change theme, layout, etc.
389389+ builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
390390+ winblend = 10,
391391+ previewer = false,
392392+ })
393393+ end, { desc = '[/] Fuzzily search in current buffer' })
394394+395395+ -- Also possible to pass additional configuration options.
396396+ -- See `:help telescope.builtin.live_grep()` for information about particular keys
397397+ vim.keymap.set('n', '<leader>s/', function()
398398+ builtin.live_grep {
399399+ grep_open_files = true,
400400+ prompt_title = 'Live Grep in Open Files',
401401+ }
402402+ end, { desc = '[S]earch [/] in Open Files' })
403403+404404+ -- Shortcut for searching your neovim configuration files
405405+ vim.keymap.set('n', '<leader>sn', function()
406406+ builtin.find_files { cwd = vim.fn.stdpath 'config' }
407407+ end, { desc = '[S]earch [N]eovim files' })
408408+ end,
409409+ },
410410+411411+ { -- LSP Configuration & Plugins
412412+ 'neovim/nvim-lspconfig',
413413+ dependencies = {
414414+ -- Automatically install LSPs and related tools to stdpath for neovim
415415+ 'williamboman/mason.nvim',
416416+ 'williamboman/mason-lspconfig.nvim',
417417+ 'WhoIsSethDaniel/mason-tool-installer.nvim',
418418+419419+ -- Useful status updates for LSP.
420420+ -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
421421+ { 'j-hui/fidget.nvim', opts = {} },
422422+ },
423423+ config = function()
424424+ -- Brief Aside: **What is LSP?**
425425+ --
426426+ -- LSP is an acronym you've probably heard, but might not understand what it is.
427427+ --
428428+ -- LSP stands for Language Server Protocol. It's a protocol that helps editors
429429+ -- and language tooling communicate in a standardized fashion.
430430+ --
431431+ -- In general, you have a "server" which is some tool built to understand a particular
432432+ -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc). These Language Servers
433433+ -- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
434434+ -- processes that communicate with some "client" - in this case, Neovim!
435435+ --
436436+ -- LSP provides Neovim with features like:
437437+ -- - Go to definition
438438+ -- - Find references
439439+ -- - Autocompletion
440440+ -- - Symbol Search
441441+ -- - and more!
442442+ --
443443+ -- Thus, Language Servers are external tools that must be installed separately from
444444+ -- Neovim. This is where `mason` and related plugins come into play.
445445+ --
446446+ -- If you're wondering about lsp vs treesitter, you can check out the wonderfully
447447+ -- and elegantly composed help section, `:help lsp-vs-treesitter`
448448+449449+ -- This function gets run when an LSP attaches to a particular buffer.
450450+ -- That is to say, every time a new file is opened that is associated with
451451+ -- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
452452+ -- function will be executed to configure the current buffer
453453+ vim.api.nvim_create_autocmd('LspAttach', {
454454+ group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
455455+ callback = function(event)
456456+ -- NOTE: Remember that lua is a real programming language, and as such it is possible
457457+ -- to define small helper and utility functions so you don't have to repeat yourself
458458+ -- many times.
459459+ --
460460+ -- In this case, we create a function that lets us more easily define mappings specific
461461+ -- for LSP related items. It sets the mode, buffer and description for us each time.
462462+ local map = function(keys, func, desc)
463463+ vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
464464+ end
465465+466466+ -- Jump to the definition of the word under your cursor.
467467+ -- This is where a variable was first declared, or where a function is defined, etc.
468468+ -- To jump back, press <C-t>.
469469+ map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
470470+471471+ -- Find references for the word under your cursor.
472472+ map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
473473+474474+ -- Jump to the implementation of the word under your cursor.
475475+ -- Useful when your language has ways of declaring types without an actual implementation.
476476+ map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
477477+478478+ -- Jump to the type of the word under your cursor.
479479+ -- Useful when you're not sure what type a variable is and you want to see
480480+ -- the definition of its *type*, not where it was *defined*.
481481+ map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
482482+483483+ -- Fuzzy find all the symbols in your current document.
484484+ -- Symbols are things like variables, functions, types, etc.
485485+ map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
486486+487487+ -- Fuzzy find all the symbols in your current workspace
488488+ -- Similar to document symbols, except searches over your whole project.
489489+ map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
490490+491491+ -- Rename the variable under your cursor
492492+ -- Most Language Servers support renaming across files, etc.
493493+ map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
494494+495495+ -- Execute a code action, usually your cursor needs to be on top of an error
496496+ -- or a suggestion from your LSP for this to activate.
497497+ map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
498498+499499+ -- Opens a popup that displays documentation about the word under your cursor
500500+ -- See `:help K` for why this keymap
501501+ map('K', vim.lsp.buf.hover, 'Hover Documentation')
502502+503503+ -- WARN: This is not Goto Definition, this is Goto Declaration.
504504+ -- For example, in C this would take you to the header
505505+ map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
506506+507507+ -- The following two autocommands are used to highlight references of the
508508+ -- word under your cursor when your cursor rests there for a little while.
509509+ -- See `:help CursorHold` for information about when this is executed
510510+ --
511511+ -- When you move your cursor, the highlights will be cleared (the second autocommand).
512512+ local client = vim.lsp.get_client_by_id(event.data.client_id)
513513+ if client and client.server_capabilities.documentHighlightProvider then
514514+ vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
515515+ buffer = event.buf,
516516+ callback = vim.lsp.buf.document_highlight,
517517+ })
518518+519519+ vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
520520+ buffer = event.buf,
521521+ callback = vim.lsp.buf.clear_references,
522522+ })
523523+ end
524524+ end,
525525+ })
526526+527527+ -- LSP servers and clients are able to communicate to each other what features they support.
528528+ -- By default, Neovim doesn't support everything that is in the LSP Specification.
529529+ -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
530530+ -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
531531+ local capabilities = vim.lsp.protocol.make_client_capabilities()
532532+ capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
533533+534534+ -- Enable the following language servers
535535+ -- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
536536+ --
537537+ -- Add any additional override configuration in the following tables. Available keys are:
538538+ -- - cmd (table): Override the default command used to start the server
539539+ -- - filetypes (table): Override the default list of associated filetypes for the server
540540+ -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
541541+ -- - settings (table): Override the default settings passed when initializing the server.
542542+ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
543543+ local servers = {
544544+ -- clangd = {},
545545+ -- gopls = {},
546546+ -- pyright = {},
547547+ -- rust_analyzer = {},
548548+ -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
549549+ --
550550+ -- Some languages (like typescript) have entire language plugins that can be useful:
551551+ -- https://github.com/pmizio/typescript-tools.nvim
552552+ --
553553+ -- But for many setups, the LSP (`tsserver`) will work just fine
554554+ -- tsserver = {},
555555+ --
556556+557557+ lua_ls = {
558558+ -- cmd = {...},
559559+ -- filetypes { ...},
560560+ -- capabilities = {},
561561+ settings = {
562562+ Lua = {
563563+ runtime = { version = 'LuaJIT' },
564564+ workspace = {
565565+ checkThirdParty = false,
566566+ -- Tells lua_ls where to find all the Lua files that you have loaded
567567+ -- for your neovim configuration.
568568+ library = {
569569+ '${3rd}/luv/library',
570570+ unpack(vim.api.nvim_get_runtime_file('', true)),
571571+ },
572572+ -- If lua_ls is really slow on your computer, you can try this instead:
573573+ -- library = { vim.env.VIMRUNTIME },
574574+ },
575575+ completion = {
576576+ callSnippet = 'Replace',
577577+ },
578578+ -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
579579+ -- diagnostics = { disable = { 'missing-fields' } },
580580+ },
581581+ },
582582+ },
583583+584584+ ruff = {
585585+ init_options = {
586586+ settings = {
587587+ -- Any extra CLI arguments for `ruff` go here.
588588+ args = {},
589589+ },
590590+ },
591591+ },
592592+ }
593593+594594+ -- Ensure the servers and tools above are installed
595595+ -- To check the current status of installed tools and/or manually install
596596+ -- other tools, you can run
597597+ -- :Mason
598598+ --
599599+ -- You can press `g?` for help in this menu
600600+ require('mason').setup()
601601+602602+ -- You can add other tools here that you want Mason to install
603603+ -- for you, so that they are available from within Neovim.
604604+ local ensure_installed = vim.tbl_keys(servers or {})
605605+ vim.list_extend(ensure_installed, {
606606+ 'stylua', -- Used to format lua code
607607+ 'ruff', -- Python linter (new integrated server)
608608+ 'pyright', -- Python type checker
609609+ })
610610+ require('mason-tool-installer').setup { ensure_installed = ensure_installed }
611611+612612+ require('mason-lspconfig').setup {
613613+ handlers = {
614614+ function(server_name)
615615+ local server = servers[server_name] or {}
616616+ -- This handles overriding only values explicitly passed
617617+ -- by the server configuration above. Useful when disabling
618618+ -- certain features of an LSP (for example, turning off formatting for tsserver)
619619+ server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
620620+ require('lspconfig')[server_name].setup(server)
621621+ end,
622622+ },
623623+ }
624624+ end,
625625+ },
626626+627627+ { -- Autoformat
628628+ 'stevearc/conform.nvim',
629629+ opts = {
630630+ notify_on_error = false,
631631+ format_on_save = {
632632+ timeout_ms = 500,
633633+ lsp_fallback = true,
634634+ },
635635+ formatters_by_ft = {
636636+ lua = { 'stylua' },
637637+ python = { 'ruff_format' }, -- Use Ruff for Python formatting
638638+ },
639639+ },
640640+ },
641641+642642+ { -- Autocompletion
643643+ 'hrsh7th/nvim-cmp',
644644+ event = 'InsertEnter',
645645+ dependencies = {
646646+ -- Snippet Engine & its associated nvim-cmp source
647647+ {
648648+ 'L3MON4D3/LuaSnip',
649649+ build = (function()
650650+ -- Build Step is needed for regex support in snippets
651651+ -- This step is not supported in many windows environments
652652+ -- Remove the below condition to re-enable on windows
653653+ if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
654654+ return
655655+ end
656656+ return 'make install_jsregexp'
657657+ end)(),
658658+ },
659659+ 'saadparwaiz1/cmp_luasnip',
660660+661661+ -- Adds other completion capabilities.
662662+ -- nvim-cmp does not ship with all sources by default. They are split
663663+ -- into multiple repos for maintenance purposes.
664664+ 'hrsh7th/cmp-nvim-lsp',
665665+ 'hrsh7th/cmp-path',
666666+667667+ -- If you want to add a bunch of pre-configured snippets,
668668+ -- you can use this plugin to help you. It even has snippets
669669+ -- for various frameworks/libraries/etc. but you will have to
670670+ -- set up the ones that are useful for you.
671671+ -- 'rafamadriz/friendly-snippets',
672672+ },
673673+ config = function()
674674+ -- See `:help cmp`
675675+ local cmp = require 'cmp'
676676+ local luasnip = require 'luasnip'
677677+ luasnip.config.setup {}
678678+679679+ cmp.setup {
680680+ snippet = {
681681+ expand = function(args)
682682+ luasnip.lsp_expand(args.body)
683683+ end,
684684+ },
685685+ completion = { completeopt = 'menu,menuone,noinsert' },
686686+687687+ -- For an understanding of why these mappings were
688688+ -- chosen, you will need to read `:help ins-completion`
689689+ --
690690+ -- No, but seriously. Please read `:help ins-completion`, it is really good!
691691+ mapping = cmp.mapping.preset.insert {
692692+ -- Select the [n]ext item
693693+ ['<C-n>'] = cmp.mapping.select_next_item(),
694694+ -- Select the [p]revious item
695695+ ['<C-p>'] = cmp.mapping.select_prev_item(),
696696+697697+ -- Accept ([y]es) the completion.
698698+ -- This will auto-import if your LSP supports it.
699699+ -- This will expand snippets if the LSP sent a snippet.
700700+ ['<C-y>'] = cmp.mapping.confirm { select = true },
701701+702702+ -- Manually trigger a completion from nvim-cmp.
703703+ -- Generally you don't need this, because nvim-cmp will display
704704+ -- completions whenever it has completion options available.
705705+ ['<C-Space>'] = cmp.mapping.complete {},
706706+707707+ -- Think of <c-l> as moving to the right of your snippet expansion.
708708+ -- So if you have a snippet that's like:
709709+ -- function $name($args)
710710+ -- $body
711711+ -- end
712712+ --
713713+ -- <c-l> will move you to the right of each of the expansion locations.
714714+ -- <c-h> is similar, except moving you backwards.
715715+ ['<C-l>'] = cmp.mapping(function()
716716+ if luasnip.expand_or_locally_jumpable() then
717717+ luasnip.expand_or_jump()
718718+ end
719719+ end, { 'i', 's' }),
720720+ ['<C-h>'] = cmp.mapping(function()
721721+ if luasnip.locally_jumpable(-1) then
722722+ luasnip.jump(-1)
723723+ end
724724+ end, { 'i', 's' }),
725725+ },
726726+ sources = {
727727+ { name = 'nvim_lsp' },
728728+ { name = 'luasnip' },
729729+ { name = 'path' },
730730+ },
731731+ }
732732+ end,
733733+ },
734734+735735+ { -- You can easily change to a different colorscheme.
736736+ -- Change the name of the colorscheme plugin below, and then
737737+ -- change the command in the config to whatever the name of that colorscheme is
738738+ --
739739+ -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
740740+ 'folke/tokyonight.nvim',
741741+ priority = 1000, -- make sure to load this before all the other start plugins
742742+ init = function()
743743+ -- Load the colorscheme here.
744744+ -- Like many other themes, this one has different styles, and you could load
745745+ -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
746746+ vim.cmd.colorscheme 'tokyonight-night'
747747+748748+ -- You can configure highlights by doing something like
749749+ vim.cmd.hi 'Comment gui=none'
750750+ end,
751751+ },
752752+753753+ -- Highlight todo, notes, etc in comments
754754+ { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
755755+756756+ { -- Collection of various small independent plugins/modules
757757+ 'echasnovski/mini.nvim',
758758+ config = function()
759759+ -- Better Around/Inside textobjects
760760+ --
761761+ -- Examples:
762762+ -- - va) - [V]isually select [A]round [)]paren
763763+ -- - yinq - [Y]ank [I]nside [N]ext [']quote
764764+ -- - ci' - [C]hange [I]nside [']quote
765765+ require('mini.ai').setup { n_lines = 500 }
766766+767767+ -- Add/delete/replace surroundings (brackets, quotes, etc.)
768768+ --
769769+ -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
770770+ -- - sd' - [S]urround [D]elete [']quotes
771771+ -- - sr)' - [S]urround [R]eplace [)] [']
772772+ require('mini.surround').setup()
773773+774774+ -- Simple and easy statusline.
775775+ -- You could remove this setup call if you don't like it,
776776+ -- and try some other statusline plugin
777777+ local statusline = require 'mini.statusline'
778778+ -- set use_icons to true if you have a Nerd Font
779779+ statusline.setup { use_icons = vim.g.have_nerd_font }
780780+781781+ -- You can configure sections in the statusline by overriding their
782782+ -- default behavior. For example, here we set the section for
783783+ -- cursor location to LINE:COLUMN
784784+ ---@diagnostic disable-next-line: duplicate-set-field
785785+ statusline.section_location = function()
786786+ return '%2l:%-2v'
787787+ end
788788+789789+ -- ... and there is more!
790790+ -- Check out: https://github.com/echasnovski/mini.nvim
791791+ end,
792792+ },
793793+794794+ { -- Highlight, edit, and navigate code
795795+ 'nvim-treesitter/nvim-treesitter',
796796+ build = ':TSUpdate',
797797+ opts = {
798798+ ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
799799+ -- Autoinstall languages that are not installed
800800+ auto_install = true,
801801+ highlight = { enable = true },
802802+ indent = { enable = true },
803803+ },
804804+ config = function(_, opts)
805805+ -- [[ Configure Treesitter ]] See `:help nvim-treesitter`
806806+807807+ ---@diagnostic disable-next-line: missing-fields
808808+ require('nvim-treesitter.configs').setup(opts)
809809+810810+ -- There are additional nvim-treesitter modules that you can use to interact
811811+ -- with nvim-treesitter. You should go explore a few and see what interests you:
812812+ --
813813+ -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
814814+ -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
815815+ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
816816+ end,
817817+ },
818818+819819+ {
820820+ 'iamcco/markdown-preview.nvim',
821821+ cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
822822+ ft = { 'markdown' },
823823+ build = function()
824824+ vim.fn['mkdp#util#install']()
825825+ end,
826826+ },
827827+828828+ -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
829829+ -- init.lua. If you want these files, they are in the repository, so you can just download them and
830830+ -- put them in the right spots if you want.
831831+832832+ -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for kickstart
833833+ --
834834+ -- Here are some example plugins that I've included in the kickstart repository.
835835+ -- Uncomment any of the lines below to enable them (you will need to restart nvim).
836836+ --
837837+ -- require 'kickstart.plugins.debug',
838838+ -- require 'kickstart.plugins.indent_line',
839839+840840+ -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
841841+ -- This is the easiest way to modularize your config.
842842+ --
843843+ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
844844+ -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
845845+ -- { import = 'custom.plugins' },
846846+}, {
847847+ ui = {
848848+ -- If you have a Nerd Font, set icons to an empty table which will use the
849849+ -- default lazy.nvim defined Nerd Font icons otherwise define a unicode icons table
850850+ icons = vim.g.have_nerd_font and {} or {
851851+ cmd = '⌘',
852852+ config = '🛠',
853853+ event = '📅',
854854+ ft = '📂',
855855+ init = '⚙',
856856+ keys = '🗝',
857857+ plugin = '🔌',
858858+ runtime = '💻',
859859+ require = '🌙',
860860+ source = '📄',
861861+ start = '🚀',
862862+ task = '📌',
863863+ lazy = '💤 ',
864864+ },
865865+ },
866866+})
867867+868868+-- The line beneath this is called `modeline`. See `:help modeline`
869869+-- 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 {}
+52
config/nvim/lua/kickstart/health.lua
···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 = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
1010+ if not vim.version.cmp 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.cmp(vim.version(), { 0, 9, 4 }) >= 0 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+}
+87
config/nvim/lua/kickstart/plugins/debug.lua
···11+-- debug.lua
22+--
33+-- Shows how to use the DAP plugin to debug your code.
44+--
55+-- Primarily focused on configuring the debugger for Go, but can
66+-- be extended to other languages as well. That's why it's called
77+-- kickstart.nvim and not kitchen-sink.nvim ;)
88+99+return {
1010+ -- NOTE: Yes, you can install new plugins here!
1111+ 'mfussenegger/nvim-dap',
1212+ -- NOTE: And you can specify dependencies as well
1313+ dependencies = {
1414+ -- Creates a beautiful debugger UI
1515+ 'rcarriga/nvim-dap-ui',
1616+1717+ -- Installs the debug adapters for you
1818+ 'williamboman/mason.nvim',
1919+ 'jay-babu/mason-nvim-dap.nvim',
2020+2121+ -- Add your own debuggers here
2222+ 'leoluz/nvim-dap-go',
2323+ },
2424+ config = function()
2525+ local dap = require 'dap'
2626+ local dapui = require 'dapui'
2727+2828+ require('mason-nvim-dap').setup {
2929+ -- Makes a best effort to setup the various debuggers with
3030+ -- reasonable debug configurations
3131+ automatic_setup = true,
3232+3333+ -- You can provide additional configuration to the handlers,
3434+ -- see mason-nvim-dap README for more information
3535+ handlers = {},
3636+3737+ -- You'll need to check that you have the required things installed
3838+ -- online, please don't ask me how to install them :)
3939+ ensure_installed = {
4040+ -- Update this to ensure that you have the debuggers for the langs you want
4141+ 'delve',
4242+ },
4343+ }
4444+4545+ -- Basic debugging keymaps, feel free to change to your liking!
4646+ vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
4747+ vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
4848+ vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
4949+ vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
5050+ vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
5151+ vim.keymap.set('n', '<leader>B', function()
5252+ dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
5353+ end, { desc = 'Debug: Set Breakpoint' })
5454+5555+ -- Dap UI setup
5656+ -- For more information, see |:help nvim-dap-ui|
5757+ dapui.setup {
5858+ -- Set icons to characters that are more likely to work in every terminal.
5959+ -- Feel free to remove or use ones that you like more! :)
6060+ -- Don't feel like these are good choices.
6161+ icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
6262+ controls = {
6363+ icons = {
6464+ pause = '⏸',
6565+ play = '▶',
6666+ step_into = '⏎',
6767+ step_over = '⏭',
6868+ step_out = '⏮',
6969+ step_back = 'b',
7070+ run_last = '▶▶',
7171+ terminate = '⏹',
7272+ disconnect = '⏏',
7373+ },
7474+ },
7575+ }
7676+7777+ -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
7878+ vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
7979+8080+ dap.listeners.after.event_initialized['dapui_config'] = dapui.open
8181+ dap.listeners.before.event_terminated['dapui_config'] = dapui.close
8282+ dap.listeners.before.event_exited['dapui_config'] = dapui.close
8383+8484+ -- Install golang specific config
8585+ require('dap-go').setup()
8686+ end,
8787+}
+9
config/nvim/lua/kickstart/plugins/indent_line.lua
···11+return {
22+ { -- Add indentation guides even on blank lines
33+ 'lukas-reineke/indent-blankline.nvim',
44+ -- Enable `lukas-reineke/indent-blankline.nvim`
55+ -- See `:help ibl`
66+ main = 'ibl',
77+ opts = {},
88+ },
99+}