- Rust Language Server Protocol (LSP) server for OpenEdge ABL.
- Uses
tower-lspfor protocol plumbing andtree-sitter-ablfor parsing.
src/main.rs: process entrypoint, parser initialization, and LSP service bootstrap.src/backend.rs:LanguageServerimplementation and advertised capabilities.src/handlers/*: LSP request/notification entrypoints. Keep only protocol orchestration, backend calls, and response shaping; avoid heavy parsing/analysis logic here.src/analysis/*: Reusable, mostly pure language-analysis logic over text/tree/schema (collectors, resolvers, symbol/type/definition helpers). Shared across handlers.src/utils/*: Low-level generic utilities (position/offset math, path helpers, text-sync helpers, tree-sitter traversal helpers) that are not domain-feature specific.tree-sitter-abl: dev symlink totree-sitter-ablrepository.tree-sitter-df: dev symlink totree-sitter-dfrepository.playground/*: manual testing suite.
- Format code:
cargo fmt
- Lint (if available locally):
cargo clippy --all-targets --all-features -- -D warnings
- Run tests:
cargo test
- Type-check/Linting:
cargo checkcargo clippy --fix
- Build server:
cargo build
- Run the server (stdio transport):
cargo run
If cargo commands fail with crate download errors, the environment has no network access to crates.io; rerun in a network-enabled environment.
tree-sitter-ablandtree-sitter-dfare git dependencies, so parser changes are not picked up here until dependency update/lockfile refresh.- You can access source code of parsers through a symlink that is present in the repository at
./tree-sitter-abland./tree-sitter-dfto look up syntax details. - Use parser repo commands when grammar/syntax behavior is involved:
cd /home/jk/tree-sitter-abl && bun run testcd /home/jk/tree-sitter-abl && bun run parse example.pcd /home/jk/tree-sitter-abl && bun run parse:snippet '<snippet>'cd /home/jk/tree-sitter-abl && bun run reference '<query>'
- If any change is needed in parser / would be help out please tell, we will implement it in parser by other agent.
- Prefer small, focused handler logic and move reusable analysis into
src/analysis/*andsrc/utils/*. - Do not silently degrade diagnostics/completion behavior when adding new features; keep existing flows intact unless change is intentional and documented.
- When the user provides a code sample to reproduce a bug, do not copy that sample 1:1 into tests by default; prefer a minimal synthetic regression case that reproduces the same failure.
Run in this exact order:
cargo testcargo clippy --fix --allow-dirtycargo fmtcargo build -r(manual changes)
Notes:
- Do not skip
clippy --fix --allow-dirtyunless it fails due to an external/tooling issue.
- This repository may not always include extensive tests; when adding behavior-heavy logic, add tests where practical or document manual verification steps.