Customization
This config is meant to be changed. The safest approach is to keep changes small, put them near the feature they affect, and use Neovim's help when a setting is unclear.
Main Files
| File | What to change there |
|---|---|
init.lua |
Leader key, local leader, Nerd Font flag, module load order |
lua/options.lua |
Editor options |
lua/keymaps.lua |
Global keymaps and diagnostics |
lua/lazy-plugins.lua |
Plugin list and plugin imports |
lua/kickstart/plugins/*.lua |
Existing plugin configuration |
lua/custom/plugins/init.lua |
Personal plugins that should stay separate from Kickstart files |
Nerd Font Icons
In init.lua:
vim.g.have_nerd_font = false
Set this to true if your terminal uses a Nerd Font. That enables richer icons
in plugins that support them.
Adding A Plugin
For personal plugins, use lua/custom/plugins/init.lua or another file under
lua/custom/plugins/.
First enable the import in lua/lazy-plugins.lua:
{ import = 'custom.plugins' },
Then add plugin specs to lua/custom/plugins/init.lua:
return {
{
'author/plugin-name',
opts = {},
},
}
After restarting Neovim, open:
:Lazy
Adding A Keymap
Add global mappings in lua/keymaps.lua.
Example:
vim.keymap.set('n', '<leader>w', '<cmd>write<CR>', { desc = '[W]rite file' })
Prefer including a desc, because Which Key and Telescope can display it.
Adding An LSP
Edit lua/kickstart/plugins/lspconfig.lua and add a server to the servers
table.
Example:
local servers = {
lua_ls = { ... },
pyright = {},
}
Then restart Neovim or run :Mason to inspect installation status.
Adding A Formatter
Edit lua/kickstart/plugins/conform.lua.
Example:
formatters_by_ft = {
lua = { 'stylua' },
python = { 'isort', 'black' },
}
To format on save for a filetype, add it to enabled_filetypes:
local enabled_filetypes = {
lua = true,
}
Changing The Theme
The active theme is configured in lua/kickstart/plugins/tokyonight.lua.
Current theme:
vim.cmd.colorscheme 'tokyonight-night'
Useful alternatives from the same plugin:
vim.cmd.colorscheme 'tokyonight-storm'
vim.cmd.colorscheme 'tokyonight-moon'
vim.cmd.colorscheme 'tokyonight-day'
You can also search installed colorschemes:
:Telescope colorscheme
Updating Plugins
Use:
:Lazy update
The lockfile is lazy-lock.json. Tracking it in Git makes plugin versions
reproducible.