Skip to content

Supported Languages

Reflex supports 15 languages for full-text search and symbol extraction, with dependency tracking across all of them.

LanguageExtensionsSymbol typesDependency tracking
Rust.rsFunction, Struct, Enum, Trait, Type, Constant, Method, MacroYes
TypeScript.ts, .tsx, .mts, .ctsFunction, Class, Interface, Type, Enum, Constant, Variable, MethodYes
JavaScript.js, .jsx, .mjs, .cjsFunction, Class, Constant, Variable, MethodYes
Python.pyFunction, Class, Variable, DecoratorYes
Go.goFunction, Struct, Interface, Type, Constant, Variable, MethodYes
Java.javaClass, Interface, Enum, Method, Field, AnnotationYes
C.c, .hFunction, Struct, Enum, Type, Macro, VariableYes
C++.cpp, .cc, .cxx, .hpp, .hh, .hxxFunction, Class, Struct, Enum, Namespace, Method, TemplateYes
C#.csClass, Struct, Interface, Enum, Method, Property, FieldYes
PHP.phpFunction, Class, Interface, Trait, Method, ConstantYes
Ruby.rbClass, Module, Method, ConstantYes
Kotlin.kt, .ktsClass, Interface, Function, Object, PropertyYes
Vue.vueComponent, Function, Variable (from <script> blocks)Yes
Svelte.svelteComponent, Function, Variable (from <script> blocks)Yes
Zig.zigFunction, Struct, Enum, Union, ConstantYes

Each language’s import statements are parsed for dependency tracking:

LanguageImport syntax
Rustuse crate::path, mod name, extern crate
TypeScript/JavaScriptimport x from 'y', require('y')
Pythonimport x, from x import y
Goimport "path"
Javaimport com.example.Class
Kotlinimport com.example.Class
C/C++#include <header>, #include "header"
C#using Namespace
PHPuse Namespace\\Class, require 'file', include 'file'
Rubyrequire 'gem', require_relative 'file'
Vue/Svelteimport from <script> blocks
Zig@import("file")

Every detected dependency is classified as one of:

TypeDescriptionExample
InternalFiles within your projectuse crate::auth::handler
ExternalThird-party packagesimport express from 'express'
StdlibStandard library modulesuse std::collections::HashMap

JSX and TSX files are handled by the JavaScript and TypeScript parsers respectively. Component definitions are extracted as symbols.

Single-file components (.vue, .svelte) are parsed for:

  • Component-level symbols
  • Functions and variables declared in <script> blocks
  • Import statements from <script> blocks for dependency tracking

Reflex uses Tree-sitter grammars for parsing. Each language has a dedicated parser in the source. See Contributing for how to add support for new languages.