Skip to content

Conversation

@amiralies
Copy link
Collaborator

@amiralies amiralies commented Dec 9, 2020

Closes #14

@amiralies
Copy link
Collaborator Author

according to vim docs (:h :syn-sync-first),
syntax sync fromstart is equivalent to using a large value for minlines.
This is what vim-javascript uses.
I think this solves sync issue for all cases, maybe wen can go with this for now and if we faces performance issues we can use an optiomal value for min / max value

@amiralies amiralies requested a review from ryyppy December 9, 2020 14:30
@ryyppy
Copy link
Member

ryyppy commented Dec 9, 2020

I tend to have enormous ReScript files (just check the re_pages/Playground.res file, that spans more than 1500 lines), I'd rather would like to try a line number of 600 or so

I think JavaScript workflows are different, because they tend to create a hundred 10 line files, instead of one 1000 line file

@amiralies
Copy link
Collaborator Author

You're right, long js files are headache but it's so natural to have large files in a language with ml style typesystem like ReScript.
IMO I don't think if it causes major performance issues but yeah we like vim because it's FAST. so for now we go with 600 and if we had problems (either large multiline strings or large comments) with this we can tweak the number or use sync fromstart.

@ryyppy
Copy link
Member

ryyppy commented Dec 9, 2020

Yeah let's keep an eye on that. I think 600 will be fine, just don't want to stress vim too much early on

thanks!

@ryyppy ryyppy merged commit f401598 into master Dec 9, 2020
@ryyppy ryyppy deleted the fix-syntax-highlight-sync branch December 9, 2020 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Highlighting bug when having template string literals

3 participants