Skip to content
Browse files

Improve completions + snippets

  • Loading branch information...
1 parent c73c05f commit 45ed9065ffb506ab8f281775b46888be151c3a6e @nh2 nh2 committed
Showing with 30 additions and 2 deletions.
  1. +6 −0 Data.sublime-snippet
  2. +11 −0 Haskell.sublime-completions
  3. +6 −0 IfThenElse.sublime-snippet
  4. +6 −0 Inline.sublime-snippet
  5. +1 −2 Newtype.sublime-snippet
View
6 Data.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[data ${1:Type} = ${1:Constructor} deriving (${2:Eq, Show})]]></content>
+ <tabTrigger>data</tabTrigger>
+ <scope>source.haskell</scope>
+ <description>data declaration</description>
+</snippet>
View
11 Haskell.sublime-completions
@@ -4,11 +4,22 @@
"completions":
[
"class",
+ "default",
"deriving",
+ "do",
+ "forall",
+ "foreign",
+ "hiding",
+ "infix",
+ "infixl",
+ "infixr",
"instance",
+ "let",
+ "mdo",
"module",
"newtype",
"qualified",
+ "rec",
"type",
"undefined",
"where",
View
6 IfThenElse.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[if ${1:condition} then ${2:expression} else ${3:expression}]]></content>
+ <tabTrigger>if</tabTrigger>
+ <scope>source.haskell</scope>
+ <description>if-then-else</description>
+</snippet>
View
6 Inline.sublime-snippet
@@ -0,0 +1,6 @@
+<snippet>
+ <content><![CDATA[{-# INLINE ${0:function} #-}]]></content>
+ <tabTrigger>inline</tabTrigger>
+ <scope>source.haskell</scope>
+ <description>Inline Pragma</description>
+</snippet>
View
3 Newtype.sublime-snippet
@@ -1,7 +1,6 @@
<snippet>
<content><![CDATA[
-newtype ${1:NewType} = $1 { ${2:un$1} :: ${3:Type} }
-]]></content>
+newtype ${1:NewType} = $1 { ${2:un$1} :: ${3:Type} } deriving (${4:Eq, Show})]]></content>
<tabTrigger>newtype</tabTrigger>
<scope>source.haskell</scope>
</snippet>

0 comments on commit 45ed906

Please sign in to comment.
Something went wrong with that request. Please try again.