Skip to content

Remove NeogitCommitMessage filetype #415

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

Conversation

vinibispo
Copy link

Close #405

  • Remove NeogitCommitMessage filetype
  • Turn it back to gitcommit filetype

Comment on lines 8 to 10
syn match gitcommit /.*/ contained
syn match NeogitBranch /\S\+/ contained nextgroup=gitcommit
syn match NeogitRemote /\S\+/ contained nextgroup=gitcommit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not entirely sure but those probably can just be removed. Nvim comes with gitcommit syntax as well as there is treesitter parser for gitconmit now.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try removing

Copy link
Member

@CKolkey CKolkey Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, these can be removed altogether. Incorrect. See below.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An update on this: These should not be removed, and should be left unchanged. I was mistaken before: they have nothing to do with the NeogitGitCommit popup. These three lines are just for syntax highlighting on the status buffer of the branch name/remote name.

@CKolkey
Copy link
Member

CKolkey commented Feb 28, 2023

This change would prevent lua/neogit/autocmds.lua:19 from working properly. Not sure the consequences of that.

@gegoune
Copy link

gegoune commented Feb 28, 2023

      if api.nvim_buf_get_option(o.buf, "filetype"):find("Neogit") then
        return
      end

This could/should also check for gitcommit in that case. Not sure what implications of not checking that are, refreshing Neogit ongitcommit buffers' save makes little sense here I think.

@CKolkey
Copy link
Member

CKolkey commented Feb 28, 2023

Yea. I've been running with this patch for a week or two now without issue, and without addressing the above autocmd.

@vinibispo
Copy link
Author

I'll fix it, thanks @gegoune and @CKolkey

@vinibispo vinibispo closed this Mar 14, 2023
@vinibispo vinibispo force-pushed the fix/turn-it-back-to-gitcommit-filetype branch from a3c4092 to c4068a2 Compare March 14, 2023 20:04
@vinibispo
Copy link
Author

Sorry guys, I'll promise that I'll fix it

@vinibispo vinibispo deleted the fix/turn-it-back-to-gitcommit-filetype branch July 12, 2023 13:58
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.

Use git commit file type for commits
3 participants