MCPcopy Create free account

hub / github.com/Hessesian/kmp-lsp / functions

Functions3,021 in github.com/Hessesian/kmp-lsp

↓ 11 callersFunctionfile_contributions
Pure: compute what a parsed file contributes to each index map. No side effects. Call [`Indexer::apply_contributions`] to commit.
src/indexer/apply.rs:239
↓ 11 callersMethodfind_definition_qualified
( &self, name: &str, qualifier: Option<&str>, from_uri: &Url, )
src/indexer/lookup.rs:35
↓ 11 callersFunctionhints_for
(src: &str)
src/inlay_hints_tests.rs:15
↓ 11 callersFunctioninfer_receiver_type
Infer the type of a receiver expression and normalise it into a [`ReceiverType`]. Returns `None` when type inference fails (no annotation, unindexed
src/resolver/infer.rs:155
↓ 11 callersFunctionlines
(src: &str)
src/backend/helpers_tests.rs:5
↓ 11 callersFunctionmake_sym
(name: &str, kind: SymbolKind, start_line: u32, end_line: u32)
src/indexer/resolution_tests.rs:58
↓ 11 callersFunctionrename_in_scope
Return TextEdits replacing all whole-word occurrences of `word` with `new_name` within `lines[scope.0..=scope.1]`, in reverse order (safe for sequenti
src/features/rename.rs:169
↓ 11 callersMethodrequest
Store a new scan request, replacing any previous pending one. The superseded request's `completion_tx` is dropped silently. Callers that need to dist
src/workspace/scan_queue.rs:72
↓ 11 callersMethodrg_scope_for_path
( &self, open_file: Option<&std::path::Path>, )
src/features/traits_impl.rs:121
↓ 11 callersMethodrun
Run the event loop until the sender side is dropped. The exhaustive `match` is the architectural guarantee: every new [`Event`] variant must be handl
src/workspace/actor.rs:89
↓ 11 callersFunctionsmart_cast_type_at_line
Detect smart cast narrowing at a given line position. Handles two patterns: 1. `when (var) { is Type -> ... }` — cursor inside the `is Type` branch 2
src/resolver/infer_lines.rs:600
↓ 11 callersFunctionworkspace_cache_path
Returns the cache file path for the given workspace root. Uses a SHA-256 hash of the canonicalized root path as the directory name so equivalent root
src/indexer/cache.rs:88
↓ 10 callersMethodchildren_of_kind
(self, kind: &str)
src/indexer/node_ext.rs:155
↓ 10 callersFunctionenrich_at_line
Find the symbol at `(line, col)` in `uri_str`, then enrich it. Used by `completion_resolve` which stores line/col in the completion item data rather
src/indexer/resolution.rs:221
↓ 10 callersMethodensure_indexed
Ensure the file at `uri` is indexed before a feature query. This is the adapter-level warm step — capability traits are pure reads.
src/workspace/handle.rs:49
↓ 10 callersFunctionfind_named_lambda_param_type_in_lines
Multi-line version of `find_named_lambda_param_type` for hover/inlay-hint paths. Scans the whole file (not just `before_cursor`) for `{ param_name ->
src/indexer/infer/it_this.rs:215
↓ 10 callersFunctionfmt
(src: &str, cursor_line: u32)
src/features/on_type_formatting.rs:220
↓ 10 callersMethodget_file_data
(&self, uri: &str)
src/indexer/resolution.rs:675
↓ 10 callersFunctioninfer_variable_type_raw
Like [`infer_variable_type`] but preserves generic parameters in the returned type string. e.g. `val items: List<Product>` → `"List<Product>"`. Used
src/resolver/infer.rs:213
↓ 10 callersFunctioninsert_fake_jar_symbol
Insert a fake JAR `SymbolEntry` directly into `idx.jar_files` / `jar_definitions`, simulating what `build_jar_file_data` does for real sidecar output.
src/indexer/infer/it_this_tests.rs:1877
↓ 10 callersFunctionjar_fingerprint
Read the current fingerprint of a JAR file. `None` if unreadable.
src/indexer/sources_jar_cache.rs:82
↓ 10 callersMethodlambda_params_at_col
Like `lambda_params_at` but also respects `cursor_col` when scanning the cursor line. Passing `usize::MAX` is equivalent to `lambda_params_at`. The
src/indexer/scope.rs:303
↓ 10 callersFunctionparse_java
(src: &str)
src/semantic_tokens_tests.rs:15
↓ 10 callersMethodwith_method_return_for_type
Register `(class_name, method_name)` → raw return type (with generics).
src/indexer/infer/deps.rs:227
↓ 9 callersMethodadd
Add a symbol for tier 0 (same file) or tier 1 (same pkg). Dedup key is `name`. Respects case-mode, annotation-mode, and score gates.
src/resolver/complete.rs:1100
↓ 9 callersFunctiondummy_args
(root: &str)
src/workspace/scan_queue_tests.rs:8
↓ 9 callersMethodenclosing_call_expression
(self)
src/indexer/node_ext.rs:287
↓ 9 callersFunctionensure_file_data
Return `FileData` for `uri` — from the live index if indexed, otherwise parse from disk. Returns `None` if the file is not indexed and not readable fr
src/resolver/resolve.rs:46
↓ 9 callersMethodfind_definition_qualified
( &self, name: &str, qualifier: Option<&str>, from_uri: &Url, )
src/features/traits_impl.rs:22
↓ 9 callersFunctionfind_method_return_type
( indexer: &Indexer, type_name: &str, method_name: &str, from_uri: Option<&Url>, )
src/resolver/infer.rs:637
↓ 9 callersFunctionfind_named_lambda_param_type
Resolve the element/receiver type for an EXPLICITLY NAMED lambda parameter. Handles both same-line and multi-line lambda declarations: Same-line: `
src/indexer/infer/it_this.rs:273
↓ 9 callersFunctionhome_dir
()
src/util.rs:8
↓ 9 callersFunctionkotlin_supers
(src: &str)
src/resolver/tests.rs:469
↓ 9 callersFunctionlines
(src: &str)
src/lines_ext_tests.rs:3
↓ 9 callersMethodmatches
Returns `true` if `rel_path` (relative to workspace root) should be excluded.
src/rg.rs:153
↓ 9 callersMethodreset_index_state
Clear all index maps. Called before a full workspace re-index and on root switch. Clears workspace-source data (files, definitions, packages, subtype
src/indexer.rs:561
↓ 9 callersFunctionresolve_symbol_info
Core resolution pipeline: locate → load → enrich → substitute → extract. Thin coordinator that delegates to pure functions and trait methods.
src/indexer/resolution.rs:188
↓ 9 callersFunctiontemp_dir
Create a temp dir with a `workspace.json` that opts out of all external sources (`sourcePaths:[]`), preventing actor tests from accidentally indexing
src/workspace/actor_tests.rs:22
↓ 9 callersFunctiontest_uri
(path: &str)
src/indexer/infer/sig_tests.rs:9
↓ 9 callersFunctionwrite_fixture
(dir: &Path, rel_path: &str, content: &str)
tests/cli_check.rs:8
↓ 8 callersFunctionassert_refs_contain
(locs: &[tower_lsp::lsp_types::Location], expected: &[&str])
src/features/references_tests.rs:48
↓ 8 callersFunctionclassify_this_lambda_context
Classify the `this` receiver context from the text before a lambda `{`. Rules: - Case A `receiver.method { this }`: if `method` has an indexed receiv
src/indexer/infer/cst_lambda.rs:112
↓ 8 callersFunctiondetect_build_layout_source_paths
Activates when a build file (`build.gradle.kts`, `build.gradle`, `pom.xml`, …) exists at the workspace root. Probes well-known source directories; ret
src/workspace_json.rs:168
↓ 8 callersMethodenclosing_class_at
Find the name of the innermost enclosing class/interface/object that contains `row` in the given file. Used by `references` to scope a short symbol n
src/indexer/scope.rs:395
↓ 8 callersMethodenclosing_class_at
(&self, uri: &Url, row: u32)
src/features/traits_impl.rs:51
↓ 8 callersFunctionextract_return_type_from_detail
Parse the return type from a `SymbolEntry.detail` signature string. `"fun getDetail(req: Req): Response<Data>"` → `"Response<Data>"` `"fun doSomethin
src/resolver/infer_lines.rs:432
↓ 8 callersFunctionfilter_candidate_files
( candidate_files: Vec<String>, matcher: Option<&IgnoreMatcher>, )
src/rg.rs:757
↓ 8 callersFunctionfind_fun_return_type_by_name
Look up `method_name` in the symbol index for `type_name` and return its return type, extracted from `SymbolEntry.detail`. Look up the return type of
src/resolver/infer.rs:609
↓ 8 callersFunctionfind_fun_signature_full
Full signature lookup including rg + on-demand indexing. Used by hover and lambda type inference where latency is acceptable.
src/indexer/infer/sig.rs:234
↓ 8 callersFunctionhints_for_with_live
Like `hints_for` but indexes `sig_src` into the global index and sets up a live tree + live lines from `code_src`. This mirrors the real editor path
src/inlay_hints_tests.rs:31
↓ 8 callersFunctionindex_jar_entries
( indexer: &crate::indexer::Indexer, entries: Vec<(Url, String)>, )
src/indexer/jar.rs:314
↓ 8 callersFunctionindexed_with_live
(path: &str, src: &str)
src/indexer/scope_tests.rs:567
↓ 8 callersFunctionis_declaration_of
Returns `true` if `content` declares `name` specifically (e.g. `fun create()`), as opposed to a line that merely calls `name` inside a different decla
src/rg.rs:1375
↓ 8 callersFunctionlibrary_manifest_path
(dir: &Path)
src/indexer/cache.rs:360
↓ 8 callersMethodlookup_definitions
Look up all definition locations for `name`, merging workspace and JAR results. Prefer this over `self.definitions.get(name)` anywhere JAR symbols sh
src/indexer.rs:758
↓ 8 callersMethodmem_lines_for
(&self, uri: &str)
src/features/traits_impl.rs:59
↓ 8 callersMethodpush_named
(&mut self, node: &Node, bytes: &[u8], kind: SymbolKind)
src/parser.rs:2327
↓ 8 callersMethodtry_start
Returns the next args to execute if no scan is currently in progress, and marks `in_progress = true`. Returns `None` if busy.
src/workspace/scan_queue.rs:78
↓ 8 callersFunctionts_pos_to_lsp
Convert a tree-sitter `Point` (row, byte-column) to an LSP `Position` (0-based line, UTF-16 code-unit column).
src/inlay_hints.rs:474
↓ 8 callersFunctionuri
(path: &str)
src/resolver/complete_tests.rs:8
↓ 8 callersMethodwith_field
Register `field_name` in `class_name` → raw type (with generics).
src/indexer/infer/deps.rs:197
↓ 8 callersFunctionwrite
(dir: &std::path::Path, name: &str, content: &str)
src/features/implementation_tests.rs:24
↓ 7 callersFunctionbuild_index
Build (or load from cache) a full workspace index. Reports progress to stderr. Source paths are collected from: 1. `workspace.json` (JetBrains IDE f
src/cli/run.rs:160
↓ 7 callersFunctionbuild_rg_pattern
Build the regex pattern used by `rg` for declaration sites. Matches both Kotlin and Java declaration keywords followed by `NAME`. Kotlin: `fun`, `cl
src/rg.rs:217
↓ 7 callersFunctioncache_entry_to_file_result
Pure: convert a disk-cache entry into a [`FileIndexResult`] ready for indexing. Reconstructs `supertypes` from cached lines (not stored separately in
src/indexer/cache.rs:155
↓ 7 callersMethodcall_fn_and_qualifier
(self, bytes: &[u8])
src/indexer/node_ext.rs:391
↓ 7 callersFunctionfile_uri
(dir: &Path, rel: &str)
tests/lsp_smoke.rs:291
↓ 7 callersFunctionfind_field_type_in_class
Look up the raw type of `field_name` declared inside class `class_name`, resolving across files via the definitions index. Used for multi-segment rec
src/resolver/infer.rs:413
↓ 7 callersFunctionfind_it_element_type
Resolve the element type of `it` when inside a lambda. Scans `before_cursor` (text from line start to cursor, ending with `it.`) backward to find the
src/indexer/infer/it_this.rs:87
↓ 7 callersFunctionfind_name_in_uri
Search for `name` in a specific file identified by its URI string. Checks the in-memory symbol index first; falls back to raw line scanning (for cons
src/resolver/find.rs:13
↓ 7 callersFunctionindexJarFile
* Index all public symbols from a JAR or AAR file. * * - JAR: iterate `.class` entries directly * - AAR: find `classes.jar` entry inside the outer
java-sidecar/src/main/kotlin/io/github/hessesian/jarindexer/JarIndexer.kt:16
↓ 7 callersFunctionindexed_with_live
Index `src` and install a live tree so `call_info_at` works during completions. Mirrors `setup_with_live_lines` from `signature_help_tests.rs`.
src/indexer_tests.rs:2620
↓ 7 callersFunctioninfer_expr_type
Infer the Kotlin type of `node` as a human-readable string (e.g. `"Int"`). Returns `None` when the type cannot be determined without compiler type-re
src/indexer/infer/expr_type.rs:46
↓ 7 callersFunctioninfer_variable_type
Scan the current file's lines for a type annotation on `var_name` and return the declared type name if found. Delegates to [`infer_type_in_lines`] an
src/resolver/infer.rs:205
↓ 7 callersFunctionlibrary_chunks_dir
Directory that holds the library cache chunks + manifest. Uses the same hash logic as the old `library_cache_path` so existing caches do not collide:
src/indexer/cache.rs:340
↓ 7 callersFunctionmake_actor
(indexer: Arc<Indexer>)
src/workspace/actor_tests.rs:13
↓ 7 callersFunctionnode_text
(node: Node<'_>, src: &'a [u8])
src/semantic_tokens/helpers.rs:210
↓ 7 callersMethodrequest
Send a JSON-RPC request and return the matching response. Incoming server-originated requests are auto-acknowledged with `null`. Notifications are si
tests/lsp_smoke.rs:133
↓ 7 callersFunctionresolve_call_signature
Resolve the call site's signature using a unified, single-entry-point pipeline. Resolution strategy: - **Qualified** (`qualifier.name(…)`): resolve r
src/indexer/infer/sig.rs:933
↓ 7 callersMethodresolve_sources
Return the deduplicated, ordered list of source paths to index. Discovery priority (first win for deduplication): 1. `explicit_source_paths` from LSP
src/workspace/mod.rs:84
↓ 7 callersFunctionrg_files_with_matches_scoped
( pattern: &str, source_paths: &[String], root: &Path, )
src/rg.rs:1598
↓ 7 callersFunctionsetup_with_live_lines
Set up indexer with `src` indexed and `live_lines` pointing at the same content. No `live_trees` — simulates the did_change path where `set_live_lines
src/features/signature_help_tests.rs:16
↓ 7 callersFunctionsplit_params_at_depth_zero
Split `text` at top-level commas (depth 0), skipping commas inside `()`, `<>`, `[]`, `{}`. The `->` Kotlin function-type arrow is handled: `>` precede
src/indexer/infer/sig.rs:475
↓ 7 callersFunctionstale_keys_for
Pure: compute which keys to remove from each index map when `uri` is re-indexed. Requires the *old* `FileData` to know what the file previously contri
src/indexer/apply.rs:250
↓ 7 callersFunctionsymbol_kind_to_completion
(kind: SymbolKind)
src/resolver/complete.rs:1787
↓ 7 callersFunctionto_forward_slash
Convert a `Path` to a `String` using `/` as the separator regardless of OS. On Unix this is essentially `to_string_lossy().into_owned()`; on Windows
src/path_util.rs:17
↓ 7 callersMethodtype_arg_strings
(self, bytes: &[u8])
src/indexer/node_ext.rs:444
↓ 7 callersFunctionword_byte_offsets
Iterates over the byte offsets in `line` where `word` appears as a whole word (not as a substring of a longer identifier).
src/features/text_utils.rs:55
↓ 6 callersFunctionassert_refs_exclude
(locs: &[tower_lsp::lsp_types::Location], forbidden: &[&str])
src/features/references_tests.rs:60
↓ 6 callersFunctionbuild_introduce_variable
( line_text: &str, all_lines: &[String], uri: &Url, range: Range, )
src/features/code_actions.rs:249
↓ 6 callersFunctionbuild_type_arg_subst
Build a type-parameter substitution map from a concrete instantiation. Looks up the declared type parameters of `class_name` (e.g. `["T"]` for `Resul
src/indexer/infer/type_subst.rs:21
↓ 6 callersFunctioncheck
(args: &[&str])
tests/cli_check.rs:16
↓ 6 callersFunctioncollect_signature
Collect a human-readable function/class signature starting at `start_line`. Rules: - Track `(` / `)` depth. - Once depth is back to 0, the signature
src/indexer/infer/sig.rs:134
↓ 6 callersFunctioncomplete_json
Run `kmp-lsp complete <file> <line> <col> --json --root <root>` and return the parsed JSON array. Returns `None` if the binary exits non-zero or prod
tests/cli_complete.rs:44
↓ 6 callersFunctionconcrete_or_none
Guard: the text-path inference resolved to a bare generic placeholder (T, R, E). Without receiver context, this is not a meaningful type — fall throug
src/indexer/infer/it_this.rs:43
↓ 6 callersFunctiondetect_android_sdk_source_paths
Auto-detect Android SDK source directories. Checks, in order: 1. `sdk.dir` property in `<workspace_root>/local.properties` 2. `$ANDROID_HOME` environ
src/workspace_json.rs:306
↓ 6 callersMethodenclosing_lambda_literal
(self)
src/indexer/node_ext.rs:301
↓ 6 callersFunctionextract_doc_comment
KDoc / Javadoc comment extraction and rendering. All functions here are pure string transformations — no `Indexer` dependency, no I/O, no hidden stat
src/indexer/doc.rs:23
↓ 6 callersFunctionextract_params_from_detail
Extract the parameter text from a CST-derived `detail` string. Given `"fun foo(x: Int, y: String): Boolean"`, returns `"x: Int, y: String"`. Given `"
src/indexer/infer/sig.rs:327
↓ 6 callersMethodfilter_locs
Remove locations whose file path is inside an ignored directory. Paths are relativized against the workspace root this matcher was built for.
src/rg.rs:165
← previousnext →101–200 of 3,021, ranked by callers