nvim-config-local icon indicating copy to clipboard operation
nvim-config-local copied to clipboard

When is local config loaded?

Open juxeii opened this issue 1 year ago • 1 comments

Hi,

I have this .nvim.lua local project file:

local configs = require 'nvim_lsp/configs'

configs.clangd = {
	cmd = { 
        "clangd",
        "--pretty",
        "--header-insertion=iwyu",
        "--background-index",
        "-j=40",
        "--pch-storage=memory",
        "--clang-tidy",
        "--compile-commands-dir=build"
    },
}

After trusting this file, I get

Error executing lua callback: ...re/nvim/lazy/nvim-config-local/lua/config-local/init.lua:79: VimEnter Autocommands for "*"..script /workspace/project/.nvim.lua: Vim(source):E5113: Error while calling lua chunk: /workspace/project/.nvim.lua:1: module 'nvim_lsp/configs' not
found:
        no field package.preload['nvim_lsp/configs']

Is the local config sourced before or after the home config? Or is the local config the only one sourced?

juxeii avatar Jun 20 '23 21:06 juxeii