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
Updated Rust keywords + indentation defaults #595
Conversation
Indentation per official style guide: https://aturon.github.io/style/whitespace.html Keywords updated to match https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/token.rs
LGTM |
lgtm |
primary=alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual while yield | ||
secondary=bool char f32 f64 i16 i32 i64 i8 int str u16 u32 u64 u8 uint | ||
primary=abstract alignof as become box break const continue crate do else enum extern false final fn for if impl in let loop macro match mod move mut offsetof override priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual where while yield | ||
secondary=bool char f32 f64 i8 i16 i32 i64 int isize str u8 u16 u32 u64 uint usize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#613 removes int
and uint
, does that sound correct to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, uint
and int
have been renamed to isize
/ usize
as per rust RFC 0544.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably was unfriendly to people with olde code using olde versions of rust to just simply remove them, doesn't hurt to have both in the keyword list.
Another thing syntax highlighters often mistake about rust is its support for nested block comments. For example take this code: /*
/*
inner
*/
interesting
*/
Same code rendered as C++: /*
/*
inner
*/
interesting
*/
I wonder, can geany cope with this? I don't use geany, so I can't test. I just know that the text editor I use (kate) has that precise problem. |
@est31 the syntax highlighting is done by the editor we use from the Scintilla project, you should report there. |
It's supported just fine :) (thanks to Scintilla support) |
Indentation per official style guide: https://aturon.github.io/style/whitespace.html
Keywords updated to match https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/token.rs