-
Notifications
You must be signed in to change notification settings - Fork 393
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
Solution to generalize &spelllang use for textidote #1811
Comments
To summarize the current issue: Currently, the grammar compilers like I'm thinking of something like this:
I'd appreciate thoughts from @Konfekt and @matze-dd who has contributed code for these things. And for course from anyone else with opinions. Note: I don't really think a global configuration makes a lot of sense. At least, this should only be used as a mechanism for specifying a "global default" that might be prioritized before |
Agreed.
This is perhaps nice to have, but does now the value of
Yes, or simply choose that given first. Again, a modeline could set this choice once and for all. |
This sounds reasonable to me. Package babel accepts multiple languages in [...], too. One can switch languages with \foreignlanguage and \selectlanguage in the text. So, the user choice might be necessary also in this case. To be sure, I just checked whether LanguageTool-5.0 accepts multiple languages like EDIT: LT has an option -adl for auto-detection, but this probably is not very useful, here. |
I agree this is not clear cut, and we need to make some decisions.
Good point about the modeline.
I think it should be relatively easy to make a choice under amgiuity. There is already an API for this. But the use of So, the question is 1) how to do this in practise e.g. wrt. the comments above, and ii) who will do the work. I will probably get to it if noone else does it, but it is not at the top of my list for now. Thus it may take some time before I do it. Reg. number 1, I'm thinking something like this:
I think a dedicated option is not necessary. If it is not detected with |
This is probably best. In multi-language documents, people will perhaps switch forth and back in the text. |
Ok, I have a new proposal:
What do you think? |
Yes, |
I think that for all practical means modelines are more feasible. |
I think you may be right on this, @Konfekt. I can see a lot of headaches trying to implement this type of parsing. So, let's still rely on the |
This sounds reasonable. |
One could suggest a command function! Modeline(variable, value)
let cmd = 'set ' . a:variable . (empty(a:value) ? '' : '=' . a:value)
execute cmd
let modeline = substitute(&commentstring, '%s',' vim: ' . cmd . ': ', '')
call append(line('$'), modeline)
endfunction
command! -nargs=1 SetSpellLang call Modeline('spelllang', <q-args>) For example,
|
I've updated the docs and added a chooser UI if there are multiple values in |
Hi all, PS. Thank you very much for all the work on Vimtex. I find it wonderful to use. |
Thanks for the kind words! And congrats on building something that looks useful! I welcome it and will probably try it out when I get the time! |
Description
As requested at #1805 (comment): It would be nice with a solution that handles multiple languages specified by
&spelllang
.Describe the solution you'd like
An additional setting or as suggested at #1805 (comment).
The text was updated successfully, but these errors were encountered: