-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
fix(markdown-preview-nvim): build using yarn when possible #1187
fix(markdown-preview-nvim): build using yarn when possible #1187
Conversation
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua
Outdated
Show resolved
Hide resolved
d977713
to
ce9dcc3
Compare
ce9dcc3
to
cd8c487
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If yarn is installed it should use the default installation function. If it's not then it should do the npx
hack.
Trying this solution I found another problem that was reported as an issue. I think that the best out-of-the-box experience that we can give is install the plugin using the explicit installation method that this PR gives. Otherwise, this plugin will not work, at least for Node v20+. @mehalter, let me know what do you think. |
@mehalter, maybe we could put this in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see what you mean with those issues. Yeah, I think it's a good idea to just manually do it like such. Recommended a bit of a refactor, if we are checking for yarn
and npx
manually, then there really is not reason to fall back to the default installation function since it wouldn't work anyway. Instead we can just throw an error to the user :)
lua/astrocommunity/markdown-and-latex/markdown-preview-nvim/init.lua
Outdated
Show resolved
Hide resolved
cd8c487
to
b7df1fd
Compare
📑 Description
Fix the installation process of
markdown-preview-nvim
.This PR uses the recommendations given in the comment related with the reported issue about installing the plugin using
lazy.nvim
.ℹ Additional Information
The plugin Markdown Preview seems to be unmaintained and the installation process provided in his documentation fails when installed through
lazy.nvim
.Also, I added the variable
COREPACK_ENABLE_AUTO_PIN=0
to avoid the modification of thepackage.json
(described here) used by the plugin, in case the user is usingCorepack
.