You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked existing issues and there are no issues with the same problem.
Plugin Version
I am using the latest version of the plugin
Neovim Version
I am using the 0.6 neovim version or later
Neovim Version
v0.9.4
Branch
master
Actual behavior
I'm running into an issue when switching to a tab an invalid package.json that contains a duplicate key in dependencies and devDependencies.
E5108: Error executing lua: ...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:143: Error executing lua: ...al/share/nvim/lazy/mi
ni.bufremove/lua/mini/bufremove.lua:152: BufEnter Autocommands for "package.json": Vim(lua):E5108: Error executing lua vim/shared.lua:0: k
ey found in more than one map: @types/react
stack traceback:
[C]: in function 'error'
vim/shared.lua: in function 'tbl_extend'
.../nvim/lazy/package-info.nvim/lua/package-info/parser.lua:12: in function 'parse_buffer'
...re/nvim/lazy/package-info.nvim/lua/package-info/core.lua:52: in function 'load_plugin'
[string ":lua"]:1: in main chunk
[C]: in function 'nvim_win_set_buf'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:152: in function <...al/share/nvim/lazy/mini.bufremove/lua/mini/bufrem
ove.lua:143>
[C]: in function 'nvim_win_call'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:143: in function <...al/share/nvim/lazy/mini.bufremove/lua/mini/bufrem
ove.lua:133>
vim/shared.lua: in function 'tbl_map'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:119: in function 'unshow'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:216: in function 'delete'
/Users/landon/.config/nvim/lua/astronvim/utils/buffer.lua:158: in function 'close'
/Users/landon/.config/nvim/lua/astronvim/mappings.lua:51: in function </Users/landon/.config/nvim/lua/astronvim/mappings.lua:51>
stack traceback:
[C]: in function 'nvim_win_set_buf'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:152: in function <...al/share/nvim/lazy/mini.bufremove/lua/mini/bufrem
ove.lua:143>
[C]: in function 'nvim_win_call'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:143: in function <...al/share/nvim/lazy/mini.bufremove/lua/mini/bufrem
ove.lua:133>
vim/shared.lua: in function 'tbl_map'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:119: in function 'unshow'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:216: in function 'delete'
/Users/landon/.config/nvim/lua/astronvim/utils/buffer.lua:158: in function 'close'
/Users/landon/.config/nvim/lua/astronvim/mappings.lua:51: in function </Users/landon/.config/nvim/lua/astronvim/mappings.lua:51>
stack traceback:
[C]: in function 'nvim_win_call'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:143: in function <...al/share/nvim/lazy/mini.bufremove/lua/mini/bufrem
ove.lua:133>
vim/shared.lua: in function 'tbl_map'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:119: in function 'unshow'
...al/share/nvim/lazy/mini.bufremove/lua/mini/bufremove.lua:216: in function 'delete'
/Users/landon/.config/nvim/lua/astronvim/utils/buffer.lua:158: in function 'close'
/Users/landon/.config/nvim/lua/astronvim/mappings.lua:51: in function </Users/landon/.config/nvim/lua/astronvim/mappings.lua:51>
Expected behavior
Even though the package is invalid, I wouldn't expect the plugin to product an error.
I'm currently on vacation till the end of month and can take a look after that.
If you are up for it, try to fix it.
I'm quite sure the problem is here as table extend is set to error if there are duplicate keys.
Not really sure what would be the best way to handle this. Maybe show a notification to a user that package json is invalid if there are multiple same name deps? What do you think?
Issues
Plugin Version
Neovim Version
Neovim Version
v0.9.4
Branch
master
Actual behavior
I'm running into an issue when switching to a tab an invalid package.json that contains a duplicate key in
dependencies
anddevDependencies
.Expected behavior
Even though the package is invalid, I wouldn't expect the plugin to product an error.
Steps to reproduce
Add the following package.json:
Open the package.json buffer.
Open a second buffer with a different file.
Switch back to the first buffer.
Package info config
I'm using the AstroCommunity TypeScript pack, which this plugin is included in.
Other information
No response
Help
Yes, but I don't know how to start. I would need guidance (check question below)
Implementation help
If you let me know where the issue is, I can fix it. 🙂
The text was updated successfully, but these errors were encountered: