-
Notifications
You must be signed in to change notification settings - Fork 62
Migrate to ocamlmerlin-lsp #269
base: master
Are you sure you want to change the base?
Changes from 6 commits
4637b8a
1072823
aec1eac
a4c1821
d52fee6
57590da
690f2a4
c705687
32fe6d3
798219e
8bd13e5
7000de8
8f44e4e
ce09262
c6d6408
bf91e25
280112c
8e11395
9ae3159
be95b57
9e7085d
b06b7ec
9c7682d
6a75a9a
7e1dc9d
a6c0889
d5845d8
6c78709
c95bbc2
c7c77e4
520bdd4
2b66c0e
be6cac2
c759a28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,30 +16,26 @@ | |
"engines": { | ||
"vscode": "^1.21.0" | ||
}, | ||
"categories": ["Formatters", "Programming Languages", "Linters", "Snippets"], | ||
"keywords": ["ocaml", "reason", "bucklescript", "reasonml", "merlin"], | ||
"categories": [ | ||
"Formatters", | ||
"Programming Languages", | ||
"Linters", | ||
"Snippets" | ||
], | ||
"keywords": [ | ||
"ocaml", | ||
"reason", | ||
"bucklescript", | ||
"reasonml", | ||
"merlin" | ||
], | ||
"icon": "assets/logo.png", | ||
"activationEvents": ["onLanguage:ocaml", "onLanguage:reason"], | ||
"activationEvents": [ | ||
"onLanguage:ocaml", | ||
"onLanguage:reason" | ||
], | ||
"main": "./out/src/extension", | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "reason.caseSplit", | ||
"title": "Reason: Case Split" | ||
}, | ||
{ | ||
"command": "reason.showMerlinFiles", | ||
"title": "Reason: Show Merlin Files" | ||
}, | ||
{ | ||
"command": "reason.showAvailableLibraries", | ||
"title": "Reason: Show Libraries Available via Dependencies" | ||
}, | ||
{ | ||
"command": "reason.showProjectEnv", | ||
"title": "Reason: Show Environment" | ||
} | ||
], | ||
"configuration": { | ||
"type": "object", | ||
"title": "Reason configuration", | ||
|
@@ -60,26 +56,34 @@ | |
"type": "integer" | ||
}, | ||
{ | ||
"enum": ["Infinity"] | ||
"enum": [ | ||
"Infinity" | ||
] | ||
} | ||
], | ||
"default": 500, | ||
"description": | ||
"How long to idle (in milliseconds) after keypresses before refreshing linter diagnostics. Smaller values refresh diagnostics more quickly." | ||
"description": "How long to idle (in milliseconds) after keypresses before refreshing linter diagnostics. Smaller values refresh diagnostics more quickly." | ||
}, | ||
"reason.diagnostics.tools": { | ||
"type": "array", | ||
"items": { | ||
"enum": ["merlin", "bsb"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rusty-key @andreypopp One of the main advantages of this bsb integration was that bsb has full project visibility. So if one file changes and that change breaks other files, bsb is able to show those errors in the Diagnostics panel, even if the file is not opened. One has just to click on them to open the broken file, which is useful for large refactors. Is something like that possible with merlin? I always believed that merlin only has a "local view" of the world. 🤔 |
||
"enum": [ | ||
"merlin", | ||
"bsb" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We keep support for |
||
] | ||
}, | ||
"default": ["merlin"], | ||
"default": [ | ||
"merlin" | ||
], | ||
"maxItems": 2, | ||
"uniqueItems": true, | ||
"description": | ||
"Specifies which tool or tools will be used to get diagnostics. If you choose both \"merlin\" and \"bsb\", merlin will be used while editing and bsb when saving." | ||
"description": "Specifies which tool or tools will be used to get diagnostics. If you choose both \"merlin\" and \"bsb\", merlin will be used while editing and bsb when saving." | ||
}, | ||
"reason.format.width": { | ||
"type": ["number", null], | ||
"type": [ | ||
"number", | ||
null | ||
], | ||
"default": null, | ||
"description": "Set the width of lines when formatting code with refmt" | ||
}, | ||
|
@@ -101,18 +105,22 @@ | |
"reason.path.env": { | ||
"type": "string", | ||
"default": "env", | ||
"description": | ||
"The path to the `env` command which prints the language server environment for debugging editor issues." | ||
"description": "The path to the `env` command which prints the language server environment for debugging editor issues." | ||
}, | ||
"reason.path.ocamlformat": { | ||
"type": "string", | ||
"default": "ocamlformat", | ||
"description": "The path to the `ocamlformat` binary." | ||
}, | ||
"reason.path.ocamlmerlin": { | ||
"type": "string", | ||
"default": "ocamlmerlin", | ||
"description": "The path to the `ocamlmerlin` binary." | ||
}, | ||
"reason.path.ocpindent": { | ||
"reason.path.ocamlmerlin-lsp": { | ||
"type": "string", | ||
"default": "ocp-indent", | ||
"description": "The path to the `ocp-indent` binary." | ||
"default": null, | ||
"description": "The path to the `ocamlmerlin-lsp` binary." | ||
}, | ||
"reason.path.opam": { | ||
"type": "string", | ||
|
@@ -142,9 +150,15 @@ | |
"reason.server.languages": { | ||
"type": "array", | ||
"items": { | ||
"enum": ["ocaml", "reason"] | ||
"enum": [ | ||
"ocaml", | ||
"reason" | ||
] | ||
}, | ||
"default": ["ocaml", "reason"], | ||
"default": [ | ||
"ocaml", | ||
"reason" | ||
], | ||
"maxItems": 2, | ||
"uniqueItems": true, | ||
"description": "The list of languages enable support for in the language server." | ||
|
@@ -205,15 +219,19 @@ | |
{ | ||
"scopeName": "markdown.reason.codeblock", | ||
"path": "./syntaxes/reason-markdown-codeblock.json", | ||
"injectTo": ["text.html.markdown"], | ||
"injectTo": [ | ||
"text.html.markdown" | ||
], | ||
"embeddedLanguages": { | ||
"meta.embedded.block.reason": "reason" | ||
} | ||
}, | ||
{ | ||
"scopeName": "markdown.ocaml.codeblock", | ||
"path": "./syntaxes/ocaml-markdown-codeblock.json", | ||
"injectTo": ["text.html.markdown"], | ||
"injectTo": [ | ||
"text.html.markdown" | ||
], | ||
"embeddedLanguages": { | ||
"meta.embedded.block.ocaml": "ocaml" | ||
} | ||
|
@@ -222,8 +240,13 @@ | |
"languages": [ | ||
{ | ||
"id": "ocaml", | ||
"aliases": ["OCaml"], | ||
"extensions": [".ml", ".mli"], | ||
"aliases": [ | ||
"OCaml" | ||
], | ||
"extensions": [ | ||
".ml", | ||
".mli" | ||
], | ||
"configuration": "./ocaml.configuration.json" | ||
}, | ||
{ | ||
|
@@ -234,23 +257,40 @@ | |
}, | ||
{ | ||
"id": "ocaml.merlin", | ||
"aliases": ["Merlin"], | ||
"extensions": ["merlin"] | ||
"aliases": [ | ||
"Merlin" | ||
], | ||
"extensions": [ | ||
"merlin" | ||
] | ||
}, | ||
{ | ||
"id": "ocaml.ocamlbuild", | ||
"aliases": ["OCamlbuild"], | ||
"extensions": ["_tags"] | ||
"aliases": [ | ||
"OCamlbuild" | ||
], | ||
"extensions": [ | ||
"_tags" | ||
] | ||
}, | ||
{ | ||
"id": "ocaml.opam", | ||
"aliases": ["OPAM"], | ||
"extensions": ["opam"] | ||
"aliases": [ | ||
"OPAM" | ||
], | ||
"extensions": [ | ||
"opam" | ||
] | ||
}, | ||
{ | ||
"id": "reason", | ||
"aliases": ["Reason"], | ||
"extensions": [".re", ".rei"], | ||
"aliases": [ | ||
"Reason" | ||
], | ||
"extensions": [ | ||
".re", | ||
".rei" | ||
], | ||
"configuration": "./reason.configuration.json" | ||
}, | ||
{ | ||
|
@@ -263,15 +303,6 @@ | |
"id": "reason.hover.type" | ||
} | ||
], | ||
"menus": { | ||
"editor/context": [ | ||
{ | ||
"command": "reason.caseSplit", | ||
"group": "reason", | ||
"when": "editorTextFocus && resourceLangId == reason" | ||
} | ||
] | ||
}, | ||
"snippets": [ | ||
{ | ||
"language": "reason", | ||
|
@@ -281,20 +312,20 @@ | |
"problemMatchers": [ | ||
{ | ||
"name": "ocamlc", | ||
|
||
"fileLocation": ["relative", "${workspaceFolder}"], | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceFolder}" | ||
], | ||
"pattern": [ | ||
{ | ||
"regexp": | ||
"^\\s*\\bFile\\b\\s*\"(.*)\",\\s*\\bline\\b\\s*(\\d+),\\s*\\bcharacters\\b\\s*(\\d+)-(\\d+)\\s*:\\s*$", | ||
"regexp": "^\\s*\\bFile\\b\\s*\"(.*)\",\\s*\\bline\\b\\s*(\\d+),\\s*\\bcharacters\\b\\s*(\\d+)-(\\d+)\\s*:\\s*$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"endColumn": 4 | ||
}, | ||
{ | ||
"regexp": | ||
"^(?:\\s*\\bParse\\b\\s*)?\\s*\\b([Ee]rror|Warning)\\b\\s*(?:\\(\\s*\\bwarning\\b\\s*(\\d+)\\))?\\s*:\\s*(.*)$", | ||
"regexp": "^(?:\\s*\\bParse\\b\\s*)?\\s*\\b([Ee]rror|Warning)\\b\\s*(?:\\(\\s*\\bwarning\\b\\s*(\\d+)\\))?\\s*:\\s*(.*)$", | ||
"severity": 1, | ||
"code": 2, | ||
"message": 3 | ||
|
@@ -315,15 +346,16 @@ | |
"@types/lodash.flatmap": "^4.5.3", | ||
"@types/node": "9.6.2", | ||
"@types/pegjs": "0.10.0", | ||
"@types/uuid": "^3.4.4", | ||
"prettier": "1.11.1", | ||
"tslint": "5.9.1", | ||
"typescript": "2.8.1", | ||
"vscode": "1.1.14" | ||
}, | ||
"dependencies": { | ||
"lodash.flatmap": "^4.5.0", | ||
"ocaml-language-server": "1.0.35", | ||
"pegjs": "0.10.0", | ||
"uuid": "^3.3.2", | ||
"vscode-jsonrpc": "3.6.0", | ||
"vscode-languageclient": "4.0.1", | ||
"vscode-languageserver": "4.0.0", | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated change?