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
Don't force minlines in syntax/html.vim #14071
base: master
Are you sure you want to change the base?
Conversation
10 doesn't sound particular bad. So why do you want to change it? |
Because it doesn't sync? I have to How is 10 "not particularly bad" when the average HTML file is hundreds of lines? How is it OK to not respect |
Sounds more like you want a configuration variable that you can set for your specific use case.
I thought you wanted to disable it for performance reasons. Guess what: there is a reason, why a PR contains a big field where you can and should enter comments :) Also, I fail to see, how
Because that is for As mentioned, we probably want to make this variable configurable rather than remove it |
So make it configurable using g:vimsyn_minlines? Since that's a vim syntax file? |
If anything what I want to do locally is increase it, not decrease it. But the static 10 in the syntax file prevents that... so clearly it has to go, I don't even know why it's forced that way instead of relying on user settings? |
No, add a new variable, let's say: |
OK but then a follow-up question arises - why isn't there a way to globally set syntax sync minlines for all syntaxes? Related question, what makes you think 10 is a reasonable default (when it's clearly not, see my screenshots above)? |
Is there such a global thing? Where?
Just because it failed for your html files, doesn't mean it fails for anybody else. I don't work a lot with html files but whenever I did, it worked for me. And I guess nobody has complained until now ? |
I'm literally asking why it doesn't exist.
That's the part that genuinely surprises me - clearly when writing SFCs you're gonna have a relatively large script block and a relatively large style block, both of which are gonna be incorrectly synced 90% of the time, which is why (after frustratingly and frantically using I'm working on the |
It looks to me like if I do exactly what |
Why should it? It clearly depends on the syntax you are using.
And thanks for that.
Ideally it should really be the responsibility of each syntax script maintainer to find reasonable good defaults, so that not each user has to fiddle with a global variable that does not always work for all kinds of languages. But it seems it doesn't always work well enough.
@dkearns what's your preference? |
There's an extra issue for the latter point (documenting it in EDIT: As I mentioned earlier, I'm personally unsure that we can expect per-language "sane defaults", since what's sane is largely going to depend on user machine performance ; if anything, there could be a global "multiplier" to adjust all the per-language defaults, but having a global absolute line count as minlines sounds simpler to me (and more sensible). |
I'm guessing a better source of inspiration for a default that can be overriden is |
Removing the The best course of action is probably just to bump the default HTML You can override this value on a per-fileytpe basis by adding the command to something like Adding a config option is fine but it should be named |
No description provided.