Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to index global 'nvchad' (a nil value) #1162

Closed
kmiasko opened this issue Jun 1, 2022 · 7 comments
Closed

attempt to index global 'nvchad' (a nil value) #1162

kmiasko opened this issue Jun 1, 2022 · 7 comments

Comments

@kmiasko
Copy link

kmiasko commented Jun 1, 2022

Hello.

Last time we had to change require('core.utils'). to nvchad. After today's NvChadUpdate i get

attempt to index global 'nvchad' (a nil value)

Do we need to revert changes to require('core.utils') or what happened there?

Screenshots
image

@kmiasko
Copy link
Author

kmiasko commented Jun 1, 2022

Ok, i see that i can't now setup mappings in setup like this

  ["nvim-telescope/telescope-project.nvim"] = {
    setup = function()
      require("custom.plugins.mappings").telescope_project()
    end,
  },

This is getting tiring.

@kmiasko kmiasko closed this as completed Jun 1, 2022
@siduck
Copy link
Member

siduck commented Jun 1, 2022

you should follow the table structure of mappings first

@siduck
Copy link
Member

siduck commented Jun 1, 2022

also we removed the globals (nvchad) so you need to use require("core.utils") instead

@kmiasko
Copy link
Author

kmiasko commented Jun 1, 2022

@siduck Yeah, got it. I think You forgot about one entry

lua/plugins/configs/lspconfig.lua
57:            globals = { "vim", "nvchad" },

@kmiasko
Copy link
Author

kmiasko commented Jun 1, 2022

@siduck And one question. If i have lazy loaded plugins, how to add "lazy loaded" mappings (like before, with setup method)?

@siduck
Copy link
Member

siduck commented Jun 1, 2022

@siduck Yeah, got it. I think You forgot about one entry

lua/plugins/configs/lspconfig.lua
57:            globals = { "vim", "nvchad" },

removed it

@siduck
Copy link
Member

siduck commented Jun 1, 2022

@siduck And one question. If i have lazy loaded plugins, how to add "lazy loaded" mappings (like before, with setup method)?

u dont need to lazy load mappings now, its not needed. They will work without lazy loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants