-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'lsp-over-websocket' into refactors-0.20.0
- Loading branch information
Showing
213 changed files
with
4,434 additions
and
2,732 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
module Test { | ||
fun test : String { | ||
"" | ||
} | ||
} | ||
------------------------------------------------------------------file test.mint | ||
{ | ||
"id": 0, | ||
"method": "textDocument/codeAction", | ||
"params": { | ||
"textDocument": { | ||
"uri": "file://#{root_path}/test.mint" | ||
}, | ||
"range": { | ||
"start": { "line": 1, "character": 8 }, | ||
"end": { "line": 1, "character": 8 } | ||
}, | ||
"context": { | ||
"diagnostics": [] | ||
} | ||
} | ||
} | ||
-------------------------------------------------------------------------request | ||
{ | ||
"jsonrpc": "2.0", | ||
"result": [ | ||
{ | ||
"title": "Order Entities", | ||
"kind": "source", | ||
"diagnostics": [], | ||
"isPreferred": false, | ||
"edit": { | ||
"changes": { | ||
"file://#{root_path}/test.mint": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 0 | ||
}, | ||
"end": { | ||
"line": 9999, | ||
"character": 999 | ||
} | ||
}, | ||
"newText": "module Test {\n fun test : String {\n \"\"\n }\n}" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"id": 0 | ||
} | ||
------------------------------------------------------------------------response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
type Test { | ||
name : String | ||
} | ||
|
||
provider Test : Test { | ||
fun test : String { | ||
"" | ||
} | ||
} | ||
------------------------------------------------------------------file test.mint | ||
{ | ||
"id": 0, | ||
"method": "textDocument/codeAction", | ||
"params": { | ||
"textDocument": { | ||
"uri": "file://#{root_path}/test.mint" | ||
}, | ||
"range": { | ||
"start": { "line": 5, "character": 11 }, | ||
"end": { "line": 5, "character": 11 } | ||
}, | ||
"context": { | ||
"diagnostics": [] | ||
} | ||
} | ||
} | ||
-------------------------------------------------------------------------request | ||
{ | ||
"jsonrpc": "2.0", | ||
"result": [ | ||
{ | ||
"title": "Order Entities", | ||
"kind": "source", | ||
"diagnostics": [], | ||
"isPreferred": false, | ||
"edit": { | ||
"changes": { | ||
"file://#{root_path}/test.mint": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 0, | ||
"character": 0 | ||
}, | ||
"end": { | ||
"line": 9999, | ||
"character": 999 | ||
} | ||
}, | ||
"newText": "type Test {\n name : String\n}\n\nprovider Test : Test {\n fun test : String {\n \"\"\n }\n}" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"id": 0 | ||
} | ||
------------------------------------------------------------------------response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
component Test { | ||
fun otherFunction (name : String) : String { | ||
name | ||
} | ||
|
||
fun render : String { | ||
"Hello" | ||
} | ||
} | ||
------------------------------------------------------------------file test.mint | ||
{ | ||
"id": 0, | ||
"method": "textDocument/completion", | ||
"params": { | ||
"textDocument": { | ||
"uri": "file://#{root_path}/test.mint" | ||
}, | ||
"position": { | ||
"line": 3, | ||
"character": 4 | ||
} | ||
} | ||
} | ||
-------------------------------------------------------------------------request | ||
{ | ||
"label": "otherFunction", | ||
"kind": 3, | ||
"detail": "Function", | ||
"documentation": "", | ||
"deprecated": false, | ||
"preselect": false, | ||
"sortText": "otherFunction", | ||
"filterText": "otherFunction", | ||
"insertText": "otherFunction()", | ||
"insertTextFormat": 2 | ||
} | ||
--------------------------------------------------------------response 0 contain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
component Test { | ||
fun render : Html { | ||
<></> | ||
} | ||
} | ||
------------------------------------------------------------------file test.mint | ||
{ | ||
"id": 0, | ||
"method": "textDocument/completion", | ||
"params": { | ||
"textDocument": { | ||
"uri": "file://#{root_path}/test.mint" | ||
}, | ||
"position": { | ||
"line": 3, | ||
"character": 4 | ||
} | ||
} | ||
} | ||
-------------------------------------------------------------------------request | ||
{ | ||
"label": "Test", | ||
"kind": 15, | ||
"detail": "Component", | ||
"documentation": "", | ||
"deprecated": false, | ||
"preselect": false, | ||
"sortText": "Test", | ||
"filterText": "Test", | ||
"insertText": "<Test>\n \n</Test>", | ||
"insertTextFormat": 2 | ||
} | ||
--------------------------------------------------------------response 0 contain |
49 changes: 49 additions & 0 deletions
49
spec/language_server/completion/html_component_with_snippet_support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
component Test { | ||
fun render : Html { | ||
<></> | ||
} | ||
} | ||
------------------------------------------------------------------file test.mint | ||
{ | ||
"id": 0, | ||
"method": "initialize", | ||
"params": { | ||
"capabilities": { | ||
"textDocument": { | ||
"completion": { | ||
"completionItem": { | ||
"snippetSupport": true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
-------------------------------------------------------------------------request | ||
{ | ||
"id": 1, | ||
"method": "textDocument/completion", | ||
"params": { | ||
"textDocument": { | ||
"uri": "file://#{root_path}/test.mint" | ||
}, | ||
"position": { | ||
"line": 3, | ||
"character": 4 | ||
} | ||
} | ||
} | ||
-------------------------------------------------------------------------request | ||
{ | ||
"label": "Test", | ||
"kind": 15, | ||
"detail": "Component", | ||
"documentation": "", | ||
"deprecated": false, | ||
"preselect": false, | ||
"sortText": "Test", | ||
"filterText": "Test", | ||
"insertText": "<Test>\n $0\n</Test>", | ||
"insertTextFormat": 2 | ||
} | ||
--------------------------------------------------------------response 1 contain |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.