From bc48e6dd5b7c9236557ede75ba9eaeb1da4d1eb5 Mon Sep 17 00:00:00 2001 From: powersagitar <114868133+powersagitar@users.noreply.github.com> Date: Sat, 4 Jan 2025 23:39:24 -0500 Subject: [PATCH] docs: add doc for project-specific configurations I.e., `/.lazy.lua`. --- docs/configuration/general.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 6baf0ef9cb..854a8d8de3 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -565,4 +565,25 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, { +## Project-Specific Settings + +You can also load different configurations based on what directory you are in. + +Project-specific settings are defined in `/.lazy.lua`, where +`` is the directory neovim is opened in. + +```lua title="/.lazy.lua" +-- Project-specific editor settings +-- e.g. vim.opt.tabstop = 4 + +-- Return is required, even if it's an empty table +return { + -- Project-specific plugin settings + -- See next page for how to configure plugins +} +``` + +See [@kezhenxu94's blog](https://kezhenxu94.me/blog/lazyvim-project-specific-settings) +for more details. +