-
Notifications
You must be signed in to change notification settings - Fork 60
Update some docs #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Update some docs #161
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -2,31 +2,30 @@ let help = | |
{| | ||
**Private CLI For rescript-vscode usage only** | ||
|
||
Examples: | ||
API examples: | ||
./rescript-editor-analysis.exe complete src/MyFile.res 0 4 currentContent.res | ||
./rescript-editor-analysis.exe definition src/MyFile.res 9 3 | ||
./rescript-editor-analysis.exe dump src/MyFile.res src/MyFile2.res | ||
./rescript-editor-analysis.exe documentSymbol src/Foo.res | ||
./rescript-editor-analysis.exe hover src/MyFile.res 10 2 | ||
./rescript-editor-analysis.exe references src/MyFile.res 10 2 | ||
|
||
Dev-time examples: | ||
./rescript-editor-analysis.exe dump src/MyFile.res src/MyFile2.res | ||
./rescript-editor-analysis.exe test src/MyFile.res | ||
|
||
Note: coordinates are zero-based, so the first position is 0 0. | ||
Note: positions are zero-indexed (start at 0 0), following LSP. | ||
https://microsoft.github.io/language-server-protocol/specification#position | ||
|
||
Options: | ||
complete: compute autocomplete for MyFile.res at line 0 and column 4, | ||
completion: compute autocomplete for MyFile.res at line 0 and column 4, | ||
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. @cristianoc I've changed the name here so that now every command follows their LSP wording counterpart, e.g. |
||
where MyFile.res is being edited and the editor content is in file current.res. | ||
|
||
./rescript-editor-analysis.exe complete src/MyFile.res 0 4 current.res | ||
./rescript-editor-analysis.exe completion src/MyFile.res 0 4 current.res | ||
|
||
definition: get definition for item in MyFile.res at line 10 column 2: | ||
|
||
./rescript-editor-analysis.exe definition src/MyFile.res 10 2 | ||
|
||
dump: for debugging, show all definitions and hovers for MyFile.res and MyFile.res: | ||
|
||
./rescript-editor-analysis.exe dump src/Foo.res src/MyFile.res | ||
|
||
documentSymbol: get all symbols declared in MyFile.res | ||
|
||
./rescript-editor-analysis.exe documentSymbol src/MyFile.res | ||
|
@@ -39,15 +38,19 @@ Options: | |
|
||
./rescript-editor-analysis.exe references src/MyFile.res 10 2 | ||
|
||
dump: for debugging, show all definitions and hovers for MyFile.res and MyFile.res: | ||
|
||
./rescript-editor-analysis.exe dump src/Foo.res src/MyFile.res | ||
|
||
test: run tests specified by special comments in file src/MyFile.res | ||
|
||
./rescript-editor-analysis.exe test src/src/MyFile.res | ||
|} | ||
|
||
let main () = | ||
match Array.to_list Sys.argv with | ||
| [_; "complete"; path; line; col; currentFile] -> | ||
Commands.complete ~path ~line:(int_of_string line) ~col:(int_of_string col) | ||
| [_; "completion"; path; line; col; currentFile] -> | ||
Commands.completion ~path ~line:(int_of_string line) ~col:(int_of_string col) | ||
~currentFile | ||
| [_; "definition"; path; line; col] -> | ||
Commands.definition ~path ~line:(int_of_string line) | ||
|
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Make it less exciting, since our doc block comment syntax isn't settled yet.