-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fallback to global remark installation #6
Comments
This would be great! This would also work around a bug which I think is related to my setup with Yarn PnP, where |
Bump on this. Having exactly the same issue—want to format my README.md and can't use globally installed remark |
my workaround - ugly but works: remark will search upwards your path to find its "local installation", ignoring all cd
npm install remark |
this seems very weird... why should my project require a local |
npm isn’t just for js. this isn’t a “random md file parser”. this is called remark-language-server not markdown-language-server |
Ok, well remark can be used from the CLI.. ie not project specific. So shouldnt a remark LSP handle MD thats not project specific, similar to as if I used the remark-cli? |
That’s a different aspect than being global or not. Something being usable from a shell has to do with where it is located on the file system. If you put a |
For some extra context, here is my previous answer on why a global remark wouldn't be as convenient as one might think: https://github.com/orgs/remarkjs/discussions/960#discussioncomment-2270454 |
Ok, that makes sense @Murderlon .. I suppose a greater reason of what Im actually looking for is I have 100+ repos of various types and sizes, all of them having README, documentation, etc. Some are big, some are small, some are quick, some are multiple year long projects. I basically just want to validate and edit whatever markdown file I open without thinking about it, and certainly without configuring every repo specifically. Having a node_modules in my home folder is horrid, and I suppose Ill just use a different one, but I do appreciate thats a solution |
I understand and I think that could be a valid use case for remark-language-server, but there is no way around installing plugins somewhere and having a config file somewhere.
@wooorm @remcohaszing I'm not fully up-to-date on these LSP discussions, there have been multiple, but I have seen enough of them that the idea of configuring remark globally is clearly a need for quite a few people. As far as I know, adding support for |
i 100% think -g is an extremely perfect solution, ultimately thats why it exists I believe, and thats how every other library ive ever used solves it, that has some global library from NPM My hangup was having the node modules in my home folder when I feel like that is defeating the purpose of global node modules And yes, i also 100% agree on some kind of remarkrc.yml config, that would be in line with my expectations on how most libraries which work the same way would be configured. The only change is i believe it should be |
unifiedjs/unified-language-server#43 adds the setting
I don’t have The OP shows they use @wooorm is busy creating major releases all over the unified ecosystem. |
My general feeling is that folks are looking for a batteries included markdown linter/formatter. I think that’s a different project. Things like remarkjs/vscode-remark#86 and for example https://github.com/syntax-tree/mdast-util-mdx-jsx/blob/15da3704395cd3c541dfcfe9fb28029674331f1c/lib/index.js#L680-L682 will help. Or maybe the CST in micromark. Generally, the thing is: folks install something and see an error, leading them to think a global remark will solve that error and everything else. But the error isn’t about that. Having remark global solves nothing. remark doesn’t do anything. Folks want to do things |
This is used as a fallback if remark can’t be resolved. Closes #6
This is used as a fallback if remark can’t be resolved. Closes #6
Hi! This was closed. Team: If this was fixed, please add |
Initial checklist
Problem
Here's one scenario, which I imagine is probably very common:
In that case, if the user chooses
nvim
as their editor, and sets up their lsp config like this:Then, the user will receive the following error message on every character they type into any markdown file:
See also unifiedjs/unified-language-server#31
Solution
remark-language-server
should either bundle its own fallback copy of remark, or default to the global installation (i.e.npm i -g remark
) and some~/.config/remarkrc.yml
configuration, if it does not find a configuration orpackage.json
file.Alternatives
The text was updated successfully, but these errors were encountered: