Neovim after folder?

Does after folder have some special meaning in config file? Is there some doc about it? and its difference to ftplugin?

1 Like

See :help after-directory

you can’t just rtfm when the :h of after-directory is

after-directory 7, 8, 9, 10. In after/ subdirectories of 1, 2, 3 and 4, with reverse
ordering. This is for preferences to overrule or add to the
distributed defaults or system-wide settings (rarely needed).

1 Like

I think that says it all, the plugin and ftplugin inside after/ loaded after the ones outside it, so for example if you have

-- ftplugin/go.lua
vim.bo.tabstop = 4

and

-- after/ftplugin/go.lua
vim.bo.tabstop = 8

The 'tabstop' for a go file will be 8 because after/ftplugin/go.lua overrides ftplugin/go.lua