Deutsche Version: README_DE.md
A complete Perl Language Server Protocol (LSP) daemon written in pure Perl.
| Feature | Method | Status |
|---|---|---|
| Autocompletion | textDocument/completion |
✅ |
| Hover Information | textDocument/hover |
✅ |
| Go to Definition | textDocument/definition |
✅ |
| Find References | textDocument/references |
✅ |
| Document Symbols | textDocument/documentSymbol |
✅ |
| Code Formatting | textDocument/formatting |
✅ |
| Range Formatting | textDocument/rangeFormatting |
✅ |
| Signature Help | textDocument/signatureHelp |
✅ |
| Rename | textDocument/rename |
✅ |
| Code Actions | textDocument/codeAction |
✅ |
| Folding Ranges | textDocument/foldingRange |
✅ |
| Document Highlight | textDocument/documentHighlight |
✅ |
| Code Lens | textDocument/codeLens |
✅ |
| Selection Range | textDocument/selectionRange |
✅ |
| Workspace Symbols | workspace/symbol |
✅ |
| Configuration | workspace/didChangeConfiguration |
✅ |
| File Watching | workspace/didChangeWatchedFiles |
✅ |
| Document Sync | textDocument/didOpen/didChange/didClose |
✅ |
| Diagnostics | textDocument/publishDiagnostics |
✅ |
| Call Hierarchy | textDocument/prepareCallHierarchy, callHierarchy/* |
✅ |
| Type Hierarchy | textDocument/prepareTypeHierarchy, typeHierarchy/* |
✅ |
| Semantic Tokens | textDocument/semanticTokens/full, textDocument/semanticTokens/range |
✅ |
| Feature | YAPLSPD | Perl::LS | PLS | Navigator |
|---|---|---|---|---|
| completion | ✅ | ✅ | ✅ | ✅ |
| hover | ✅ | ✅ | ✅ | ✅ |
| definition | ✅ | ✅ | ✅ | ✅ |
| references | ✅ | ✅ | ✅ | ✅ |
| documentSymbol | ✅ | ✅ | ✅ | ✅ |
| formatting | ✅ | ✅ | ✅ | ✅ |
| rangeFormatting | ✅ | ✅ | ✅ | ✅ |
| signatureHelp | ✅ | ✅ | ❌ | ✅ |
| rename | ✅ | ✅ | ✅ | |
| codeAction | ✅ | ❌ | ❌ | |
| foldingRange | ✅ | ✅ | ❌ | ✅ |
| documentHighlight | ✅ | ✅ | ❌ | ✅ |
| codeLens | ✅ | ❌ | ❌ | ❌ |
| selectionRange | ✅ | ❌ | ❌ | ✅ |
| workspace/symbol | ✅ | ✅ | ✅ | ✅ |
| workspace/configuration | ✅ | ✅ | ✅ | ✅ |
| callHierarchy | ✅ | ❌ | ❌ | |
| typeHierarchy | ✅ | ❌ | ❌ | |
| semanticTokens | ✅ | ❌ | ❌ | ✅ |
| Pure Perl | ✅ | ✅ | ❌ (Node.js) |
- Perl 5.20 or higher
cpanm(App::cpanminus)
# Automatic installation of all dependencies
cpanm --installdeps .Manual installation of core dependencies:
JSON::PP(core module)PPI- Perl parsingPerl::Tidy- Code formatting
git clone https://github.com/ghbalf/yaplspd.git
cd yaplspd
cpanm --installdeps .With nvim-lspconfig:
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
if not configs.yaplspd then
configs.yaplspd = {
default_config = {
cmd = {'/path/to/yaplspd/bin/yaplspd'},
filetypes = {'perl'},
root_dir = function(fname)
return lspconfig.util.find_git_ancestor(fname)
end,
},
}
end
lspconfig.yaplspd.setup{}With vim-lsp:
if executable('yaplspd')
au User lsp_setup call lsp#register_server({
\ 'name': 'yaplspd',
\ 'cmd': {server_info->['/path/to/yaplspd/bin/yaplspd']},
\ 'whitelist': ['perl'],
\ })
endifCreate .vscode/settings.json in your project root:
{
"perl.perlCmd": "perl",
"perl.perlInc": ["lib", "local/lib/perl5"],
"perl.trace.server": "verbose",
"perl.debugAdapter": "null"
}For direct YAPLSPD integration, install the extension and configure:
{
"perl.languageServer": "/path/to/yaplspd/bin/yaplspd",
"perl.languageServerEnabled": true
}With lsp-mode:
(require 'lsp-mode)
(add-to-list 'lsp-language-id-configuration '(perl-mode . "perl"))
(add-to-list 'lsp-language-id-configuration '(cperl-mode . "perl"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("/path/to/yaplspd/bin/yaplspd"))
:major-modes '(perl-mode cperl-mode)
:server-id 'yaplspd))# Direct
./bin/yaplspd
# With logging
PERL_YAPLSPD_LOG=1 ./bin/yaplspd 2>/tmp/yaplspd.log# All tests
prove -lr t
# With verbose output
prove -lvr t
# Single test file
prove -l t/completion.t# Format project
perltidy lib/**/*.pmlib/YAPLSPD/
├── Server.pm # Main server (LSP protocol)
├── Protocol.pm # LSP protocol handler
├── Document.pm # Document management (PPI)
├── Completion.pm # Autocompletion
├── Hover.pm # Hover information
├── Definition.pm # Go-to-definition
├── References.pm # Find-all-references
├── DocumentSymbol.pm # Document symbols (outline)
├── Formatting.pm # Code formatting (Perl::Tidy)
├── Diagnostics.pm # Syntax diagnostics
├── SignatureHelp.pm # Function signatures
├── Rename.pm # Symbol renaming
├── CodeAction.pm # Quick-fixes & refactorings
├── FoldingRange.pm # Code folding
├── DocumentHighlight.pm # Symbol highlighting
├── CodeLens.pm # Code lenses (references, tests)
├── SelectionRange.pm # Smart selection
├── WorkspaceSymbol.pm # Workspace-wide symbol search
├── CallHierarchy.pm # Incoming/outgoing call analysis
├── TypeHierarchy.pm # Super-/subtype analysis
├── SemanticTokens.pm # Semantic highlighting tokens
├── ParallelParsing.pm # Workspace parsing for larger projects
└── MemoryManager.pm # LRU-based document memory management
- Core LSP protocol
- 22 LSP features implemented
- E2E integration tests
- Call hierarchy
- Type hierarchy
- Semantic tokens
- Parallel parsing for larger workspaces
- Memory management for long-running sessions
- README + README_DE + MIT license
- GitHub release
v0.7.0 - 293 tests passing
- Pure Perl implementation (no XS requirement for core functionality)
- Optional PPI-backed parsing with regex fallback paths for resilience
- Some test runs emit warnings in older modules, but the full suite currently passes
cpanm PPICheck the logs:
PERL_YAPLSPD_LOG=1 ./bin/yaplspd 2>&1 | tee /tmp/yaplspd.logMake sure the lib/ directory is in @INC:
# In .vscode/settings.json or your editor config
"perl.perlInc": ["lib", "local/lib/perl5"]MIT License — See LICENSE
Pull requests welcome! Please:
- Write tests for new features
- Run
perltidybefore committing - Ensure existing tests pass:
prove -lr t
This software was written by an AI. If that bothers you, feel free to close this tab and move on with your day. The code works either way.
- Siegfried Mickautsch (AI) — Author
- Alfred Mickautsch — Created by
- OpenClaw — Powered by
YAPLSPD — Because Perl deserves a modern LSP.