Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CoderMind/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ dependencies = [
"tree-sitter-c>=0.24.2",
"tree-sitter-cpp>=0.23.4",
"tree-sitter-rust>=0.24.2",
# Kotlin: the fwcd grammar is required because lang_parser/queries/kotlin
# is written against its node types (import_header, companion_object).
# Pinned until fwcd publishes PyPI wheels.
"tree-sitter-kotlin @ git+https://github.com/fwcd/tree-sitter-kotlin.git@1852ea17b7f60fb3f9d84e0b1555d56b46b39fb1",
"networkx",
"rank_bm25",
"rapidfuzz",
Expand Down
2 changes: 2 additions & 0 deletions CoderMind/scripts/lang_parser/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from .cpp import CPP_CONFIG
from .go import GO_CONFIG
from .javascript import JAVASCRIPT_CONFIG
from .kotlin import KOTLIN_CONFIG
from .python import PYTHON_CONFIG
from .rust import RUST_CONFIG
from .typescript import TYPESCRIPT_CONFIG
Expand All @@ -11,6 +12,7 @@
"CPP_CONFIG",
"GO_CONFIG",
"JAVASCRIPT_CONFIG",
"KOTLIN_CONFIG",
"PYTHON_CONFIG",
"RUST_CONFIG",
"TYPESCRIPT_CONFIG",
Expand Down
26 changes: 26 additions & 0 deletions CoderMind/scripts/lang_parser/config/kotlin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from __future__ import annotations

from ..models import LanguageConfig


KOTLIN_CONFIG = LanguageConfig(
name="kotlin",
display_name="Kotlin",
extensions=(".kt", ".kts"),
markdown_fence="kotlin",
source_globs=("*.kt", "**/*.kt", "*.kts", "**/*.kts"),
test_globs=(
"**/src/test/**/*.kt",
"**/*Test.kt",
"**/*Tests.kt",
"**/test/**/*.kt",
),
tree_sitter_language="kotlin",
class_node_types=("class_declaration", "object_declaration"),
function_node_types=("function_declaration",),
method_node_types=("function_declaration",),
import_node_types=("import", "import_header"),
module_path_style="go",
dependency_files=("build.gradle.kts", "build.gradle", "settings.gradle.kts", "pom.xml"),
entrypoint_candidates=("src/main/kotlin/Main.kt",),
)
Loading