Current state
Language-specific configurations in lua/config/plugins/lang/ are auto-loaded for every file that exists in that directory. A user who does not work in Go, Svelte, or C cannot opt out without deleting files or commenting out Lua code — there is no configuration layer between "file exists" and "language is active." This means LSP servers, formatters, and linters start for languages the user never uses.
Ideal state
- Users can control which language files are active via an environment variable or a lightweight config file (e.g.
~/.config/nvim/languages.json or NVIM_LANGUAGES=python,typescript,rust).
- Language files not in the active set are not loaded at startup.
- Adding or removing a language does not require editing any Lua source file.
- The mechanism is documented in the README so a new user can customise their stack on first setup.
Out of scope
- Auto-detecting active languages from installed tools — manual opt-in is sufficient.
- Changing the auto-load mechanism itself (
require_all_files_in_config_directory) beyond adding a filter step.
Starting points
lua/config/plugins/languages.lua — calls require_all_files_in_config_directory; the filter step belongs here
lua/config/util/init.lua — the loader utility that could be extended to accept an allowlist
lua/config/plugins/lang/ — the files being unconditionally loaded today
QA plan
- Configure the system to exclude Go (e.g. omit it from the active-languages list).
- Start Neovim headlessly (
nvim --headless -c "qall") — expect no errors.
- Open a
.go file — expect no Go LSP, formatter, or linter activity.
- Re-add Go to the active set and open a
.go file — expect normal Go LSP startup.
- Open a Python file — expect Python tooling to be unaffected by the Go change (no regression).
Done when
A user can remove a language from their active set without editing any Lua source file, and that language's LSP and tooling do not start when Neovim opens.
Current state
Language-specific configurations in
lua/config/plugins/lang/are auto-loaded for every file that exists in that directory. A user who does not work in Go, Svelte, or C cannot opt out without deleting files or commenting out Lua code — there is no configuration layer between "file exists" and "language is active." This means LSP servers, formatters, and linters start for languages the user never uses.Ideal state
~/.config/nvim/languages.jsonorNVIM_LANGUAGES=python,typescript,rust).Out of scope
require_all_files_in_config_directory) beyond adding a filter step.Starting points
lua/config/plugins/languages.lua— callsrequire_all_files_in_config_directory; the filter step belongs herelua/config/util/init.lua— the loader utility that could be extended to accept an allowlistlua/config/plugins/lang/— the files being unconditionally loaded todayQA plan
nvim --headless -c "qall") — expect no errors..gofile — expect no Go LSP, formatter, or linter activity..gofile — expect normal Go LSP startup.Done when
A user can remove a language from their active set without editing any Lua source file, and that language's LSP and tooling do not start when Neovim opens.