Skip to content

Upstreaming 5/n - Cleanup syntax files #504

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

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

CKolkey
Copy link
Member

@CKolkey CKolkey commented May 11, 2023

This is just a general cleanup of the syntax files. A lot of the sign definitions have been extracted to a lua file, as well as highlight definitions. Makes it easier to do dynamic highlights/signs and prevent issues for users who have syntax disabled.

@CKolkey CKolkey changed the base branch from CKolkey to master May 31, 2023 08:47
@CKolkey CKolkey changed the base branch from master to CKolkey May 31, 2023 08:48
@CKolkey CKolkey marked this pull request as ready for review May 31, 2023 08:48
@CKolkey
Copy link
Member Author

CKolkey commented May 31, 2023

@ten3roberts - The failing spec is just because of the same issues that are corrected in the base branch. I don't have a button to re-run CI here though.

Looks like it ran.

@ten3roberts
Copy link
Member

Is this related to the sections like HEAD: {...} and headlines like Recent commits having a different color?

@CKolkey
Copy link
Member Author

CKolkey commented May 31, 2023

Yea, but that's all unchanged. All this PR is doing is removing the hi link and sign define calls, since those are now in neogit/lib/hl and neogit/lib/signs... and some formatting changes.

The advantage of that is:

  1. Signs are still defined for users who have syntax off. (resolves: Error message when opening #465)
  2. Highlights groups are all defined in one place, allowing for a common pallette to be used.

@ten3roberts
Copy link
Member

So if I am understanding this all right this just removes now unnused syntax files in favor of the already merged nvim_sign_define nvim_set_hl etc.

How related are the upstreaming changes to

#415?
and
#405?

@CKolkey
Copy link
Member Author

CKolkey commented May 31, 2023

You are 100% right, and not really related at all.

The next PR in the stack addresses filetypes (the linked issues), and I came to the conclusion we can have the best of both worlds: custom filetypes for neogit buffers, and treesitter parsers turned on (if available). I think its very handy to be able to define behaviour that doesn't leak out, but, like I said, thats up next :)

@ten3roberts ten3roberts merged commit c8af6d8 into NeogitOrg:CKolkey Jun 1, 2023
@ten3roberts
Copy link
Member

Agreed, it is advantageous to make use of treesitter rather than our own hand rolled regexes

@CKolkey CKolkey deleted the merge-upstream-5 branch July 10, 2023 12:22
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.

2 participants