https://github.com/vim/vim/pull/9124
(1 file)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
Did you try to contact the maintainer of the java syntax plugin?
https://github.com/vim/vim/blob/113cb513f76d8866cbb6dc85fa18aded753e01da/runtime/syntax/java.vim#L3-L4
They have a repo here on github.
That repo has had no activity since the day after it was created three years ago.
That repo has had no activity since the day after it was created three years ago.
I guess that means "no". Next time, mention this information in the OP.
ping @fleiner
ping could we merge this?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Claudio did respond in March, let me send him an email directly.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@njhanley can you please rebase? @fleiner can you please ACK?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@njhanley pushed 0 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@dkearns approved this pull request.
@chrisbra, I don't think we've heard from Claudio for some time and this look fine to me.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
thanks for pinging. Let me merge it
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Merged #9124 into master.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Unfortunately, the treatment of yield
is incomplete: yield
statements and yield
methods should be distinguishable.
class Test { public static void main(String[] args) { System.out.println(switch (args.length) { case 0 -> { System.err.println("no arguments"); yield "java"; } default -> { System.err.format("%d arguments%n", args.length); yield java.util.Arrays.toString(args); } }); Thread.yield(); } }
The Java Specification has this to say:
Since the term
yield
is excluded from UnqualifiedMethodIdentifier, any invocation of a method namedyield
must be qualified, thus distinguishing the invocation from ayield
statement (§14.21).
Here is my attempt.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Unfortunately, I don't know if @fleiner is still active. You may want to send the PR here to this repo instead
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Unfortunately, the treatment of
yield
is incomplete:yield
statements andyield
methods should be distinguishable.
As this is a problem for contextual keywords in general, perhaps you could look at generalising the solution in the future?
Here is my attempt.
You seem to have done a lot of work updating the syntax file for more recent additions and there doesn't appear to have been any acknowledgement. Have you tried emailing Claudio directly? Perhaps he'd be happy to let someone else maintain it.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@dkearns, as far as I remember, no fundamental contexts are
defined in terms of :syn-region
in syntax/java.vim
(namely,
class
, interface
, "method", etc.); there are minor contexts:
comments (javaComment
, javaLineComment
, javaDocComment
),
a few recursive definitions (javaParenT*
; javaDocSnippetTag
,
javaGenerics
, javaStrTempl
->javaStrTemplEmbExp
->TOP
:
see my patches).
But individual tokens and grouped tokens are matchable; e.g.
there is javaFuncDef
but neither throws
(javaMethodDecl
)
nor return
(javaStatement
) belong to its :syn-contains
or :syn-nextgroup
. (I suspect that syntax/java.vim
steams
in the wake of syntax/c.vim
in this regard.)
class Test { ////////////////////////// javaMethodDecl ////////////////////////// | | /////////////////// javaFuncDef | /////////////////// | | | | /////////////////// V V V V static byte read() throws java.io.IOException /////// javaBraces /////// | /////// V { /////////////// javaStatement /////////////// | | /////////////// V V return (byte) 0; } /////// ^ /////// | /////// javaBraces }
So in order to not lose syntax bearings, sooner or later you
tend to end up with awkward and humongous regexps that do
a lot of looking around. It is feasible to incrementally
form contexts, but I wonder, if there was a reason against
their introduction at the time.
I haven't received any response from Claudio Fleiner when I
last emailed him on 30 Sept., 2022.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@chrisbra, that PR is huge and, across its 29 commits, I've
touched or introduced over half of all lines. I think, it
would be easier on the eyes of volunteering reviewers and
prudent for me to cherry pick a few commits at a time, write
necessary screen dumps along, and present them as a series
of PRs to this repo.
Are we okay with this diverging action towards the upstream?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Are we okay with this diverging action towards the upstream?
I haven't heard from Claudio in quite some time. So yes.
I think, it
would be easier on the eyes of volunteering reviewers and
prudent for me to cherry pick a few commits at a time, write
necessary screen dumps along, and present them as a series
of PRs to this repo.
That sounds like a good plan.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.