postgres-language-server
stdiosql
Used by 1 plugin
Requires Language Server Binary
This LSP server requires pwsh to be installed on your system. Make sure it's available in your PATH before enabling.
Install
1
Run in your terminal$
npx claudepluginhub bedolla/enrilspAdd to Your Project
Add to your .lsp.json or plugin.json:
{
"lspServers": {
"postgres-language-server": {
"command": "pwsh",
"extensionToLanguage": {
".sql": "sql",
".pgsql": "sql"
},
"args": [
"-NoLogo",
"-NoProfile",
"-NonInteractive",
"-ExecutionPolicy",
"Bypass",
"-Command",
"$ErrorActionPreference='Stop';$ProgressPreference='SilentlyContinue';$proxy=$null;$proxyCandidate=$null;if($env:CLAUDE_PLUGIN_ROOT){$proxyCandidate=[IO.Path]::Combine($env:CLAUDE_PLUGIN_ROOT,'hooks','enrilsp-lsp-proxy.ps1');if(Test-Path $proxyCandidate){$proxy=$proxyCandidate}};if(-not $proxy){$proxyCandidate=[IO.Path]::Combine($env:LOCALAPPDATA,'EnriLSP','bin','enrilsp-lsp-proxy.ps1');if(Test-Path $proxyCandidate){$proxy=$proxyCandidate}};if(-not $proxy){$proxyCandidate=[IO.Path]::Combine((Get-Location).Path,'hooks','enrilsp-lsp-proxy.ps1');if(Test-Path $proxyCandidate){$proxy=$proxyCandidate}};$env:PGLS_LOG_PATH=[IO.Path]::Combine($env:LOCALAPPDATA,'EnriLSP','pgls-logs');New-Item -ItemType Directory -Force -Path $env:PGLS_LOG_PATH | Out-Null;$server=[IO.Path]::Combine($env:LOCALAPPDATA,'postgres-language-server','postgres-language-server.exe');for($i=0;$i -lt 480 -and -not (Test-Path $server);$i++){Start-Sleep -Milliseconds 250};if(-not (Test-Path $server)){exit 127};if(Test-Path $proxy){& $proxy $server 'lsp-proxy'}else{& $server 'lsp-proxy'}"
]
}
}
}Supported Languages
sql
.sql.pgsql
Command
pwshTransport
stdioArguments
-NoLogo-NoProfile-NonInteractive-ExecutionPolicyBypass-Command$ErrorActionPreference='Stop';$ProgressPreference='SilentlyContinue';$proxy=$null;$proxyCandidate=$null;if($env:CLAUDE_PLUGIN_ROOT){$proxyCandidate=[IO.Path]::Combine($env:CLAUDE_PLUGIN_ROOT,'hooks','enrilsp-lsp-proxy.ps1');if(Test-Path $proxyCandidate){$proxy=$proxyCandidate}};if(-not $proxy){$proxyCandidate=[IO.Path]::Combine($env:LOCALAPPDATA,'EnriLSP','bin','enrilsp-lsp-proxy.ps1');if(Test-Path $proxyCandidate){$proxy=$proxyCandidate}};if(-not $proxy){$proxyCandidate=[IO.Path]::Combine((Get-Location).Path,'hooks','enrilsp-lsp-proxy.ps1');if(Test-Path $proxyCandidate){$proxy=$proxyCandidate}};$env:PGLS_LOG_PATH=[IO.Path]::Combine($env:LOCALAPPDATA,'EnriLSP','pgls-logs');New-Item -ItemType Directory -Force -Path $env:PGLS_LOG_PATH | Out-Null;$server=[IO.Path]::Combine($env:LOCALAPPDATA,'postgres-language-server','postgres-language-server.exe');for($i=0;$i -lt 480 -and -not (Test-Path $server);$i++){Start-Sleep -Milliseconds 250};if(-not (Test-Path $server)){exit 127};if(Test-Path $proxy){& $proxy $server 'lsp-proxy'}else{& $server 'lsp-proxy'}
Advanced Configuration
Restart on Crash:Yes