An item to transfer a text document from the client to the server.
interface TextDocumentItem {
/**
* The text document's URI.
*/
uri: DocumentUri;
/**
* The text document's language identifier.
*/
languageId: string;
/**
* The version number of this document (it will increase after each
* change, including undo/redo).
*/
version: integer;
/**
* The content of the opened text document.
*/
text: string;
}
Text documents have a language identifier to identify a document on the server side when it handles more than one language to avoid re-interpreting the file extension. If a document refers to one of the programming languages listed below it is recommended that clients use those ids.
Language | Identifier |
---|---|
ABAP | abap |
Windows Bat | bat |
BibTeX | bibtex |
Clojure | clojure |
Coffeescript | coffeescript |
C | c |
C++ | cpp |
C# | csharp |
CSS | css |
Diff | diff |
Dart | dart |
Dockerfile | dockerfile |
Elixir | elixir |
Erlang | erlang |
F# | fsharp |
Git | git-commit and git-rebase |
Go | go |
Groovy | groovy |
Handlebars | handlebars |
HTML | html |
Ini | ini |
Java | java |
JavaScript | javascript |
JavaScript React | javascriptreact |
JSON | json |
LaTeX | latex |
Less | less |
Lua | lua |
Makefile | makefile |
Markdown | markdown |
Objective-C | objective-c |
Objective-C++ | objective-cpp |
Perl | perl |
Perl 6 | perl6 |
PHP | php |
Powershell | powershell |
Pug | jade |
Python | python |
R | r |
Razor (cshtml) | razor |
Ruby | ruby |
Rust | rust |
SCSS | scss (syntax using curly brackets), sass (indented syntax) |
Scala | scala |
ShaderLab | shaderlab |
Shell Script (Bash) | shellscript |
SQL | sql |
Swift | swift |
TypeScript | typescript |
TypeScript React | typescriptreact |
TeX | tex |
Text (plain) | plaintext |
Visual Basic | vb |
XML | xml |
XSL | xsl |
YAML | yaml |
{: .table .table-bordered .table-responsive} |