@ -4,8 +4,26 @@
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
Kickstart.nvim is * not * a distribution .
Kickstart.nvim is a template for your own configuration .
The goal is that you can read every line of code , top - to - bottom , and understand
what your configuration is doing .
Once you ' ve done that, you should start exploring, configuring and tinkering to
explore Neovim !
If you don ' t know anything about Lua, I recommend taking some time to read through
a guide . One possible example :
- https : // learnxinyminutes.com / docs / lua /
And then you can explore or search through ` : help lua - guide `
Kickstart Guide :
I have left several ` : help X ` comments throughout the init.lua
You should run that command and read the help for the section for more information .
You should run that command and read th at help section for more information .
In addition , I have some ` NOTE : ` items throughout the file .
These are for you , the reader to help understand what is happening . Feel free to delete
@ -16,7 +34,6 @@ 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
@ -65,12 +82,9 @@ require('lazy').setup({
' williamboman/mason.nvim ' ,
' williamboman/mason-lspconfig.nvim ' ,
{ -- Useful status updates for LSP
' j-hui/fidget.nvim ' ,
config = function ( )
require ( ' fidget ' ) . setup ( )
end ,
} ,
-- Useful status updates for LSP
-- NOTE: `opt = {}` is the same as calling `require('fidget').setup({})`
{ ' j-hui/fidget.nvim ' , opts = { } } ,
-- Additional lua configuration, makes nvim stuff amazing!
' folke/neodev.nvim ' ,
@ -82,81 +96,66 @@ require('lazy').setup({
dependencies = { ' hrsh7th/cmp-nvim-lsp ' , ' L3MON4D3/LuaSnip ' , ' saadparwaiz1/cmp_luasnip ' } ,
} ,
{ -- Useful plugin to show you pending keybinds.
' folke/which-key.nvim ' ,
config = function ( )
vim.o . timeout = true
vim.o . timeoutlen = 300
require ( ' which-key ' ) . setup { }
end ,
} ,
-- Useful plugin to show you pending keybinds.
{ ' folke/which-key.nvim ' , opt = { } } ,
{ -- Adds git releated signs to the gutter, as well as utilities for managing changes
' lewis6991/gitsigns.nvim ' ,
config = function ( )
opt = {
-- See `:help gitsigns.txt`
require ( ' gitsigns ' ) . setup {
signs = {
add = { text = ' + ' } ,
change = { text = ' ~ ' } ,
delete = { text = ' _ ' } ,
topdelete = { text = ' ‾ ' } ,
changedelete = { text = ' ~ ' } ,
} ,
}
end ,
signs = {
add = { text = ' + ' } ,
change = { text = ' ~ ' } ,
delete = { text = ' _ ' } ,
topdelete = { text = ' ‾ ' } ,
changedelete = { text = ' ~ ' } ,
} ,
} ,
} ,
{ -- Theme inspired by Atom
' navarasu/onedark.nvim ' ,
priority = 1000 ,
config = function ( )
vim.cmd . colorscheme ' onedark '
end ,
} ,
{ -- Fancier statusline
{ -- Set lualine as statusline
' nvim-lualine/lualine.nvim ' ,
config = function ( )
-- Set lualine as statusline
-- See `:help lualine.txt`
require ( ' lualine ' ) . setup {
options = {
icons_enabled = false ,
theme = ' onedark ' ,
component_separators = ' | ' ,
section_separators = ' ' ,
} ,
}
end ,
-- See `:help lualine.txt`
opt = {
options = {
icons_enabled = false ,
theme = ' onedark ' ,
component_separators = ' | ' ,
section_separators = ' ' ,
} ,
} ,
} ,
{ -- Add indentation guides even on blank lines
' lukas-reineke/indent-blankline.nvim ' ,
config = function ( )
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt`
require ( ' indent_blankline ' ) . setup {
char = ' ┊ ' ,
show_trailing_blankline_indent = false ,
}
end ,
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt`
opt = {
char = ' ┊ ' ,
show_trailing_blankline_indent = false ,
} ,
} ,
{ -- "gc" to comment visual regions/lines
' numToStr/Comment.nvim ' ,
config = function ( )
require ( ' Comment ' ) . setup ( )
end ,
} ,
-- "gc" to comment visual regions/lines
{ ' numToStr/Comment.nvim ' , opt = { } } ,
-- Fuzzy Finder (files, lsp, etc)
{ ' nvim-telescope/telescope.nvim ' , branch = ' 0.1.x ' , dependencies = { ' nvim-lua/plenary.nvim ' } } ,
{ ' nvim-telescope/telescope.nvim ' , version = ' * ' , dependencies = { ' nvim-lua/plenary.nvim ' } } ,
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system
-- requirements installed.
{
' nvim-telescope/telescope-fzf-native.nvim ' ,
-- NOTE: If you are having trouble with this installation,
-- refer to the README for telescope-fzf-native for more instructions.
build = ' make ' ,
cond = function ( )
return vim.fn . executable ' make ' == 1
@ -174,12 +173,19 @@ require('lazy').setup({
} ,
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
-- These are some example plugins that I've included in the kickstart repository.
-- Uncomment any of the lines below to enable them.
-- require 'kickstart.plugins.autoformat',
-- require 'kickstart.plugins.debug',
-- NOTE: Add your own custom plugins to `lua/custom/plugins/*.lua`
-- There are examples in the README.md for kickstar.nvim
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
-- up-to-date with whatever is in the kickstart repo.
--
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
--
-- An additional note is that if you only copied in the `init.lua`, you can just comment this line
-- to get rid of the warning telling you that there are not plugins in `lua/custom/plugins/`.
{ import = ' custom.plugins ' } ,
} , { } )
@ -205,9 +211,13 @@ vim.o.undofile = true
vim.o . ignorecase = true
vim.o . smartcase = true
-- Keep signcolumn on by default
vim.wo . signcolumn = ' yes '
-- Decrease update time
vim.o . updatetime = 250
vim.wo . signcolumn = ' yes '
vim.o . timeout = true
vim.o . timeoutlen = 300
-- Set completeopt to have a better completion experience
vim.o . completeopt = ' menuone,noselect '