# `Minga.Buffer`
[🔗](https://github.com/jsmestad/minga/blob/main/sdk/lib/minga/buffer.ex#L1)

Public API for buffer operations.

Extensions use this module to read buffer content, query cursor
position, check file paths, and manage decorations.

This is a compile-time stub. At runtime, the real module in Minga's
BEAM VM provides the implementation.

# `position`

```elixir
@type position() :: {line :: non_neg_integer(), col :: non_neg_integer()}
```

# `t`

```elixir
@type t() :: GenServer.server()
```

# `batch_decorations`

```elixir
@spec batch_decorations(t(), (term() -&gt; term())) :: :ok
```

# `conflict_count`

```elixir
@spec conflict_count(t()) :: non_neg_integer()
```

# `conflict_snapshot`

```elixir
@spec conflict_snapshot(t()) :: {String.t(), position(), [term()]}
```

# `conflicts`

```elixir
@spec conflicts(t()) :: [term()]
```

# `content`

```elixir
@spec content(t()) :: String.t()
```

# `cursor`

```elixir
@spec cursor(t()) :: position()
```

# `decorations`

```elixir
@spec decorations(t()) :: term()
```

# `dirty?`

```elixir
@spec dirty?(t()) :: boolean()
```

# `file_path`

```elixir
@spec file_path(t()) :: String.t() | nil
```

# `filetype`

```elixir
@spec filetype(t()) :: atom()
```

# `get_option`

```elixir
@spec get_option(t(), atom()) :: term()
```

# `line_count`

```elixir
@spec line_count(t()) :: pos_integer()
```

# `lines`

```elixir
@spec lines(t(), non_neg_integer(), non_neg_integer()) :: [String.t()]
```

# `move_to`

```elixir
@spec move_to(t(), position()) :: :ok
```

# `read_only?`

```elixir
@spec read_only?(t()) :: boolean()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
