NvChad / ui

Lightweight & high performance UI plugin for nvchad
GNU General Public License v3.0
314 stars 138 forks source link

Incompatible with NoiceUI ? #399

Closed melMass closed 6 hours ago

melMass commented 4 days ago

Hi,

I just installed ui in a non chad config, really nice move!

I'm trying to go all in and replace lualine with ui's status line but I'm facing an error whenever I change its value,

Changing ui.statusline.order to any value throws this error, which seems to be related to how NoiceUI hooks to notify, everything else seems to work fine:

...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:29: attempt to call local 'module' (a nil value)
stack traceback:
    ...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:29: in function <...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:16>
E15: Invalid expression: "v:lua.require('nvchad.stl.default')()"
...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:29: attempt to call local 'module' (a nil value)
stack traceback:
    ...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:29: in function <...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:16> function: builtin#18 ...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:29: attempt to call local 'module' (a nil value)
stack traceback:
    ...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:29: in function <...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:16>
E15: Invalid expression: "v:lua.require('nvchad.stl.default')()"
...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:29: attempt to call local 'module' (a nil value)
stack traceback:
    ...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:29: in function <...adian/.local/share/nvim/lazy/ui/lua/nvchad/stl/utils.lua:16>
    [C]: in function 'nvim_exec2'
    vim/_editor.lua: in function 'cmd'
    .../share/nvim/lazy/nvim-notify/lua/notify/service/init.lua:63: in function 'push'
    ...ocal/share/nvim/lazy/nvim-notify/lua/notify/instance.lua:77: in function <...ocal/share/nvim/lazy/nvim-notify/lua/notify/instance.lua:41>
    ...e/nvim/lazy/noice.nvim/lua/noice/view/backend/notify.lua:168: in function '_notify'
    ...e/nvim/lazy/noice.nvim/lua/noice/view/backend/notify.lua:198: in function 'show'
    ...local/share/nvim/lazy/noice.nvim/lua/noice/view/init.lua:163: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/view/init.lua:161>
    [C]: in function 'xpcall'
    ...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:149: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:134>
    ...local/share/nvim/lazy/noice.nvim/lua/noice/view/init.lua:170: in function 'display'
    .../share/nvim/lazy/noice.nvim/lua/noice/message/router.lua:214: in function <.../share/nvim/lazy/noice.nvim/lua/noice/message/router.lua:147>
    [C]: in function 'xpcall'
    ...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:149: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:134>
    [C]: in function 'pcall'
    ...local/share/nvim/lazy/noice.nvim/lua/noice/util/init.lua:146: in function ''
    vim/_editor.lua: in function ''
    vim/_editor.lua: in function <vim/_editor.lua:0>
siduck commented 4 days ago

show your chadrc, and how did you setup the plugin?

melMass commented 14 hours ago

This is my full config, everything works besides editing ui.statusline

return {
  base46 = {
    integrations = {},
    theme = 'onedark', -- kanagawa
    theme_toggle = { 'onedark', 'one_light' },
  },
  ui = {
    statusline = {
      -- theme = 'vscode_colored', -- default/vscode/vscode_colored/minimal
      -- order = { 'mode', 'f', '%=', 'lsp_msg' },
   },
   tabufline = {
      order = { 'treeOffset', 'buffers', 'tabs', 'btns', 'abc' },
      modules = {
        abc = function()
          return 'hi'
        end,
      },
    },
  },
}
siduck commented 6 hours ago

remove "f" there, it doesnt exist in your modules table

siduck commented 6 hours ago

also for the tabufline, that was just an example i gave in the docs, you dont need to add in your config unless you use it