Skip to content

Commit

Permalink
[Haskell] Adjust scopes for imports
Browse files Browse the repository at this point in the history
Not final due to sublimehq#1842 being
unresolved, but still an improvement.
  • Loading branch information
FichteFoll committed Dec 3, 2019
1 parent 4d4210c commit f237a4e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Haskell/Haskell.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,14 @@ contexts:

module_exports:
- match: \(
scope: punctuation.section.group.begin.haskell
push:
- meta_scope: meta.declaration.exports.haskell
- match: \)
scope: punctuation.section.group.end.haskell
pop: true
- match: '\b[a-z][a-zA-Z_''0-9]*'
scope: entity.name.function.haskell
scope: variable.function.haskell
- match: '\b[A-Z][A-Za-z_''0-9]*'
scope: storage.type.haskell
- match: ','
Expand Down
16 changes: 16 additions & 0 deletions Haskell/syntax_test_haskell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,22 @@

--KEYWORDS

import qualified Data.Vector.Mutable as MutableVector
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.import.haskell
-- ^^^ keyword.control.import.haskell
-- ^^^^^^^^^ keyword.control.import.haskell
-- ^^^^^^^^^^^^^^^^^^^ support.other.module.haskell
-- ^^ keyword.control.import.haskell
-- ^^^^^^^^^^^^^ support.other.module.haskell
import Data.List.Split (splitOn)
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.import.haskell
-- ^^^ keyword.control.import.haskell
-- ^^^^^^^^^^^^^^^ support.other.module.haskell
-- ^^^^^^^^^ meta.declaration.exports.haskell
-- ^ punctuation.section.group.begin.haskell
-- ^^^^^^^ variable.function.haskell
-- ^ punctuation.section.group.end.haskell

test =
-- ^ keyword.operator.haskell
let x = 2 in x * y
Expand Down

0 comments on commit f237a4e

Please sign in to comment.