Skip to content

Commit 502c085

Browse files
committed
Add Crystal language support
1 parent 06fd929 commit 502c085

56 files changed

Lines changed: 1721 additions & 62 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lsp-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
- name: Setup PHP for phpactor
6767
uses: shivammathur/setup-php@v2
6868
with:
69-
php-version: '8.1'
69+
php-version: '8.2'
7070
tools: composer
7171

7272
- name: Install phpactor (PHP language server)

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ tree-sitter-html = "0.23.2"
4444
tree-sitter-md = "0.3.2"
4545
tree-sitter-yaml = "0.6.1"
4646
tree-sitter-solidity = "=1.2.10"
47+
tree-sitter-crystal = { git = "https://github.com/crystal-lang-tools/tree-sitter-crystal", rev = "f71f4ca62ac0" }
4748
ast-grep-core = "0.36.1"
4849
ast-grep-language = "0.36.1"
4950
clap = { version = "4.3", features = ["derive"] }

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ npx -y @probelabs/probe@latest agent "Refactor the login function" --allow-edit
143143
- **Smart Ranking**: BM25, TF-IDF, and hybrid algorithms with optional BERT reranking
144144
- **Token-Aware**: `--max-tokens` budget, session-based dedup to avoid repeating context
145145
- **Built-in Agent**: Multi-provider (Anthropic, OpenAI, Google, Bedrock) with retry, fallback, and context compaction
146-
- **Multi-Language**: Rust, Python, JavaScript, TypeScript, Go, C/C++, Java, Ruby, PHP, Swift, Solidity, C#, and more
146+
- **Multi-Language**: Rust, Python, JavaScript, TypeScript, Go, C/C++, Java, Ruby, PHP, Swift, Solidity, Crystal, C#, and more
147147

148148
---
149149

@@ -469,6 +469,7 @@ cargo install --path .
469469
| PHP | `.php` |
470470
| Swift | `.swift` |
471471
| Solidity | `.sol` |
472+
| Crystal | `.cr` |
472473
| C# | `.cs` |
473474
| Markdown | `.md` |
474475

docs/reference/adding-languages.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Adding Support for New Languages
22

3-
This guide lists the exact files you must modify to add a new language to Probe.
3+
This guide lists the main files you must audit to add a new language to Probe.
44

55
## Required File Modifications
66

7-
Adding a new language requires modifying exactly **11 files**. Missing any of these will result in incomplete language support.
7+
Adding a new language requires auditing every language map that affects parsing,
8+
search, extraction, query, CLI validation, docs, and LSP/indexing behavior.
9+
The list below covers the core Probe CLI path; LSP daemon support adds
10+
additional maps under `lsp-daemon/src`.
811

912
### Step 1: Core Language Implementation (4 files)
1013
### Step 2: Search & Extract Integration (4 files)

0 commit comments

Comments
 (0)