package lsppos
import "golang.org/x/tools/internal/lsp/lsppos"
Package lsppos provides utilities for working with LSP positions.
See https://microsoft.github.io/language-server-protocol/specification#textDocuments for a description of LSP positions. Notably:
- Positions are specified by a 0-based line count and 0-based utf-16 character offset.
- Positions are line-ending agnostic: there is no way to specify \r|\n or \n|. Instead the former maps to the end of the current line, and the latter to the start of the next line.
Index ¶
Functions ¶
func UTF16len ¶
Types ¶
type Mapper ¶
type Mapper struct {
// contains filtered or unexported fields
}
func NewMapper ¶
func (*Mapper) Position ¶
Source Files ¶
lsppos.go
- Version
- v0.1.10
- Published
- Mar 15, 2022
- Platform
- js/wasm
- Imports
- 2 packages
- Last checked
- 6 hours ago –
Tools for package owners.