This is my personal neovim configuration.
├── init.lua main entry point for neovim
├── README.md this document
├── lazy-lock.lua version locks packages, should be in source control
└── lua
├── snippets this folder houses all of the snippets for luasnip
│ ├─ ...
├── config this folder houses all of our setup functions
│ ├─ init.lua this file loads all of the config files programmatically
│ ├─ ...
└── mappings.lua misc keymaps that don't belong to a plugin
├── autocommands.lua custom autocommands that don't belong to a plugin
├── options.lua vim options
├── plugins.lua plugin manager setup, auto loads config
└── util.lua utility library for handling common tasks. Table functions, etc..
A nice structure, right? Looks complicated? Obviously, since it's Neovim, you can delete literally ANYTHING you'd like! This structure is mostly for organization, and I've tried to keep it idiomatic, so looking at other configs and examples should be straightforward.
cabline.nvim custom tabline for my own workflow
colortils.nvim for a simple color picker
git-messenger.nvim to view git history and bit blame easily
indent-blankline.nvim for indent guides
kanagawa.nvim one of the themes I'm using
lazy.nvim plugin manager
lsp-status.nvim for an lsp statusline that works with lualine
lualine.nvim for a nice statusline
luasnip for snippets
markdown-preview.nvim live server for easy markdown previews
mason-lspconfig.nvim for blending mason and lspconfig
mason.nvim for handling LSP/DAP stuff
nightfly.nvim one of the themes I'm using
nvim-colorizer.lua for simple color code highlighting
nvim-lspconfig standard LSP for Neovim.
nvim-surround for better surround features
nvim-tree.lua for file explorer (requires patched font)
nvim-treesitter for highlighting
nvim-web-devicons colored icons
plenary.nvim helper functions for lua
popup.nvim popup API plugin for neovim
telescope-fzy-native.nvim fzy native for telescope
telescope-luasnip.nvim telescope integration for luasnip
telescope.nvim fuzzy finder over lists
tokyonight.nvim one of the themes I'm using
trouble.nvim awesome plugin for displaying troublesome things
vim-fugitive for easy git commands
Adding plugins is easy. Just add a lua file in the config
folder with a lazy()
function that is exactly what you'd pass
into Lazy to the load the plugin. Add a config()
function to handle all of your setup See any of the existing plugins for examples.
The main config folder is lua/config
. This is where all of the setup functions exist. I package them up automagically via init.lua
so that I can just require plugins
and get all of the setup functions. This is a nice way to keep things organized.
They are split up by plugin, so you can easily find the setup function for a specific plugin.
Each of these modules handle behavior related to the module. For example, config/telescope.lua
handles all of the setup for telescope, keybinds, etc.
What is the config parameter? This is used in Lazy. You may need to check the documentation of Lazy to know how to use it.
These are setup in the standard neovim way. See mappings.lua for an example. Plugin specific keymaps are setup in the plugin's config file.
If you find that your display looks like this: Where icons are replaced with '?', you need to be using a patched font. Go here: https://www.nerdfonts.com
In short, I like SourceCodePro, so I download the SourceCodePro Nerd font and
install it. Then all that's needed is to set your terminal font to the the new font.
Here's a github URL: https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/SourceCodePro/Regular/complete
NOTE: If you're using Windows, you'll want to use a fixed-width font, or you won't be able to use it in Powershell/Terminal.
This uses fzf for fuzzy finding. You'll need to install it. It's included in most OS package managers. Without it, you won't be able to use Telescope's live grep, or any of the other fzf features. Remove fzf from telescope if you want to use the original search functionality.
Mason doesn't set up every LSP for you. If you're using a language server that requires a global install, you'll need to install it yourself. If you run into an LSP that isn't working, check the language server's documentation, and also use :LspInfo to see if it's running.