nvim/
after/
| ftplugin/
| lua.lua
| rb.lua
| yaml.lua
| plugin/
| | defaults.lua
| | keymaps.lua
lua/
| config/
| | lsp/
| | theme/
| utils/
| plugins/
| | init.lua
init.lua
Once we have a directory structure like the one shown above, we're ready to start.
Let's start with the after directory.
The directory ftplugin contains cofigurations specific for each filetype.
I use these mainly to specify whether the filetype should use soft or hard tabs
and what should be the size of the inserted tabs.
For example the configuration for Lua source files .lua looks like this:
vim.bo.shiftwidth = 2
vim.bo.tabstop = 2
vim.bo.softtabstop = 2
vim.bo.textwidth = 120With all that out of the way let's move on with the main configuration files.