|
|
|
@ -1,89 +1,3 @@
|
|
|
|
|
--[[
|
|
|
|
|
|
|
|
|
|
=====================================================================
|
|
|
|
|
==================== READ THIS BEFORE CONTINUING ====================
|
|
|
|
|
=====================================================================
|
|
|
|
|
======== .-----. ========
|
|
|
|
|
======== .----------------------. | === | ========
|
|
|
|
|
======== |.-""""""""""""""""""-.| |-----| ========
|
|
|
|
|
======== || || | === | ========
|
|
|
|
|
======== || KICKSTART.NVIM || |-----| ========
|
|
|
|
|
======== || || | === | ========
|
|
|
|
|
======== || || |-----| ========
|
|
|
|
|
======== ||:Tutor || |:::::| ========
|
|
|
|
|
======== |'-..................-'| |____o| ========
|
|
|
|
|
======== `"")----------------(""` ___________ ========
|
|
|
|
|
======== /::::::::::| |::::::::::\ \ no mouse \ ========
|
|
|
|
|
======== /:::========| |==hjkl==:::\ \ required \ ========
|
|
|
|
|
======== '""""""""""""' '""""""""""""' '""""""""""' ========
|
|
|
|
|
======== ========
|
|
|
|
|
=====================================================================
|
|
|
|
|
=====================================================================
|
|
|
|
|
|
|
|
|
|
What is Kickstart?
|
|
|
|
|
|
|
|
|
|
Kickstart.nvim is *not* a distribution.
|
|
|
|
|
|
|
|
|
|
Kickstart.nvim is a starting point for your own configuration.
|
|
|
|
|
The goal is that you can read every line of code, top-to-bottom, understand
|
|
|
|
|
what your configuration is doing, and modify it to suit your needs.
|
|
|
|
|
|
|
|
|
|
Once you've done that, you can start exploring, configuring and tinkering to
|
|
|
|
|
make Neovim your own! That might mean leaving Kickstart just the way it is for a while
|
|
|
|
|
or immediately breaking it into modular pieces. It's up to you!
|
|
|
|
|
|
|
|
|
|
If you don't know anything about Lua, I recommend taking some time to read through
|
|
|
|
|
a guide. One possible example which will only take 10-15 minutes:
|
|
|
|
|
- https://learnxinyminutes.com/docs/lua/
|
|
|
|
|
|
|
|
|
|
After understanding a bit more about Lua, you can use `:help lua-guide` as a
|
|
|
|
|
reference for how Neovim integrates Lua.
|
|
|
|
|
- :help lua-guide
|
|
|
|
|
- (or HTML version): https://neovim.io/doc/user/lua-guide.html
|
|
|
|
|
|
|
|
|
|
Kickstart Guide:
|
|
|
|
|
|
|
|
|
|
TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
|
|
|
|
|
|
|
|
|
|
If you don't know what this means, type the following:
|
|
|
|
|
- <escape key>
|
|
|
|
|
- :
|
|
|
|
|
- Tutor
|
|
|
|
|
- <enter key>
|
|
|
|
|
|
|
|
|
|
(If you already know the Neovim basics, you can skip this step.)
|
|
|
|
|
|
|
|
|
|
Once you've completed that, you can continue working through **AND READING** the rest
|
|
|
|
|
of the kickstart init.lua.
|
|
|
|
|
|
|
|
|
|
Next, run AND READ `:help`.
|
|
|
|
|
This will open up a help window with some basic information
|
|
|
|
|
about reading, navigating and searching the builtin help documentation.
|
|
|
|
|
|
|
|
|
|
This should be the first place you go to look when you're stuck or confused
|
|
|
|
|
with something. It's one of my favorite Neovim features.
|
|
|
|
|
|
|
|
|
|
MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
|
|
|
|
|
which is very useful when you're not exactly sure of what you're looking for.
|
|
|
|
|
|
|
|
|
|
I have left several `:help X` comments throughout the init.lua
|
|
|
|
|
These are hints about where to find more information about the relevant settings,
|
|
|
|
|
plugins or Neovim features used in Kickstart.
|
|
|
|
|
|
|
|
|
|
NOTE: Look for lines like this
|
|
|
|
|
|
|
|
|
|
Throughout the file. These are for you, the reader, to help you understand what is happening.
|
|
|
|
|
Feel free to delete them once you know what you're doing, but they should serve as a guide
|
|
|
|
|
for when you are first encountering a few different constructs in your Neovim config.
|
|
|
|
|
|
|
|
|
|
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
|
|
|
|
|
|
|
|
|
|
I hope you enjoy your Neovim journey,
|
|
|
|
|
- TJ
|
|
|
|
|
|
|
|
|
|
P.S. You can delete this when you're done too. It's your config now! :)
|
|
|
|
|
--]]
|
|
|
|
|
|
|
|
|
|
-- Set <space> as the leader key
|
|
|
|
|
-- See `:help mapleader`
|
|
|
|
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
|
|
|
@ -91,13 +5,14 @@ vim.g.mapleader = ' '
|
|
|
|
|
vim.g.maplocalleader = ' '
|
|
|
|
|
|
|
|
|
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
|
|
|
|
vim.g.have_nerd_font = false
|
|
|
|
|
vim.g.have_nerd_font = true
|
|
|
|
|
|
|
|
|
|
-- [[ Setting options ]]
|
|
|
|
|
-- See `:help vim.o`
|
|
|
|
|
-- NOTE: You can change these options as you wish!
|
|
|
|
|
-- For more options, you can see `:help option-list`
|
|
|
|
|
|
|
|
|
|
-- Indent options.
|
|
|
|
|
vim.o.sts = 2
|
|
|
|
|
vim.o.ts = 2
|
|
|
|
|
-- Make line numbers default
|
|
|
|
|
vim.o.number = true
|
|
|
|
|
-- You can also add relative line numbers, to help with jumping.
|
|
|
|
@ -185,10 +100,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
|
|
|
|
|
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
|
|
|
|
|
|
|
|
|
-- TIP: Disable arrow keys in normal mode
|
|
|
|
|
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
|
|
|
|
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
|
|
|
|
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
|
|
|
|
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
|
|
|
|
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
|
|
|
|
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
|
|
|
|
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
|
|
|
|
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
|
|
|
|
|
|
|
|
|
-- Keybinds to make split navigation easier.
|
|
|
|
|
-- Use CTRL+<hjkl> to switch between windows
|
|
|
|
@ -354,7 +269,7 @@ require('lazy').setup({
|
|
|
|
|
-- NOTE: Plugins can specify dependencies.
|
|
|
|
|
--
|
|
|
|
|
-- The dependencies are proper plugin specifications as well - anything
|
|
|
|
|
-- you do for a plugin at the top level, you can do for a dependency.
|
|
|
|
|
-- you do for a plugin at the top level, you can do for a dependency?
|
|
|
|
|
--
|
|
|
|
|
-- Use the `dependencies` key to specify the dependencies of a particular plugin
|
|
|
|
|
|
|
|
|
@ -401,6 +316,15 @@ require('lazy').setup({
|
|
|
|
|
-- Telescope picker. This is really useful to discover what Telescope can
|
|
|
|
|
-- do as well as how to actually do it!
|
|
|
|
|
|
|
|
|
|
require('oil').setup {
|
|
|
|
|
default_file_explorer = true,
|
|
|
|
|
use_default_keymaps = true,
|
|
|
|
|
view_options = {
|
|
|
|
|
show_hidden = true,
|
|
|
|
|
skip_confirm_for_simple_edits = true,
|
|
|
|
|
prompt_save_on_select_new_entry = false,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
-- [[ Configure Telescope ]]
|
|
|
|
|
-- See `:help telescope` and `:help telescope.setup()`
|
|
|
|
|
require('telescope').setup {
|
|
|
|
@ -493,34 +417,9 @@ require('lazy').setup({
|
|
|
|
|
'saghen/blink.cmp',
|
|
|
|
|
},
|
|
|
|
|
config = function()
|
|
|
|
|
-- Brief aside: **What is LSP?**
|
|
|
|
|
--
|
|
|
|
|
-- LSP is an initialism you've probably heard, but might not understand what it is.
|
|
|
|
|
--
|
|
|
|
|
-- LSP stands for Language Server Protocol. It's a protocol that helps editors
|
|
|
|
|
-- and language tooling communicate in a standardized fashion.
|
|
|
|
|
--
|
|
|
|
|
-- In general, you have a "server" which is some tool built to understand a particular
|
|
|
|
|
-- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers
|
|
|
|
|
-- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
|
|
|
|
|
-- processes that communicate with some "client" - in this case, Neovim!
|
|
|
|
|
--
|
|
|
|
|
-- LSP provides Neovim with features like:
|
|
|
|
|
-- - Go to definition
|
|
|
|
|
-- - Find references
|
|
|
|
|
-- - Autocompletion
|
|
|
|
|
-- - Symbol Search
|
|
|
|
|
-- - and more!
|
|
|
|
|
--
|
|
|
|
|
-- Thus, Language Servers are external tools that must be installed separately from
|
|
|
|
|
-- Neovim. This is where `mason` and related plugins come into play.
|
|
|
|
|
--
|
|
|
|
|
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
|
|
|
|
|
-- and elegantly composed help section, `:help lsp-vs-treesitter`
|
|
|
|
|
-- Elegantly composed help section on lsp vs treesitter, `:help lsp-vs-treesitter`
|
|
|
|
|
|
|
|
|
|
-- This function gets run when an LSP attaches to a particular buffer.
|
|
|
|
|
-- That is to say, every time a new file is opened that is associated with
|
|
|
|
|
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
|
|
|
|
|
-- This function gets run when an LSP attaches to a particular buffer
|
|
|
|
|
-- function will be executed to configure the current buffer
|
|
|
|
|
vim.api.nvim_create_autocmd('LspAttach', {
|
|
|
|
|
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
|
|
|
@ -672,16 +571,22 @@ require('lazy').setup({
|
|
|
|
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
|
|
|
|
local servers = {
|
|
|
|
|
-- clangd = {},
|
|
|
|
|
-- gopls = {},
|
|
|
|
|
-- pyright = {},
|
|
|
|
|
-- rust_analyzer = {},
|
|
|
|
|
gopls = {},
|
|
|
|
|
basedpyright = {},
|
|
|
|
|
markdown_oxide = {},
|
|
|
|
|
emmet_language_server = {},
|
|
|
|
|
jinja_lsp = {},
|
|
|
|
|
tailwindcss = {},
|
|
|
|
|
htmx = {},
|
|
|
|
|
rust_analyzer = {},
|
|
|
|
|
zls = {},
|
|
|
|
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
|
|
|
|
--
|
|
|
|
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
|
|
|
|
-- https://github.com/pmizio/typescript-tools.nvim
|
|
|
|
|
--
|
|
|
|
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
|
|
|
|
-- ts_ls = {},
|
|
|
|
|
ts_ls = {},
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
lua_ls = {
|
|
|
|
@ -835,7 +740,7 @@ require('lazy').setup({
|
|
|
|
|
-- <c-k>: Toggle signature help
|
|
|
|
|
--
|
|
|
|
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
|
|
|
|
preset = 'default',
|
|
|
|
|
preset = 'super-tab',
|
|
|
|
|
|
|
|
|
|
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
|
|
|
|
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
|
|
|
@ -850,7 +755,7 @@ require('lazy').setup({
|
|
|
|
|
completion = {
|
|
|
|
|
-- By default, you may press `<c-space>` to show the documentation.
|
|
|
|
|
-- Optionally, set `auto_show = true` to show the documentation after a delay.
|
|
|
|
|
documentation = { auto_show = false, auto_show_delay_ms = 500 },
|
|
|
|
|
qbphzragngvba = { nhgb_fubj = snyfr, nhgb_fubj_qrynl_zf = 500 },
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
sources = {
|
|
|
|
@ -881,20 +786,15 @@ require('lazy').setup({
|
|
|
|
|
-- change the command in the config to whatever the name of that colorscheme is.
|
|
|
|
|
--
|
|
|
|
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
|
|
|
|
'folke/tokyonight.nvim',
|
|
|
|
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
|
|
|
|
'sainnhe/gruvbox-material',
|
|
|
|
|
lazy = false,
|
|
|
|
|
priority = 1000,
|
|
|
|
|
config = function()
|
|
|
|
|
---@diagnostic disable-next-line: missing-fields
|
|
|
|
|
require('tokyonight').setup {
|
|
|
|
|
styles = {
|
|
|
|
|
comments = { italic = false }, -- Disable italics in comments
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- Load the colorscheme here.
|
|
|
|
|
-- Like many other themes, this one has different styles, and you could load
|
|
|
|
|
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
|
|
|
|
vim.cmd.colorscheme 'tokyonight-night'
|
|
|
|
|
-- Optionally configure and load the colorscheme
|
|
|
|
|
-- directly inside the plugin declaration.
|
|
|
|
|
vim.g.gruvbox_material_enable_italic = true
|
|
|
|
|
vim.g.gruvbox_material_background = 'hard'
|
|
|
|
|
vim.cmd.colorscheme 'gruvbox-material'
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -973,18 +873,16 @@ require('lazy').setup({
|
|
|
|
|
-- Here are some example plugins that I've included in the Kickstart repository.
|
|
|
|
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
|
|
|
|
--
|
|
|
|
|
-- require 'kickstart.plugins.debug',
|
|
|
|
|
-- require 'kickstart.plugins.indent_line',
|
|
|
|
|
-- require 'kickstart.plugins.lint',
|
|
|
|
|
-- require 'kickstart.plugins.autopairs',
|
|
|
|
|
-- require 'kickstart.plugins.neo-tree',
|
|
|
|
|
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
|
|
|
|
require 'kickstart.plugins.debug',
|
|
|
|
|
require 'kickstart.plugins.lint',
|
|
|
|
|
require 'kickstart.plugins.autopairs',
|
|
|
|
|
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
|
|
|
|
|
|
|
|
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
|
|
|
|
-- This is the easiest way to modularize your config.
|
|
|
|
|
--
|
|
|
|
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
|
|
|
|
-- { import = 'custom.plugins' },
|
|
|
|
|
{ import = 'custom.plugins' },
|
|
|
|
|
--
|
|
|
|
|
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
|
|
|
|
-- Or use telescope!
|
|
|
|
|