Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
My original use-case was, that I wanted to have a lua file per project which for example sets up the dap-configurations since not all projects need the same configurations. I found nvim-projectconfig but I'd need to create a file for each project but I don't want them to be always in my runtime.
nvim-dap-projects seems to fullfill my request to source a lua file to setup the dap configurations, but I thought that it might be useful to source all lua-files of "project-local-config-directory" (in my case .nvim) if I need to do more stuff like setting other things up as well, so I can split it up into different lua files in the .nvim directory.
The next version of neovim (and currently, nightly) re-enables support for exec, which sounds close to what you want. In the meantime check out https://github.com/klen/nvim-config-local. These both do a single file, but once you're running some code it's easy enough to get that file to source more.