# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.7.0](https://github.com/iwe-org/iwe/compare/iwes-v0.6.1...iwes-v0.7.0) - 2026-07-03

Workspace version bump — no user-visible changes in this crate.

## [0.6.1](https://github.com/iwe-org/iwe/compare/iwes-v0.6.0...iwes-v0.6.1) - 2026-07-03

### Fixed

- Renaming a wiki link (`[[target]]` or `[[target|label]]`) now selects the target for editing instead of an empty spot at the closing brackets.
- Positions in a document that starts with an empty frontmatter (`---` / `---`) are no longer shifted up by two lines, so goto-definition, hover, rename, and code actions land on the right line.
- A failed rename (for example when the target file name is already taken) is now returned as a proper LSP error response instead of an empty success, so the editor surfaces the message to the user instead of silently doing nothing.
- Link completion no longer leaves a stray `[` behind when the cursor sits after trailing spaces; the completion is inserted at the cursor instead of overwriting part of an earlier word.
- Find references invoked on a link now reports references to the linked document (rather than the current document) when the request asks to include the declaration.
- An unknown LSP request now returns a `MethodNotFound` error instead of panicking the request handler and leaving the client waiting for a response that never arrives.
- Formatting a document that is not part of the library (a file outside the library path, or a brand-new unsaved file) no longer crashes the server; it returns no edits.
- A transform action environment value that contains non-ASCII characters no longer crashes code action resolution.
- A long editing session on a document that contains a table no longer grows the server's memory without bound; the table's lines are released each time the document is re-parsed.

### Removed

- The advertised `workspace/executeCommand` capability, which offered an unimplemented `generate` command that had no handler.

## [0.6.0](https://github.com/iwe-org/iwe/compare/iwes-v0.5.0...iwes-v0.6.0) - 2026-06-27

### Added
- `preserve_newlines` config option keeps each line of a paragraph on its own line when formatting instead of joining them with spaces, so documents written with one sentence per line (semantic line breaks) survive format-on-save (default off).

### Fixed
- Formatting a djot document no longer collapses nested or multi-paragraph list items into the parent item; the blank line separating them is kept so the list structure survives format-on-save.
- The server no longer crashes when parsing a djot document that contains a reference link definition or a definition list.
- Formatting keeps the word boundary at a hard line break instead of running the surrounding words together.
- Formatting preserves djot task list checkboxes (`- [ ]` / `- [x]`), display math (`$$`), and autolinks (`<url>`) instead of mangling them.

## [0.5.0](https://github.com/iwe-org/iwe/compare/iwes-v0.4.0...iwes-v0.5.0) - 2026-06-23

