More snippets for purescript and stuff
This commit is contained in:
parent
4b3c896343
commit
2497c51550
|
@ -25,6 +25,7 @@ function M.setup()
|
||||||
|
|
||||||
-- Create chords
|
-- Create chords
|
||||||
if arpeggio ~= nil then
|
if arpeggio ~= nil then
|
||||||
|
arpeggio.chord("n", "vs", "<C-w>v") -- Create vertical split
|
||||||
arpeggio.chord("n", "vs", "<C-w>v") -- Create vertical split
|
arpeggio.chord("n", "vs", "<C-w>v") -- Create vertical split
|
||||||
arpeggio.chord("n", "ji", ":w<cr>") -- Saving
|
arpeggio.chord("n", "ji", ":w<cr>") -- Saving
|
||||||
arpeggio.chord("i", "jk", "<Esc>") -- Remap Esc to jk
|
arpeggio.chord("i", "jk", "<Esc>") -- Remap Esc to jk
|
||||||
|
|
|
@ -13,6 +13,7 @@ local bindings = {
|
||||||
|
|
||||||
-- See diagnostics with space + d
|
-- See diagnostics with space + d
|
||||||
diagnostics = "<Leader>d",
|
diagnostics = "<Leader>d",
|
||||||
|
lsp_document_symbols = { chord = 1, key = "lds" },
|
||||||
|
|
||||||
-- Open a list with all the pickers
|
-- Open a list with all the pickers
|
||||||
builtin = "<Leader>t",
|
builtin = "<Leader>t",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"Derive newtype instance": {
|
"Derive newtype instance": {
|
||||||
"prefix": "nderive",
|
"prefix": "gnderive",
|
||||||
"description": "Use newtype deriving on any typeclass",
|
"description": "Use newtype deriving on any typeclass",
|
||||||
"body": "derive newtype instance $0 $3 $2"
|
"body": "derive newtype instance $0 $3 $2"
|
||||||
},
|
},
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Generic": {
|
"Generic": {
|
||||||
"prefix": "generic",
|
"prefix": "dgeneric",
|
||||||
"description": "Generate the generic instance for a type",
|
"description": "Generate the generic instance for a type",
|
||||||
"body": "derive instance Generic $1 _"
|
"body": "derive instance Generic $1 _"
|
||||||
},
|
},
|
||||||
|
@ -52,8 +52,26 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Functor": {
|
"Functor": {
|
||||||
"prefix": "functor",
|
"prefix": "dfunctor",
|
||||||
"description": "Derive a Functor instance",
|
"description": "Derive a Functor instance",
|
||||||
"body": "derive instance Functor $1$0"
|
"body": "derive instance Functor $1$0"
|
||||||
|
},
|
||||||
|
"Eq": {
|
||||||
|
"prefix": "deq",
|
||||||
|
"description": "Derive an Eq instance",
|
||||||
|
"body": "derive instance Eq $1$0"
|
||||||
|
},
|
||||||
|
"Ord": {
|
||||||
|
"prefix": "dord",
|
||||||
|
"description": "Derive an Ord instance",
|
||||||
|
"body": "derive instance Ord $1$0"
|
||||||
|
},
|
||||||
|
"Eq & Ord": {
|
||||||
|
"prefix": "deqord",
|
||||||
|
"description": "Derive an Eq and an Ord instance",
|
||||||
|
"body": [
|
||||||
|
"derive instance Eq $1",
|
||||||
|
"derive instance Ord $1$0"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,5 +33,20 @@
|
||||||
"prefix": "impavar",
|
"prefix": "impavar",
|
||||||
"description": "import AVar module",
|
"description": "import AVar module",
|
||||||
"body": "import Effect.Aff.AVar as AV"
|
"body": "import Effect.Aff.AVar as AV"
|
||||||
|
},
|
||||||
|
"Object": {
|
||||||
|
"prefix": "impobject",
|
||||||
|
"description": "import Foreign.Object module",
|
||||||
|
"body": "import Foreign.Object as Object"
|
||||||
|
},
|
||||||
|
"STObject": {
|
||||||
|
"prefix": "impstobject",
|
||||||
|
"description": "import STObject module",
|
||||||
|
"body": "import Foreign.Object.ST as STObject"
|
||||||
|
},
|
||||||
|
"Ref": {
|
||||||
|
"prefix": "impref",
|
||||||
|
"description": "import Effect.Ref module",
|
||||||
|
"body": "import Effect.Ref as Ref"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,5 +60,15 @@
|
||||||
"-- | $0",
|
"-- | $0",
|
||||||
"-- | ```"
|
"-- | ```"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"Section": {
|
||||||
|
"prefix": "section",
|
||||||
|
"description": "Delimit a section using 10 dashes",
|
||||||
|
"body" : "---------- $0"
|
||||||
|
},
|
||||||
|
"Typeclass instances": {
|
||||||
|
"prefix": "sinstances",
|
||||||
|
"description": "Delimit a section which declares typeclass instances",
|
||||||
|
"body" : ["---------- Typeclass instances", "$0"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue