Skip to content

Commit

Permalink
Using language configuration + smart indent
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam committed Dec 17, 2016
1 parent 1dda282 commit ac3ae6b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
File renamed without changes.
31 changes: 31 additions & 0 deletions haskell-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"comments": {
"lineComment": "--",
"blockComment": ["{-", "-}"]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "`", "close": "`", "notIn": ["string", "comment"] }
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["'", "'"],
["\"", "\""],
["`", "`"]
],
"indentationRules": {
"decreaseIndentPattern": "[\\]})][ \\t]*$/m",
"increaseIndentPattern": "((\\b(if\\b.*|then|else|do|of|let|in|where))|=|->|>>=|>=>|=<<|(^(data)( |\t)+(\\w|')+( |\\t)*))( |\\t)*$/"
}
}
14 changes: 5 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,24 @@
"Languages",
"Snippets"
],
"activationEvents": [
"onLanguage:haskell"
],
"main": "./out/src/extension",
"contributes": {
"languages": [{
"id": "haskell",
"aliases": ["Haskell", "haskell"],
"extensions": [".hs"]
"extensions": [".hs"],
"configuration": "./haskell-configuration.json"
}, {
"id": "cabal",
"aliases": ["cabal", "Cabal"],
"extensions": [
".cabal"
],
"configuration": "./cabal.configuration.json"
"configuration": "./cabal-configuration.json"
}, {
"id": "literate haskell",
"aliases": ["Literate Haskell", "literate Haskell"],
"extensions": [".lhs"]
"extensions": [".lhs"],
"configuration": "./haskell-configuration.json"
}],
"grammars": [{
"language": "haskell",
Expand All @@ -69,8 +67,6 @@
}]
},
"scripts": {
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./"
},
"devDependencies": {
"typescript": "^1.6.2",
Expand Down
27 changes: 0 additions & 27 deletions src/extension.ts

This file was deleted.

0 comments on commit ac3ae6b

Please sign in to comment.