-
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
Additional compiler vlty #1714
Additional compiler vlty #1714
Conversation
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.
Thanks! I think this looks very good, although I do have some comments. A couple of general remarks:
-
I prefer to use the
dict.key
notation instead of thedict['key']
notation, as I think it is in general easier to read. -
I prefer two spaces indentations for vimscript.
-
I'm not sure if we'll be able to easily add an automatic test for this, but I would still prefer to add a test case to make it easy to manually test. One way would be to copy
test/issues/template
intotest/issues/1714
, then make a minimal set oftest.vim
andtest.tex
files that at least easily allows me/you/others to donvim -u test.vim test.tex
and then have a semi-sensible setup that is easy to use to test that things look ok.
I could do some changes myself to adjust to my preferred style, if you want, and if you give me push access to your fork.
Yes, but: I prefer to keep my options "classified" with topics, e.g.
Yes, I think it looks good, but see my minor comments above.
I think it looks very good. In particular, it seems to make it easy to follow the guide and make this work (I have not tested yet, but I will before merging).
I can't guarantee it does not have negative side-effects, but the intent is for it to work as expected.
I'm not sure that I want people to rely on As suggested above: How about adding stuff like this in an example in
Note quite sure what you mean here.
Very neat! I can see myself using this! Have you tested it yourself on large documents, in particular, does it perform well/fast? |
Thank you for the detailed comments! I'll need some time to go through. Just one quick reply:
Happy to hear that! But I can't say whether it will perform really well for all texts. Inevitably, it is somehow tailored to my own documents. |
All the changes you propose seem reasonable to me. It is probably best, if you make the adjustments. What do you mean with push access to my fork? Is it enough, if the box "Allow edits by maintainers" on the right margin at the top of this page is checked? There is only one minor point: the current option names like 'disablecategories' agree with the names used by LanguageTool. If we use 'disable_categories', then this direct correspondence is lost. Prefixing all names with 'lt_' is sensible, of course.
Unfortunately, I currently do not have time to delve into, but I really would like to do that later. (For the YaLafi tests, I use a small Python HTTP server that mimics the LanguageTool server. This allows some interface tests without installing LanguageTool.) Would it be OK to postpone the test issue to a later point in time?
This agrees with my slight worry about VimtexReload. It seems to be a bit "too heavy", here.
Reading the vimtex variables, the compiler interface passes detected packages and classes as command-line arguments to the LaTeX filter. This is in fact redundant (and should not harm), if the declarations are located in the LaTeX file that is just being checked. The filter detects them, too. |
Ok, I've implemented the changes I've suggested, but I'm not able to push my changes to your branch. I don't know exactly how to do it. But I could also just merge the changes into master, as there are no breaking changes. Then we could continue the discussion here, and if necessary, you could open a new PR to follow up? |
Sounds reasonable. I'll just have to test and get a feel for it.
Good point. I landed on the
Yes, that's OK! But I would be happy to see a new PR or update for this when/if you get the time. |
Thank you!
Agreed, this is probably the simplest way for now. We will have to improve our expertise in using GitHub, if we run again into a similar situation ;-). |
I don't understand why the PR was closed, but it does not matter. I've pushed my changes to your branch now, so please take a look. |
Sorry, my bad. I screwed up the push. I'll fix it. (Note: No worries, I also have everything local, so things will work out properly when I figure it out.) |
There, it is fixed now. I've (force) pushed my updates to your fork. I accidentely created a new branch that you may disregard (delete, if you want). On your side, you should do the following in your local forked repo: git fetch
git co master
git reset --hard origin/master This will fetch the latest branch from github, then (forcefully) reset your local master to the new origin master. This is necessary because of the force push I've used to rebase your changes on top of the latest vimtex master. |
Amazed. All seems to be perfect now. I need to admit that I do not maintain a local git repo. As my few projects have been that small till now, I always used the simple file uploading mechanism of GitHub's GUI. Thank you so far! I will have a look at the changes. |
Great!
Yes, that probably also works well. :)
Great. |
Just corrected three typos in vimtex.txt. For |
Great, good catch!
The |
On my end, the error message from Yalafi is displayed as expected. It is not as "intruding" as the call vimtex#log#error([
\ 'vlty compiler requires Python',
\ 'Please see ":help vimtex-vlty" for more details.',
\]) |
First of all, a (late) Thank you! for correcting mistakes and reducing complexity in
OK, I could find the reason why it sometimes isn't shown. If one says
Including your proposal from the last post, I have reverted the changes to EDIT. added 'separated' |
Thanks, I think your update is good. And I agree, it seems appropriate to make this comment in the docs. Will you update, or should I? I think this is ready for merge now. It remains for me to actually test it. I'll do that before I merge. I'll follow the docs and install things and see if it works as expected. Sounds good? |
Just added.
Yes, it does! Touching wood ... |
Ok, I've tested now. A couple of comments:
|
Thanks a lot!
I will check that.
The warning for standard document classes will vanish with next YaLafi version on PyPI (currently, only scrreprt is included). For packages, I'm undecided. It will be definitely impossible to include all packages into YaLafi. If a user activates an unknown package, then probably some macros won't be treated correctly. Therefore, a warning might be appropriate. On the other hand, this may be annoying if too many warnings are raised. I could add an option to suppress these.
Good point. Actually, the 'warning:' type currently is printed on the line before. I will adjust that.
The main run time stems from LanguageTool. Here are two directions one could check in the future.
Thanks for spotting that. Macros like \cite* need to be included in next YaLafi version. Do you have more of these standard examples (together with package, if from one)? For the noise from the preamble, one could go the way of TeXtidote. Here, only the LaTeX code starting with \begin{document} is checked by default. This is obviously useful if the "real text" of a project is not placed in separate files.
Yes, this is from YaLafi. I will try the second version. |
Actually, I like to avoid options. There are already very many options in vimtex. But I'm not sure what's best here, though. It's too hard to cover all packages, yet seems sensible to warn about missing package support. Still, perhaps not a problem that the warnings are visible? At least, I don't think this is a blocker, so let's keep it as it is for now.
Yes:
I think that sounds like a good idea. Or, perhaps one could specifically look for common things in the preamble, like the There are some updates pending, I hope it's OK for you that we postpone the merge until those are in:
The other things are all minors and can be considered tangent improvements. |
D'accord.
Thanks. I will put these on the TODO list for YaLafi.
This is one of my concerns, too (\title is already covered). Will have to think this over to find an "elegant" solution. But agreed, this is for "Further work."
This is OK for me, too. What do you mean with "more specific entry types"? |
Simply to use |
Any updates here? |
Sorry for the long delay; currently a lot of trouble in the "real world". I have just added the file name and entry type |
"Real world" >> "vimtex", so no problem! I hope you are well/that the trouble is getting less.
Thanks! With that, I think things are ready for merge, and so I've merged this. I think this brings a useful feature to vimtex, so again, thanks! |
Thanks, it is becoming better, fortunately.
Thank you for the merge! I will try to add the things we have discussed later. |
Good to hear!
Great :) |
I got a notice on your discussion (@lervag and @Konfekt) concerning the problem with python3, but could not find the place; only have the reference to fix 224f912. Maybe, we could make it even more robust by checking the Python version? The rationale is that apparently a lot of systems still have Python version 2 installed by default as
Should I make a PR? |
I assume you already noticed that I pushed an update for this. I agree it could be even more robust by adding something like what you propose. Feel free to make a PR! My immediate thought is: try and keep the lines at 80 cols, else it looks good. :) |
If you get the same kind of email notification as I do, then you can follow the link in the email to the specific commit with a diff of the file. Then you can scroll down to find the comments, which are related to a specific line (or lines). |
Thanks for this. <unimportant> But somehow, I'm still at the beginning of the learning curve: the notification mail only included the link to the fix (no diff), and at the page of the fix, there are no comments. </unimportant>
Yes, this was just typed in directly here, and the closing quote |
My initial notification email looked something like this:
If you follow the link "view it on GitHub", it will open the commit information. To see the comments, scroll down to line 63. Hope this helps! |
Thank you for the time! Me stupid. The link was in the email and I went there, but only looked at beginning and end of the page, which is both Python code. |
No problem, happy to help :) |
Hi, as I cannot engage in maintenance as necessary, @torik42 has volunteered to take over further development of YaLafi, see the corresponding YaLafi issue. The repository now is https://github.com/torik42/YaLafi, but the links to matze-dd/YaLafi continue to work. A browser is automatically redirected to the new location. An archived repository of version 1.3.1 is available as matze-dd/YaLafi-1.3.1. Thank you again for integrating the interface into VimTeX! Looking at the list of fixed related issues, at least some people seem to use it ;) Best whishes, |
Thank you, Matthias, for building and sharing useful tools for the LaTeX community! It was only a pleasure working with you; I don't really think I did very much here - you provided all the necessary code through PRs, I only helped form it according to my (probably partly silly) code and documentation style. Also, thank you @torik42 for taking over the development and maintenance. Please feel free to let me know if I should make changes or updates to VimTeX (code and/or docs) as a result of updates to YaLafi! |
This PR relates to Issue #1698, more specifically this post.