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:

Index

Functions

func UTF16len

func UTF16len(buf []byte) int

Types

type Mapper

type Mapper struct {
	// contains filtered or unexported fields
}

func NewMapper

func NewMapper(src []byte) *Mapper

func (*Mapper) Position

func (m *Mapper) Position(offset int) (line, char int)

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.