Commit Graph

40 Commits

Author SHA1 Message Date
Keith Smiley
d87608dcd1 Operators also should be highlighted in literals 2016-01-08 14:46:20 -08:00
Keith Smiley
7081de3cbe Literal wrappers can contain methods
This fixes a bug where a method call with a trailing [] would be
highlighted incorrectly because a different match trumped the function
call.
2016-01-08 14:42:33 -08:00
Keith Smiley
66474b647a Single forward slash terminates type wrappers
This fixes a problem where comments at the end of a line could be
contained in the highlighting of the prefix. Now matches end 1 character
before their "actual" end
2016-01-08 14:37:03 -08:00
Keith Smiley
98cb48e309 Add new swift comment identifiers 2016-01-08 12:57:22 -08:00
Keith Smiley
39a5abebed Handle more indention cases, now without smartindent
Closes #66
2015-10-18 16:49:15 -07:00
Keith Smiley
fe3845e820 Add highlighting for doccomments
This highlights the parameter and returns portions of docstrings

Closes #50
2015-10-18 12:57:12 -07:00
Keith Smiley
9b826d44bf Add backtick example 2015-10-18 11:23:08 -07:00
Keith Smiley
244063386b Fix backslashes breaking syntax highlighting
Fixes #42
2015-10-17 18:08:14 -07:00
Keith Smiley
1e04ee9224 Merge pull request #56 from ajh17/swift2-available
Highlight @available/#available attributes
2015-10-17 15:49:42 -07:00
Akshay Hegde
aee9527621 Add support for availability arguments
This adds the availability arguments described in the "Attributes"
chapter of the "The Swift Programming Language" book. Also expand the
list of platform names based on the Swift book.

References #56
2015-09-07 02:59:46 -07:00
Akshay Hegde
91cc1e63cb Improve highlighting of #available condition
Conforming to Xcode, the syntax file now highlights platforms contained
within the `#available` condition.

It also now removes highlighting numbers and the "*" (i.e, symbol for
future platforms) that are contained within the `#available` condition
since they are not literal numbers or operator (thanks to @acclissold
for the idea)

Additionally, add tests to example.swift to demonstrate highlighting of
them.

References #56
2015-09-07 00:57:11 -07:00
Akshay Hegde
3d9d130b6f Improve parsing of underscore padded numbers
Now handles a case where 1_0_0 wouldn't be highlighted. Also adds yet
more underscore padded number tests to example.swift.

References #55
2015-09-06 23:54:40 -07:00
Akshay Hegde
05fbee827d Allow many underscores for underscore padded number
Swift compiler currently allows multiple underscore in an underscore
padded number. For instance, 1___00 is a valid way to write 100 in
Swift.

Also add more underscore padded numbers in example.swift file for
testing purposes. Thanks to @aclissold for these.

References #55
2015-09-06 23:30:23 -07:00
Akshay Hegde
b616f5eeb4 Fix highlighting for underscore separated numbers
"The Basics" chapter of the official "The Swift Programming Language"
book states that you can pad numbers with underscores to help
readability.

This commit also handles the case where underscore padded numbers can
also contain a period (i.e., underscore padded float/double)

Additionally, added some underscore padded numbers in example/swift.vim
for testing purposes.

Fixes #51
2015-09-06 21:47:25 -07:00
Keith Smiley
73283a19b0 Fix some indentation issues 2014-10-22 13:48:09 -07:00
Keith Smiley
1acdb2f128 Fix square bracket indents 2014-08-24 18:35:48 -07:00
Keith Smiley
edcbcd7bcb Syntax updates 2014-08-24 17:42:02 -07:00
Keith Smiley
b0f447f9db Add type example 2014-08-17 08:04:41 -07:00
Keith Smiley
d7fd8e73d0 Give up aligning by colons
Instead align to the opening paren
2014-08-16 15:21:58 -07:00
Keith Smiley
7e0eb6d668 Fix nested parens in multiline declarations
Fixes #19 I hope
2014-08-16 14:39:43 -07:00
Keith Smiley
1ffd1454a4 Indent multi line paren stuff
Fixes #19
2014-08-16 14:18:23 -07:00
Keith Smiley
fdb1ac8e71 Fix indenting with ==
Closes #16
2014-08-16 13:52:10 -07:00
Keith Smiley
9a31e2fbfc Example for
https://github.com/Keithbsmiley/swift.vim/pull/15
2014-08-14 08:54:08 -07:00
Keith Smiley
bcc90ad493 Fix indented block comments
Closes #13
2014-08-04 10:49:35 -07:00
Keith Smiley
0b3fdad8b1 Multi line comment folding 2014-08-04 10:45:05 -07:00
Keith Smiley
b816d9a6d5 Comment spell checking 2014-08-04 10:42:54 -07:00
Keith Smiley
e18dcdfba8 Add swift preprocessor stuff
Closes #10
2014-08-03 15:18:57 -07:00
Keith Smiley
44f055d446 Add exponential number types 2014-06-27 23:19:09 -07:00
Keith Smiley
f22b1e26e8 Add string interpolated function call example 2014-06-16 09:35:30 -07:00
Keith Smiley
f16e20650b Add examples of attributes 2014-06-15 20:38:57 -07:00
Keith Smiley
4fdea6f297 Add nested multiline comment example 2014-06-15 20:10:55 -07:00
Keith Smiley
a34e24316f Colon alignment example 2014-06-15 12:29:23 -07:00
Keith Smiley
9a544433ac Example of string arguments 2014-06-15 11:40:47 -07:00
Keith Smiley
48676bfa73 Fix ! operator coloring 2014-06-14 12:42:53 -07:00
Keith Smiley
6e6f5a35fb Add interpolated string example 2014-06-13 18:58:20 -07:00
Keith Smiley
72f0d73b91 Fix generics highlighting 2014-06-13 17:00:54 -07:00
Keith Smiley
9625b90924 Examples 2014-06-13 16:32:46 -07:00
Keith Smiley
90a37957d1 Examples 2014-06-13 15:33:10 -07:00
Keith Smiley
90aac73da9 Add literal and operator examples 2014-06-13 13:16:35 -07:00
Keith Smiley
79390292ac Add an example script 2014-06-13 11:45:22 -07:00