MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / lspPositionToOffset

Function lspPositionToOffset

src/cm/lsp/rename.ts:149–155  ·  view source on GitHub ↗
(
	doc: { line: (n: number) => { from: number } },
	pos: lsp.Position,
)

Source from the content-addressed store, hash-verified

147}
148
149function lspPositionToOffset(
150 doc: { line: (n: number) => { from: number } },
151 pos: lsp.Position,
152): number {
153 const line = doc.line(pos.line + 1);
154 return line.from + pos.character;
155}
156
157async function applyChangesToFile(
158 workspace: AcodeWorkspace,

Callers 1

applyChangesToFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected