mirror of
https://github.com/keith/swift.vim.git
synced 2025-12-22 12:14:13 +01:00
Fix an issue where numbers were being highlighted as properties
Improves regex for swiftMethod and swiftProperties to expect a non-digit following a period, as swift does not allow methods/funcs starting with a digit. Resolves #100
This commit is contained in:
@@ -90,8 +90,8 @@ syntax match swiftOperator "\v\>"
|
||||
syntax match swiftOperator "\v\?\?"
|
||||
|
||||
" Methods/Functions/Properties
|
||||
syntax match swiftMethod "\(\.\)\@<=\w\+\((\)\@="
|
||||
syntax match swiftProperty "\(\.\)\@<=\<\w\+\>(\@!"
|
||||
syntax match swiftMethod "\.\@<=\<\D\w*\>\ze("
|
||||
syntax match swiftProperty "\.\@<=\<\D\w*\>(\@!"
|
||||
|
||||
" Swift closure arguments
|
||||
syntax match swiftClosureArgument "\$\d\+\(\.\d\+\)\?"
|
||||
|
||||
Reference in New Issue
Block a user