Skip to content
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

Grammars: Missing support for proto2 #11794

Open
1 of 7 tasks
sdoerner opened this issue Sep 29, 2024 · 2 comments
Open
1 of 7 tasks

Grammars: Missing support for proto2 #11794

sdoerner opened this issue Sep 29, 2024 · 2 comments
Labels
A-language-support Area: Support for programming/text languages C-enhancement Category: Improvements

Comments

@sdoerner
Copy link

sdoerner commented Sep 29, 2024

I'm planning to work on this, so feel free to assign (I don't have permissions).

Current situation:

Problems of current situation:

  • no proto2 support (also no support Editions but this is not supported anywhere so out of scope for now)
  • different grammar than nvim leads to fragmentation
  • neither of the grammars' feature sets is a superset of the other one --> upstream work needed
  • inconsistent language identifier (proto vs protobuf)

Plan of action

Analysis of missing features

Features missing for highlights.scm:

  • missing mapName, extendName, fieldName and enumVariantName
  • missing optionName - this is fixed in the fixups branch but needs merging into main

Features missing for indents.scm:

  • oneofBody, serviceBody and rpcBody are missing. You can use oneof, service and rpc instead, but this probably leads to some regressions. Not sure if there is a severe enough case to block on this. I noticed a difference with declarations like this in hybrid indent heuristic, but they actually both misbehave.
    rpc FooRpc(FooRpcRequest)
        returns (FooRpcResponse) {
      option deadline = 20.0;
    }
    

Features missing for textobjects.scm:

  • missing serviceBody
@sdoerner
Copy link
Author

@yusdacra @treywood - feel free to comment directly here on the above. Otherwise I'll try to reach out more directly.

@the-mikedavis the-mikedavis added C-enhancement Category: Improvements A-language-support Area: Support for programming/text languages labels Sep 29, 2024
@yusdacra
Copy link
Contributor

yusdacra commented Oct 3, 2024

yeah sure, i don't mind unifying work somewhere else. i haven't looked at the grammar in a long while anyway 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

3 participants