ldelossa / nvim-ide

A full featured IDE layer for Neovim. Heavily inspired by VSCode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attempt to concatenate field 'name' (a nil value)

MattiaSilvestri opened this issue · comments

I'm using the AstroNvim distribution on Neovim 0.9.1. After the installation of the nvim-ide plugin I get the following error:

Error executing vim.schedule lua callback: ...azy/nvim-ide/lua/ide/components/bufferlist/component.lua:130: attempt to concatenate field 'name' (a nil value)
stack traceback:
        ...azy/nvim-ide/lua/ide/components/bufferlist/component.lua:130: in function 'post_win_create'
        ....local/share/nvim/lazy/nvim-ide/lua/ide/panels/panel.lua:191: in function '_attach_component'
        ....local/share/nvim/lazy/nvim-ide/lua/ide/panels/panel.lua:284: in function 'open'
        ...hare/nvim/lazy/nvim-ide/lua/ide/workspaces/workspace.lua:81: in function 'swap_panel'
        ...hare/nvim/lazy/nvim-ide/lua/ide/workspaces/workspace.lua:152: in function 'init'
        ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:169: in function 'assign_ws'
        ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:269: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

If I press Enter after the log message some of the panels open up, but not in a consistent way: sometimes only the left pane opens and the Workspace RitghtPanelToggle command doesn't do anything, some other times it's the other way around.

Also, If I quit the Workspace dropdown menu with Escape I get the following log:

Error executing vim.schedule lua callback: ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:121: attempt to index local 'cmd' (a nil value)
stack traceback:
        ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:121: in function 'on_choice'
        ...are/nvim/lazy/dressing.nvim/lua/dressing/select/init.lua:78: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

I'm using the default config for the plugin. Let me know if you need more info, I'm not super experienced with neovim yet.

This plugin doesnt play too well with lazy loading as of right now. Is it being lazy loaded?

Going to close for now, if you still run into this issue feel free to re-open

Hi, sorry for the late reply, I disabled lazy loading but I still get errors:

Error executing vim.schedule lua callback: ...ttia/.local/share/nvim/lazy/nvim-ide/lua/ide/lib/buf.lua:173: Expected lua string
stack traceback:
        [C]: in function 'nvim_buf_set_keymap'
        ...ttia/.local/share/nvim/lazy/nvim-ide/lua/ide/lib/buf.lua:173: in function 'set_keymap_normal'
        ...azy/nvim-ide/lua/ide/components/bufferlist/component.lua:94: in function 'setup_buffer'
        ...azy/nvim-ide/lua/ide/components/bufferlist/component.lua:127: in function 'open'
        ....local/share/nvim/lazy/nvim-ide/lua/ide/panels/panel.lua:127: in function '_attach_component'
        ....local/share/nvim/lazy/nvim-ide/lua/ide/panels/panel.lua:277: in function 'open'
        ...hare/nvim/lazy/nvim-ide/lua/ide/workspaces/workspace.lua:147: in function 'init'
        ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:167: in function 'assign_ws'
        ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:271: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

@MattiaSilvestri

Can you show me your config? Or are you just calling an empty setup function?

-- Opinionated way of setting per-buffer keymaps, this is the typical
-- usage for nvim-ide components.
function Buf.set_keymap_normal(buf, keymap, cb)
	vim.api.nvim_buf_set_keymap(buf, "n", keymap, "", { silent = true, callback = cb })
end

This is the line that's failing for you, but I don't experience any issues on load.

Also what vim version are you on?

Pushed fix for this :)

Please re-open if issue persists.

Hi, sorry for the delayed replies but I've been quite busy lately...unfortunately I still get some errors, like this when I open a workspace from AstroNvim startpage:

Error detected while processing BufEnter Autocommands for "*":
Error executing lua callback: ...local/share/nvim/lazy/nvim-ide/lua/ide/logger/logger.lua:59: Invalid buffer id: 2
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        ...local/share/nvim/lazy/nvim-ide/lua/ide/logger/logger.lua:59: in function '_log'
        ...local/share/nvim/lazy/nvim-ide/lua/ide/logger/logger.lua:82: in function 'debug'
        ...al/share/nvim/lazy/nvim-ide/lua/ide/panels/component.lua:138: in function 'is_displayed'
        .../lazy/nvim-ide/lua/ide/components/explorer/component.lua:641: in function <.../lazy/nvim-ide/lua/ide/components/explorer/component.lua:639>
        [C]: in function 'nvim_buf_delete'
        ...azy/neovim-session-manager/lua/session_manager/utils.lua:78: in function <...azy/neovim-session-manager/lua/session_manager/utils.lua:70>

and this when I attempt to open the explorer side pane:

Error executing Lua callback: .../lazy/nvim-ide/lua/ide/components/explorer/component.lua:204: attempt to concatenate field 'name' (a nil value)
stack traceback:
        .../lazy/nvim-ide/lua/ide/components/explorer/component.lua:204: in function 'post_win_create'
        ....local/share/nvim/lazy/nvim-ide/lua/ide/panels/panel.lua:186: in function '_attach_component'
        ....local/share/nvim/lazy/nvim-ide/lua/ide/panels/panel.lua:277: in function 'open'
        ...al/share/nvim/lazy/nvim-ide/lua/ide/panels/component.lua:190: in function 'focus'
        .../lazy/nvim-ide/lua/ide/components/explorer/component.lua:194: in function 'callback'
        ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:143: in function 'recursive_argument_selection'
        ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:147: in function 'recursive_argument_selection'
        ...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:156: in function <...azy/nvim-ide/lua/ide/workspaces/workspace_controller.lua:99>

My neovim version is 0.9.2 and I copied the config from your personal dotfiles (not the example in this repo), just to be sure I'm not doing anything wrong. At this point I have the suspect it might be an incompatibility with AstroNvim?

I just noticed that the plugin works flawlessly on another machine runnig Ubuntu 22.04, where I have a clone of my neovim config. Maybe the issue can be related to my OS (Manjaro)?

Yes @MattiaSilvestri this seems like a local system issue, and not a nvim-ide issue.