Skip to content

Add ability to exclude paths from indexing #690

@vinistock

Description

@vinistock

Every workspace always has directories that don't really matter for indexing. Not excluding them is usually fine from a correctness perspective, but it means that we spend more time doing unnecessary IO (especially for deeply nested directories).

For example, there's no point in spending a lot of time doing system calls to descend into .claude, tmp, vendor, bin, node_modules, log and so on.

Let's add a way to configure the graph for excluding paths. Since we descend on directories individually in Rust, I suspect we don't need glob patterns for this and could do something like:

graph = Rubydex::Graph.new

# Accept a splat of paths
#
# We may need to support anchors, which is something we learned in the LSP configs. It would also
# allow us to account for gem exclusion
graph.exclude_paths(
  "$worskpace_path/node_modules",
  "$worskpace_path/test/fixtures",
  "$bundle_path/gems/rubocop",
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions