racket-language-server
所属分类:collect
开发工具:Racket
文件大小:0KB
下载次数:0
上传日期:2020-04-10 14:55:25
上 传 者:
sh-1993
说明: 机架语言服务器,
(Racket Language Server,)
文件列表:
.travis.yml (562, 2020-04-10)
info.rkt (606, 2020-04-10)
lang/ (0, 2020-04-10)
lang/check-syntax.rkt (7187, 2020-04-10)
lang/document.rkt (1894, 2020-04-10)
lang/indent.rkt (2313, 2020-04-10)
lang/lexer.rkt (13586, 2020-04-10)
lang/worker.rkt (1251, 2020-04-10)
lang/workspace.rkt (6794, 2020-04-10)
main.rkt (432, 2020-04-10)
protocol/ (0, 2020-04-10)
protocol/conversion.rkt (1477, 2020-04-10)
protocol/dispatch.rkt (3181, 2020-04-10)
protocol/json-util.rkt (1661, 2020-04-10)
protocol/jsonrpc.rkt (2047, 2020-04-10)
protocol/lsp.rkt (5804, 2020-04-10)
protocol/methods.rkt (6835, 2020-04-10)
protocol/notifications.rkt (2186, 2020-04-10)
scribblings/ (0, 2020-04-10)
scribblings/racket-language-server.scrbl (4321, 2020-04-10)
# Racket Language Server [![Build Status](https://travis-ci.org/theia-ide/racket-language-server.svg?branch=master)](https://travis-ci.org/theia-ide/racket-language-server)
Implementation of the
[Language Server Protocol](https://microsoft.github.io/language-server-protocol/specification)
for [Racket](https://racket-lang.org/).
## Custom extensions
####
Colorize Notification (:arrow_left:)
Colorize notifications are sent from the server to the client to enable semantic
syntax highlighting.
When a file changes it is the server's responsibility to re-compute syntax
highlighting and push them to the client. Newly pushed tokens always replace
previously pushed tokens. There is no merging that happens on the client side.
_Notification_:
* method: 'racket/colorize'
* params: `RacketColorizeParams` defined as follows:
```typescript
interface RacketColorizeParams {
/**
* The URI for which colorization is reported.
*/
uri: DocumentUri;
/**
* An array of diagnostic information items.
*/
tokens: RacketToken[];
}
interface RacketToken {
/**
* The kind of token.
*/
kind: RacketTokenKind;
/**
* The lexer mode used.
*/
mode: RacketLexerMode;
/**
* Range of the token.
*/
range: Range;
}
enum RacketLexerMode {
Racket = "racket",
Scribble = "scribble",
Other = "other"
}
enum RacketTokenKind {
// Generic token kinds
Symbol = "symbol",
Keyword = "keyword",
Comment = "comment",
String = "string",
Constant = "constant",
Parenthesis = "parenthesis",
Error = "error",
NoColor = "no-color",
Other = "other",
// Racket token kinds
HashColonKeyword = "hash-colon-keyword",
SexpComment = "sexp-comment",
// Racket semantic token kinds
Imported = "imported",
LexicallyBound = "lexically-bound",
Free = "free",
Set!d = "set!d",
// Scribble token kinds
Text = "text"
}
```
####
Indent Request (:arrow_left:)
Indent requests are sent from the client to the server to compute the
indentation for a line number.
_Request_:
* method: 'racket/indent'
* params: `RacketIndentParams` defined as follows:
```typescript
interface RacketIndentParams {
/**
* The TextDocument for which indentation is requested.
*/
textDocument: TextDocumentIdentifier;
/**
* The line to indent.
*/
line: number;
}
```
_Response_:
* result: `number`
* error: code and message set in case an exception happens during the definition request.
## References
- [0] https://microsoft.github.io/language-server-protocol/specification
- [1] https://docs.racket-lang.org/tools/lang-languages-customization.html
- [2] https://github.com/jeapostrophe/racket-langserver
## License
Copyright 2018 David Craven and others
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
近期下载者:
相关文件:
收藏者: