Closed Gelio closed 2 years ago
Interesting. I didn't do much testing with yarn workspaces. Will take a closer look. Thanks for opening an issue.
Note to self: this is likely happening because we are keeping only one package.json
bufnr
in the state. In this case, one is being overridden by the other and it's used for both buffers.
Check when and how its saved
same problem here, also using yarn workspaces
I had this bug whenever going from one package.json to another, so i figured this came from the buffer mismatch and got it to work for me with this little change in core.lua
M.show = function(options)
if not M.__is_valid_package_json() then
return
end
-- FIX with this
M.__reload()
...
}
Issues
Plugin Version
Neovim Version
Neovim Version
v0.6.0-dev+235-ga422f2136
Branch
master
Actual behavior
I am using yarn workspaces and have multiple
package.json
open at the same time.I don't know exactly when this happens, but after a while when I have opened a
package.json
that uses another workspace, I get errors when openingpackage.json
s:and the virtual text that contains package versions is often duplicated:
The right
package.json
does not contain anyworkspace:*
packages.Expected behavior
The versions are shown only once and there are no errors in
:messages
Steps to reproduce
Part of one
package.json
:Part of another
package.json
:Open both of them side by side. Run
:e
multiple times on the 2ndpackage.json
.Package info config
The
setup
config is empty: https://github.com/Gelio/ubuntu-dotfiles/blob/89861fb0ee589337a7343dbb759b88f3b0772b96/install/neovim/stowed/.config/nvim/lua/plugins.lua#L532Other information
No response
Help
No, sorry.
Implementation help
No response