### Added
- `format = "djot"` in the configuration makes the server read, format, and write [djot](https://djot.net/) documents and map file URIs using the `.dj` extension (default remains `markdown` with `.md`).

### Fixed
- The server no longer leaks memory as documents are edited and saved; each update used to retain the previous version's graph data, growing memory without bound over a long session.

## [0.4.0](https://github.com/iwe-org/iwe/compare/iwes-v0.3.2...iwes-v0.4.0) - 2026-06-22

### Fixed

- Documents with Windows line endings are no longer stripped of their frontmatter when edited or saved, and code action ranges no longer drift one column per line on such documents.
- Renaming a link target in a document inside a subfolder no longer deletes the target file and replaces it with an empty one; the new file is written to the correct folder with the original content, and backlinks are updated to a valid path.
- Formatting and code actions no longer turn escaped literal text into live Markdown; an escaped `\*text\*`, `\#`, or `\[label\](url)` keeps its escapes, and a list item written as `\[ \]` is no longer rewritten into a task checkbox.

## [0.3.2](https://github.com/iwe-org/iwe/compare/iwes-v0.3.1...iwes-v0.3.2) - 2026-06-05

### Fixed
- Editing a large document no longer pins the server at 100% CPU; each `textDocument/didChange` reparses the document, and the parser's offset-to-position mapping is no longer quadratic.

## [0.3.1](https://github.com/iwe-org/iwe/compare/iwes-v0.3.0...iwes-v0.3.1) - 2026-06-03

### Fixed
- File URLs are now emitted with a lowercased Windows drive letter (`C:` becomes `c:`) so URIs returned by the server match the casing editors use; drive-letter normalization previously had no effect on Windows.

## [0.3.0](https://github.com/iwe-org/iwe/compare/iwes-v0.2.0...iwes-v0.3.0) - 2026-06-02

### Added
- `markdown.wiki_link_path` config option (`preserve` | `full` | `short`, default `preserve`) controls how completion, the create-link code action, and normalize-on-format write the path inside a wiki link: `preserve` keeps each link as typed, `full` emits the full key path (`[[folder/target]]`), and `short` emits the shortest unambiguous suffix. Completion and create-link, which have no original link to preserve, emit the full key path under `preserve`.

### Changed

- Normalize-on-format now recognizes task-list markers in list items (`- [ ]`, `- [x]`) and normalizes `[X]` to lowercase `[x]`

### Fixed
- Wiki link shortening no longer rewrites a link whose target is missing from the workspace onto an unrelated document that happens to share the file name; such links keep their full path.
## [0.2.0](https://github.com/iwe-org/iwe/compare/iwes-v0.1.10...iwes-v0.2.0) - 2026-06-02

### Added
- `markdown.formatting.ordered_list_content_indent` and `markdown.formatting.bullet_list_content_indent` config options control the minimum indentation of list item content in normalize-on-format output (accepts `2`–`4`); set either to `4` for MkDocs-style alignment (`1.  item` / `-   item` with 4-space continuation)

### Fixed
- Hover, go-to-definition, and find-references for wiki links (`[[name]]`) now resolve the target by basename anywhere in the workspace rather than relative to the current file's folder, so a wiki link in a nested folder finds its target in another folder.

### Changed
- Completion and the create-link code action now insert wiki links in their shortest unambiguous form (e.g. `[[target]]` instead of `[[folder/target]]`), and normalize-on-format rewrites existing wiki links to that form.

## [0.1.10](https://github.com/iwe-org/iwe/compare/iwes-v0.1.9...iwes-v0.1.10) - 2026-05-30

### Fixed

- `textDocument/definition`, `textDocument/hover`, and `textDocument/rename` now recognize links inside table cells; navigating from a `[[wiki]]` or `[text](link)` reference in a table previously returned an empty result.
- `textDocument/foldingRange` includes the final line of a multi-line block (such as a table) at the end of a document without a trailing newline, and a two-line blockquote is now foldable.
- `textDocument/hover`, `textDocument/definition`, and `textDocument/rename` now locate links correctly when the line contains emoji or other astral-plane characters; link positions are interpreted as UTF-16 code units per the LSP default (previously a link after an emoji could not be hit because positions were counted as Unicode scalars).

## [0.1.9](https://github.com/iwe-org/iwe/compare/iwes-v0.1.8...iwes-v0.1.9) - 2026-05-27

### Fixed

- `textDocument/definition` and `textDocument/hover` now resolve links correctly in documents containing multi-byte characters (previously returned empty results due to byte-vs-character offset mismatch)

## [0.1.8](https://github.com/iwe-org/iwe/compare/iwes-v0.1.7...iwes-v0.1.8) - 2026-05-23

### Added

- `textDocument/formatting` honors three new `[markdown.formatting]` options: `wrap_column` wraps paragraphs at the configured column, `preserve_line_breaks` keeps hard line breaks instead of dropping them, and `line_break_style` (`"backslash"` | `"spaces"`, default `"backslash"`) selects how preserved breaks are emitted.

## [0.1.7](https://github.com/iwe-org/iwe/compare/iwes-v0.1.6...iwes-v0.1.7) - 2026-05-20

### Added

- `completion.trigger_characters` config option — list of characters advertised to the editor as completion triggers. Defaults to `["["]`.

### Changed

- `textDocument/completion` returns link completions as a `text_edit` whose range covers any leading `[` or `[[` the user typed, so the editor replaces those brackets instead of duplicating them. `[` produces a markdown link, `[[` produces a wiki link regardless of `completion.link_format`; when no bracket precedes the cursor, `completion.link_format` still selects the shape. The range also swallows a trailing `]` (or `]]`) directly after the cursor, so editors with bracket auto-pairing don't leave a stray closing bracket behind.
- `completion.min_prefix_length` default lowered from `3` to `0`, so completions appear as soon as the editor requests them (matching the new `[` trigger). Users who relied on the old behavior should set `min_prefix_length = 3` explicitly.

### Removed

- The hardcoded `+` completion trigger character. Editors that want it can opt in by setting `completion.trigger_characters = ["+"]` (or include it alongside other triggers).

## [0.1.6](https://github.com/iwe-org/iwe/compare/iwes-v0.1.5...iwes-v0.1.6) - 2026-05-17

### Fixed

- `custom.link` code action and `textDocument/completion` no longer panic on lines containing multi-byte UTF-8 characters; LSP `Position.character` values are interpreted as UTF-16 code units per the LSP spec and converted to byte offsets before slicing the line

## [0.1.5](https://github.com/iwe-org/iwe/compare/iwes-v0.1.4...iwes-v0.1.5) - 2026-05-16

### Fixed

- LSP-driven document writes preserve links to non-markdown files (e.g. `.pdf`, `.html`) instead of appending the configured `refs_extension`

## [0.1.4](https://github.com/iwe-org/iwe/compare/iwes-v0.1.3...iwes-v0.1.4) - 2026-05-15

Workspace version bump — no user-visible changes in this crate.

## [0.1.3](https://github.com/iwe-org/iwe/compare/iwes-v0.1.2...iwes-v0.1.3) - 2026-05-05

### Fixed

- `textDocument/rename` no longer panics when invoked on a link whose target key is missing from the graph (broken link); the request now returns no edit.

## [0.1.2](https://github.com/iwe-org/iwe/compare/iwes-v0.1.1...iwes-v0.1.2) - 2026-05-04

### Changed

- Filter expressions in routed query operations accept the natural form `{type: tracker, $or: [...]}` — bare field keys may be mixed with `$and`/`$or`/`$nor`/`$key`/graph operators at document-matching positions, combining via implicit AND (previously rejected).

### Removed

- Top-level `$not` in routed query filters. `$not` is now field-level only (matching MongoDB); use `$nor: [filter]` for document-level negation. Top-level `$not` returns a parse-time error pointing to `$nor`.

## [0.1.1](https://github.com/iwe-org/iwe/compare/iwes-v0.1.0...iwes-v0.1.1) - 2026-05-03

Workspace version bump — no user-visible changes in this crate.

## [0.1.0](https://github.com/iwe-org/iwe/compare/iwes-v0.0.70...iwes-v0.1.0) - 2026-05-01

### Added

- Query routing on the LSP server — clients can run filter, find, count, update, and delete operations over the workspace using the new query language

## [0.0.70](https://github.com/iwe-org/iwe/compare/iwes-v0.0.69...iwes-v0.0.70) - 2026-04-25

### Added

- Add time format in addition to date format ([#268](https://github.com/iwe-org/iwe/pull/268))

### Other

- Update readme

## [0.0.69](https://github.com/iwe-org/iwe/compare/iwes-v0.0.68...iwes-v0.0.69) - 2026-04-23

### Added

- Custom Markdown formatting ([#266](https://github.com/iwe-org/iwe/pull/266))

## [0.0.68](https://github.com/iwe-org/iwe/compare/iwes-v0.0.67...iwes-v0.0.68) - 2026-04-22

### Added

- Add min prefix length for completions ([#262](https://github.com/iwe-org/iwe/pull/262))

## [0.0.66](https://github.com/iwe-org/iwe/compare/iwes-v0.0.65...iwes-v0.0.66) - 2026-04-04

### Added

- List broken links in the stats command output  ([#252](https://github.com/iwe-org/iwe/pull/252))
- Enable code actions for inline links ([#248](https://github.com/iwe-org/iwe/pull/248))
- Go to definition for external URL's ([#247](https://github.com/iwe-org/iwe/pull/247))

### Other

- CI test stability fix

## [0.0.65](https://github.com/iwe-org/iwe/compare/iwes-v0.0.64...iwes-v0.0.65) - 2026-03-28

### Added

- Local dates and time components in the templates ([#245](https://github.com/iwe-org/iwe/pull/245))

## [0.0.64](https://github.com/iwe-org/iwe/compare/iwes-v0.0.63...iwes-v0.0.64) - 2026-03-25

### Added

- Add LSP folding ranges ([#235](https://github.com/iwe-org/iwe/pull/235))

## [0.0.63](https://github.com/iwe-org/iwe/compare/iwes-v0.0.62...iwes-v0.0.63) - 2026-03-20

### Added

- Search by document title, parent document titles and the document key instead of document path ([#231](https://github.com/iwe-org/iwe/pull/231))

### Other

- Removing unwarp's for stability and code style improvements ([#229](https://github.com/iwe-org/iwe/pull/229))

## [0.0.62](https://github.com/iwe-org/iwe/compare/iwes-v0.0.61...iwes-v0.0.62) - 2026-03-19

### Added

- CLI commands for graph transformations ([#227](https://github.com/iwe-org/iwe/pull/227))

### Other

- release v0.0.61 ([#224](https://github.com/iwe-org/iwe/pull/224))
- CI build fix

## [0.0.61](https://github.com/iwe-org/iwe/compare/iwes-v0.0.60...iwes-v0.0.61) - 2026-03-16

### Other

- CI build fix

### Changed

- **BREAKING**: Replace LLM API integration with CLI-based transformations

  Transform actions now execute external CLI commands instead of making direct API calls to LLM providers. This change removes the burden of maintaining API client code and eliminates direct external API calls from IWE. Users are likely to already have CLI AI tools pre-configured with API keys and preferences, making integration seamless. Any CLI-based AI tool can be used: `claude`, `aichat`, `llm`, `sgpt`, or custom scripts.

  - Renamed `[models]` config section to `[commands]`
  - Transform actions now use `command` field instead of `model`
  - Transform actions now use `input_template` field instead of `prompt_template`
  - Removed `context` field from transform actions
  - Commands execute via `sh -c` with input piped to stdin
  - Configuration version bumped to 3 (auto-migration from v2)

### Removed

- Removed `reqwest` dependency (no longer needed for HTTP API calls)
- Removed LLM API client code
- Removed `prompt_key_prefix` configuration option

## [0.0.60](https://github.com/iwe-org/iwe/compare/iwes-v0.0.59...iwes-v0.0.60) - 2026-01-14

### Added

- Preview linked note with LSP hover ([#207](https://github.com/iwe-org/iwe/pull/207))

## [0.0.59](https://github.com/iwe-org/iwe/compare/iwes-v0.0.58...iwes-v0.0.59) - 2026-01-10

### Other

- update Cargo.lock dependencies

## [0.0.57](https://github.com/iwe-org/iwe/compare/iwes-v0.0.56...iwes-v0.0.57) - 2025-12-09

### Added

- Add wiki style links completion ([#199](https://github.com/iwe-org/iwe/pull/199))

### Other

- Move functionality search from library to server ([#188](https://github.com/iwe-org/iwe/pull/188))

## [0.0.56](https://github.com/iwe-org/iwe/compare/iwes-v0.0.55...iwes-v0.0.56) - 2025-11-11

### Fixed

- Backlinks to the files with unicode chars in the file name ([#185](https://github.com/iwe-org/iwe/pull/185))
- Rename operation should keep the title of the link ([#184](https://github.com/iwe-org/iwe/pull/184))

### Other

- Lint fixes ([#182](https://github.com/iwe-org/iwe/pull/182))

## [0.0.55](https://github.com/iwe-org/iwe/compare/iwes-v0.0.54...iwes-v0.0.55) - 2025-10-28

### Fixed

- Use configured reference extension for links auto complete ([#176](https://github.com/iwe-org/iwe/pull/176))

## [0.0.54](https://github.com/iwe-org/iwe/compare/iwes-v0.0.53...iwes-v0.0.54) - 2025-10-17

### Added

- Remove files from the index on delete ([#170](https://github.com/iwe-org/iwe/pull/170))

## [0.0.53](https://github.com/iwe-org/iwe/compare/iwes-v0.0.52...iwes-v0.0.53) - 2025-10-16

### Other

- update Cargo.lock dependencies

## [0.0.52](https://github.com/iwe-org/iwe/compare/iwes-v0.0.51...iwes-v0.0.52) - 2025-10-14

### Other

- update Cargo.lock dependencies

## [0.0.50](https://github.com/iwe-org/iwe/compare/iwes-v0.0.49...iwes-v0.0.50) - 2025-10-13

### Added

- Create link from selected text ([#164](https://github.com/iwe-org/iwe/pull/164))

## [0.0.49](https://github.com/iwe-org/iwe/compare/iwes-v0.0.48...iwes-v0.0.49) - 2025-10-13

### Added

- Link the word under cursor ([#160](https://github.com/iwe-org/iwe/pull/160))

## [0.0.47](https://github.com/iwe-org/iwe/compare/iwes-v0.0.46...iwes-v0.0.47) - 2025-09-23

### Added

- Add title slug to the extracted file name template ([#154](https://github.com/iwe-org/iwe/pull/154))

## [0.0.46](https://github.com/iwe-org/iwe/compare/iwes-v0.0.45...iwes-v0.0.46) - 2025-09-20

### Added

- Extract all config support ([#151](https://github.com/iwe-org/iwe/pull/151))
- Extract code action config ([#149](https://github.com/iwe-org/iwe/pull/149))

### Other

- Update dependencies ([#148](https://github.com/iwe-org/iwe/pull/148))

## [0.0.45](https://github.com/iwe-org/iwe/compare/iwes-v0.0.44...iwes-v0.0.45) - 2025-09-13

### Added

- Add Inline code action config with optional removal of the inlined file and references to it ([#145](https://github.com/iwe-org/iwe/pull/145))

## [0.0.44](https://github.com/iwe-org/iwe/compare/iwes-v0.0.43...iwes-v0.0.44) - 2025-09-07

### Added

- Honor .gitignore files ([#141](https://github.com/iwe-org/iwe/pull/141))
- Delete note updating all references ([#140](https://github.com/iwe-org/iwe/pull/140))
- Add sort code action for lists sorting ([#139](https://github.com/iwe-org/iwe/pull/139))

## [0.0.43](https://github.com/iwe-org/iwe/compare/iwes-v0.0.42...iwes-v0.0.43) - 2025-09-05

### Added

- Add --verbose flag for CLI and more debug logs ([#137](https://github.com/iwe-org/iwe/pull/137))

## [0.0.42](https://github.com/iwe-org/iwe/compare/iwes-v0.0.41...iwes-v0.0.42) - 2025-09-04

### Fixed

- Inlay hints request for non existent file crashes the server ([#135](https://github.com/iwe-org/iwe/pull/135))

## [0.0.41](https://github.com/iwe-org/iwe/compare/iwes-v0.0.40...iwes-v0.0.41) - 2025-09-01

### Added

- Backlinks for the block-reference under cursor ([#130](https://github.com/iwe-org/iwe/pull/130))

### Fixed

- Do not remove extensions from local links ([#132](https://github.com/iwe-org/iwe/pull/132))

## [0.0.40](https://github.com/iwe-org/iwe/compare/iwes-v0.0.39...iwes-v0.0.40) - 2025-08-31

### Added

- Customizable "Attach" code action for documents linking ([#128](https://github.com/iwe-org/iwe/pull/128))

## [0.0.39](https://github.com/iwe-org/iwe/compare/iwes-v0.0.38...iwes-v0.0.39) - 2025-08-28

### Fixed

- Code action should not remove YAML metadata ([#127](https://github.com/iwe-org/iwe/pull/127))

## [0.0.38](https://github.com/iwe-org/iwe/compare/iwes-v0.0.37...iwes-v0.0.38) - 2025-08-28

### Fixed

- Inline links extension formatting bug fix ([#123](https://github.com/iwe-org/iwe/pull/123))

## [0.0.37](https://github.com/iwe-org/iwe/compare/iwes-v0.0.36...iwes-v0.0.37) - 2025-08-27

### Added

- Include/exclude headers structure in DOT exports ([#120](https://github.com/iwe-org/iwe/pull/120))

### Fixed

- Ignore non alphanumeric chars in search ([#119](https://github.com/iwe-org/iwe/pull/119))

## [0.0.36](https://github.com/iwe-org/iwe/compare/iwes-v0.0.35...iwes-v0.0.36) - 2025-08-24

### Added

- Backlinks inlay hints ([#117](https://github.com/iwe-org/iwe/pull/117))

## [0.0.33](https://github.com/iwe-org/iwe/compare/iwes-v0.0.32...iwes-v0.0.33) - 2025-06-07

### Fixed

- Fix panic in case of quote in list item ([#105](https://github.com/iwe-org/iwe/pull/105))

## [0.0.31](https://github.com/iwe-org/iwe/compare/iwes-v0.0.30...iwes-v0.0.31) - 2025-04-06

### Added

- Triggering LLM queries using LSP completions ([#97](https://github.com/iwe-org/iwe/pull/97))

## [0.0.29](https://github.com/iwe-org/iwe/compare/iwes-v0.0.28...iwes-v0.0.29) - 2025-03-29

### Fixed

- List item with dual dash "- -" causing panic ([#92](https://github.com/iwe-org/iwe/pull/92))

## [0.0.28](https://github.com/iwe-org/iwe/compare/iwes-v0.0.27...iwes-v0.0.28) - 2025-03-30

### Added

- Custom LLM code actions support for context aware updates ([#90](https://github.com/iwe-org/iwe/pull/90))

## [0.0.27](https://github.com/iwe-org/iwe/compare/iwes-v0.0.26...iwes-v0.0.27) - 2025-03-08

### Added

- Tables support ([#77](https://github.com/iwe-org/iwe/pull/77))

## [0.0.26](https://github.com/iwe-org/iwe/compare/iwes-v0.0.25...iwes-v0.0.26) - 2025-02-25

### Fixed

- Use relative paths in code actions ([#73](https://github.com/iwe-org/iwe/pull/73))

## [0.0.25](https://github.com/iwe-org/iwe/compare/iwes-v0.0.24...iwes-v0.0.25) - 2025-02-24

### Added

- Sub-directories support ([#71](https://github.com/iwe-org/iwe/pull/71))

## [0.0.22](https://github.com/iwe-org/iwe/compare/iwes-v0.0.21...iwes-v0.0.22) - 2025-02-17

### Added

- Better search results ([#61](https://github.com/iwe-org/iwe/pull/61))
- Helix specific lsp client handling

## [0.0.21](https://github.com/iwe-org/iwe/compare/iwes-v0.0.20...iwes-v0.0.21) - 2025-02-17

### Added

- better search results (#61)

## [0.0.20](https://github.com/iwe-org/iwe/compare/iwes-v0.0.19...iwes-v0.0.20) - 2025-02-17

### Added

- LSP search with fuzzy matching and page-rank (#56)

## [0.0.19](https://github.com/iwe-org/iwe/compare/iwes-v0.0.18...iwes-v0.0.19) - 2025-02-16

### Added

- wiki links support (#52)