-
Notifications
You must be signed in to change notification settings - Fork 24
git-{commit,fetch} file detection & lexing #142
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
base: default
Are you sure you want to change the base?
Conversation
Open to feedback - especially open to removing the Co-authored-by, Reviewed-by, etc, keywords as these are vendor-specific. As long as we can get the file-detection for both & comments highlighted in commit messages, I'm happy. |
Very nice, I really like to have a git-commit lexer in Textadept, I use the terminal version for writing commit messages a lot! I'm not sure whether the line-length should be included at the lexer level. Once there is a As for the word-list, I think something like "Bluetooth" is very Linux kernel specific I assume? Maybe just have the ones like "Co-authored-by"? |
I'll take out the "Bluetooth" & stuff & just keep the SMTP & *-by: ones. It looks like some lexers make use of variables on scintillua:
It seems like the comments in git-rebase are limited to 76 characters long, so I'll set that as the default, Thanks for your feedback |
Ye, details on what is appropriate for a lexer to be included are up to @orbitalquark - i'm just a happy user and would look forward to have some git lexing. What could be a cool addition is embedding the diff lexer to show the diff highlighted when one uses |
If you wanted to lex with a configurable property, you'd have to do this from inside a pattern function ( That said, if you can get configurable lexer properties to work, the only concern I'd have is performance, but since commit messages are supposed to be small, perhaps it's not much of an issue. Otherwise, this looks good to me for the most part. I can do a more thorough review when you're finished. |
Just pushed the changes. Bugs I haven't fixed:
Couldn't quite figure out how to match against EOF(?) for the first issue. Though in this state, it works for me, I appreciate any input you have. |
EOF is |
git-commit lexer