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

Function resolveIndentWidth

src/cm/lsp/clientManager.ts:1278–1286  ·  view source on GitHub ↗
(unit: string)

Source from the content-addressed store, hash-verified

1276}
1277
1278function resolveIndentWidth(unit: string): number {
1279 if (typeof unit !== "string" || !unit.length) return 4;
1280 let width = 0;
1281 for (const ch of unit) {
1282 if (ch === "\t") return 4;
1283 width += 1;
1284 }
1285 return width || 4;
1286}
1287
1288const defaultManager = new LspClientManager();
1289

Callers 1

buildFormattingOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected