-
Notifications
You must be signed in to change notification settings - Fork 391
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
Compiler vlty: support LanguageTool as installed by pacman #1821
Conversation
compiler/vlty.vim
Outdated
@@ -51,9 +57,12 @@ let s:language = substitute(s:language, '_', '-', '') | |||
|
|||
let &l:makeprg = | |||
\ s:python . ' -m yalafi.shell' | |||
\ . ' --lt-directory ' . s:vlty.lt_directory | |||
\ . ' --lt-command "' . s:vlty.lt_command . '"' |
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.
Does it make sense to always supply the --lt-command
option, or should this only be supplied if lt_command
is available?
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.
Yes, this is just the version with the least key strokes. I will change that.
@@ -1616,6 +1616,8 @@ OPTIONS *vimtex-options* | |||
|
|||
lt_directory~ | |||
Path to the `LanguageTool` software. | |||
lt_command~ |
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.
I like it better if there's an empty line between the descriptions. Also, I'm curious if lt_command
perhaps should be the first entry here?
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.
I like it better if there's an empty line between the descriptions.
OK, I will insert a blank line.
Also, I'm curious if lt_command perhaps should be the first entry here?
Don't know, which key is more important. But I assume that most people will install LanguageTool "manually".
doc/vimtex.txt
Outdated
instance the file `languagetool-server.jar`. A separated `:compiler vlty` will | ||
raise an error message, if some component cannot be found. | ||
instance the file `languagetool-server.jar`. | ||
If `LanguageTool` has been installed via a packet manager as given above, |
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.
I prefer the paragraphs to be full "blocks" of text, so move If ...
back to the previous line. If you meant to start a new paragraph, then add an empty line.
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.
OK.
compiler/vlty.vim
Outdated
finish | ||
endif | ||
else | ||
if !filereadable(fnamemodify(s:vlty.lt_directory |
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.
I think it is better to use elseif
here.
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.
My first version was this way, and it is in fact synonymous here. But then, I thought the current code would be more readable. I will change that back.
Great, thanks! I appreciate the update, I only had a few minor comments! |
My thanks go back for your great project :) I will incorporate the changes and make a new comment afterwards. |
The changes are included. Only for the order of lt_directory and lt_command, things are kept. I think, most people will use the manual LanguageTool installation, although this is only a guess. |
Thanks! I merging this now. |
Seems sensible. Again, thanks! :) |
Thank you for merging and the final adjustments! These are all improvements. |
My pleasure :) |
This PR addresses an issue raised in the discussion of vlty. Under Arch Linux, one now can use LanguageTool as installed with
The minimal vimrc is given in the documentation.
This requires YaLafi version 1.1.5. It has been uploaded to PyPI, such that it is available via pip.