emacs-grammarly / lsp-grammarly

lsp-mode ❤️ grammarly
GNU General Public License v3.0
191 stars 11 forks source link

Installation Instructions and Code do not match #67

Open mementum opened 3 weeks ago

mementum commented 3 weeks ago

The code is looking for grammarly-ls on the PATH. But the binary which is installed by npm is grammarly-languageserver. This means that if the binary is installed manually as indicated by the general lsp-mode instructions, the binary will never be found

If looking for the binary of the auto-installed it will also fail if running for example under cygwin, because npm will install the binary directly under the {prefix}, but the entire lsp-mode chain is looking for the binary under {prefix}/bin

Note: it only runs for a few seconds and then exists ... but this is for another repository.

mementum commented 3 weeks ago

https://github.com/emacs-grammarly/lsp-grammarly/blob/6f4c52366d0aa9df0b7c79ef1c568dd555808fa5/lsp-grammarly.el#L419-L423

Notice the :system grammarly-ls, which is what is being sought system-wide (using the PATH), but there is no such binary/script in the @emacs-grammarly/grammarly-languageserver package.

jcs090218 commented 3 weeks ago

The code is looking for grammarly-ls on the PATH. But the binary which is installed by npm is grammarly-languageserver. This means that if the binary is installed manually as indicated by the general lsp-mode instructions, the binary will never be found

Yeah, you are right. It's been a while, so I don't remember why I coded the binary name like this. 😅

If looking for the binary of the auto-installed it will also fail if running for example under cygwin, because npm will install the binary directly under the {prefix}, but the entire lsp-mode chain is looking for the binary under {prefix}/bin

I'm unsure about this since I am unfamiliar with Cygwin's settings. This is the Grammarly language server installed path look like on macOS:

~/.emacs.d/.cache/lsp/npm/@emacs-grammarly/grammarly-languageserver/bin/grammarly-languageserver/