47 lines
1.4 KiB
Elixir
47 lines
1.4 KiB
Elixir
|
|
# This file is auto-generated by alef — DO NOT EDIT.
|
||
|
|
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
|
||
|
|
# To regenerate: alef generate
|
||
|
|
# To verify freshness: alef verify --exit-code
|
||
|
|
# Issues & docs: https://github.com/kreuzberg-dev/alef
|
||
|
|
defmodule Kreuzberg.TreeSitterProcessConfig do
|
||
|
|
@moduledoc """
|
||
|
|
Processing options for tree-sitter code analysis.
|
||
|
|
|
||
|
|
Controls which analysis features are enabled when extracting code files.
|
||
|
|
"""
|
||
|
|
|
||
|
|
@typedoc "Processing options for tree-sitter code analysis."
|
||
|
|
@type t :: %__MODULE__{
|
||
|
|
structure: boolean(),
|
||
|
|
imports: boolean(),
|
||
|
|
exports: boolean(),
|
||
|
|
comments: boolean(),
|
||
|
|
docstrings: boolean(),
|
||
|
|
symbols: boolean(),
|
||
|
|
diagnostics: boolean(),
|
||
|
|
chunk_max_size: non_neg_integer() | nil,
|
||
|
|
content_mode: String.t() | nil
|
||
|
|
}
|
||
|
|
|
||
|
|
defstruct structure: true,
|
||
|
|
imports: true,
|
||
|
|
exports: true,
|
||
|
|
comments: false,
|
||
|
|
docstrings: false,
|
||
|
|
symbols: false,
|
||
|
|
diagnostics: false,
|
||
|
|
chunk_max_size: nil,
|
||
|
|
content_mode: :chunks
|
||
|
|
|
||
|
|
defimpl Jason.Encoder do
|
||
|
|
@doc false
|
||
|
|
def encode(value, opts) do
|
||
|
|
value
|
||
|
|
|> Map.from_struct()
|
||
|
|
|> Enum.reject(fn {_k, v} -> v == nil end)
|
||
|
|
|> Enum.into(%{})
|
||
|
|
|> Jason.Encoder.encode(opts)
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|