MCPcopy
hub / github.com/Doorman11991/smallcode / initLSP

Function initLSP

bin/smallcode.js:1890–1903  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1888let _lspAttempted = false;
1889
1890async function initLSP() {
1891 if (_lspAttempted) return _lspClient;
1892 _lspAttempted = true;
1893 try {
1894 const { LSPClient } = require('../src/lsp/client');
1895 const client = new LSPClient(process.cwd());
1896 const ok = await client.start();
1897 if (ok) {
1898 _lspClient = client;
1899 if (_fullscreenRef) _fullscreenRef.addTool('lsp', 'ok', `${client.serverInfo.language} language server connected`);
1900 }
1901 } catch {}
1902 return _lspClient;
1903}
1904
1905// runValidation: delegate to the hardened version in model_client.js
1906// which uses execFileSync with arg arrays (no shell injection via filePath).

Callers

nothing calls this directly

Calls 2

startMethod · 0.95
addToolMethod · 0.80

Tested by

no test coverage detected