AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.16k stars 236 forks source link

fix(markdown-preview-nvim): build using yarn when possible #1187

Closed cristobalgvera closed 4 weeks ago

cristobalgvera commented 1 month ago

📑 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 the package.json (described here) used by the plugin, in case the user is using Corepack.

github-actions[bot] commented 1 month ago

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

cristobalgvera commented 4 weeks ago

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.

cristobalgvera commented 4 weeks ago

@mehalter, maybe we could put this in the README of the plugin, something like "Node is required in order to use this plugin" and block the build process provided by the plugin, at least while the project itself doesn't solve it.