Socket
Socket
Sign inDemoInstall

vscode-languageserver-types

Package Overview
Dependencies
0
Maintainers
7
Versions
107
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vscode-languageserver-types

Types used by the Language server for node


Version published
Weekly downloads
3.1M
decreased by-0.43%
Maintainers
7
Install size
362 kB
Created
Weekly downloads
 

Package description

What is vscode-languageserver-types?

The vscode-languageserver-types package provides data types used by the Visual Studio Code language server protocol. It helps in the development of language servers that can be integrated with editors supporting the protocol, enabling features like auto-completion, go-to-definition, or syntax highlighting.

What are vscode-languageserver-types's main functionalities?

Position and Range

Defines positions and ranges within a text document. Positions are zero-based and determine a point in a document by line and character offset. Ranges define a portion of text between two positions.

{ Position, Range } = require('vscode-languageserver-types');
let startPosition = Position.create(1, 5);
let endPosition = Position.create(1, 10);
let range = Range.create(startPosition, endPosition);

Text Edits

Allows for the creation of text edits, which are used to represent changes to a text document. These can be used to manipulate text by inserting, replacing, or deleting text in a document.

{ TextEdit } = require('vscode-languageserver-types');
let edit = TextEdit.replace(Range.create(Position.create(0, 0), Position.create(0, 10)), 'new text');

Diagnostics

Supports diagnostics, which are problems found in the code such as syntax errors or warnings. Diagnostics are associated with a range in the document and can have severities like Error, Warning, etc.

{ Diagnostic, Range, DiagnosticSeverity } = require('vscode-languageserver-types');
let diagnostic = Diagnostic.create(Range.create(Position.create(1, 0), Position.create(1, 1)), 'Syntax error', DiagnosticSeverity.Error, undefined, 'my-linter');

Other packages similar to vscode-languageserver-types

Readme

Source

VSCode Language Server Types

NPM Version NPM Downloads Build Status

Npm module containing the types used by the VSCode language client and Node.js language server

Click here for a detailed document on how to implement language servers for VSCode.

History

For the history please see the main repository

License

MIT

FAQs

Last updated on 12 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc