Skip to content

Conversation

@ap4y
Copy link
Collaborator

@ap4y ap4y commented Jul 16, 2014

This PR contains series of improvements and fixes for indentation and highlighting. Hope it won't be a problem merging this batch instead of groups of PRs.

Changes:

  • Highlighting for attributes like @objc, @IBAction etc;
  • Highlighting for self and super keyword;
  • Small fix for string interpolation highlighting, it leaked outside of the interpolation expression if string contained brackets;
  • Indentation for function declaration work with various attributes (previously worked only with override);
  • Fixed indentation issues for types with annotations (i.e. Dictionary<String, String>);
  • Improvement multi-line hash and array indentation, behaves same as in Xcode;
  • Fixed indentation issues for multi-line function calls when arguments contained optional(?) or unwrap(!) literal;
  • Fixed indentation issues of statements inside enum declaration.
@ap4y
Copy link
Collaborator Author

ap4y commented Jul 16, 2014

For some reason one test fails on travis. It works in my local environment, but I was able to reproduce it in ubuntu VM. I will fix it tomorrow.

@bbatsov
Copy link
Collaborator

bbatsov commented Jul 16, 2014

@ap4y No worries; you've done a great job so far. :-)

compatible with emacs <24.4 Unfortunately, multi-line hash/array syntax with arguments starting on a new line looks a bit weird in emacs <24.4. In emacs 24.4 smie parser handles this case a bit differently, it gives a bit more options to customize rules. I think similar issue presents in other modes too, for example in ruby-mode.
@ap4y
Copy link
Collaborator Author

ap4y commented Jul 16, 2014

I couldn't sleep without fixing this test :) Should be sweet now.

bbatsov added a commit that referenced this pull request Jul 16, 2014
Set of improvements and fixes #1
@bbatsov bbatsov merged commit ca6437a into swift-emacs:master Jul 16, 2014
@bbatsov
Copy link
Collaborator

bbatsov commented Jul 16, 2014

I like your attitude towards problem-solving. :-)

Regarding the issue at hand - yes, the problem is present in ruby-mode as well, but ruby-mode starts using SMIE in 24.4 so it doesn't have to care about older smie implementation. As a lot of modes started using SMIE lately it saw a lot of improvements in 24.4.

@ap4y
Copy link
Collaborator Author

ap4y commented Jul 16, 2014

Agree, ruby-mode and this mode look way better in 24.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants