markdown-lsp 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -201,6 +201,19 @@ If a file changes, its hash changes, so it is re-embedded automatically (no stal
|
|
|
201
201
|
| After `index --granularity heading` (~1190 sections) | 1 (query only) | ~1/1190 |
|
|
202
202
|
| `index` re-run with no changes | 0 | free |
|
|
203
203
|
|
|
204
|
+
### Incremental & token-saving: re-run `index` anytime
|
|
205
|
+
|
|
206
|
+
`index ./docs` is incremental by design — only changed units are re-embedded, unchanged ones are
|
|
207
|
+
served from the local cache (`.markdown-lsp-cache/embeddings/`). You can call it as frequently as
|
|
208
|
+
you like without wasting API tokens on content that hasn't changed.
|
|
209
|
+
|
|
210
|
+
To automate re-indexing, the recommended approach is a **git hook** (no extra deps, no debounce
|
|
211
|
+
complexity): a `post-merge` or `post-checkout` hook runs `npx markdown-lsp index ./docs` automatically
|
|
212
|
+
after pulls and branch switches. For real-time updates while writing docs, a debounced watch script
|
|
213
|
+
(stdlib `fs.watch` with a 3-5 s debounce) works well. CI users can cache `.markdown-lsp-cache/`
|
|
214
|
+
via `actions/cache` so the index survives across runs. See the [skill file](.claude/skills/markdown-lsp/SKILL.md)
|
|
215
|
+
for ready-to-use snippets for all three patterns.
|
|
216
|
+
|
|
204
217
|
---
|
|
205
218
|
|
|
206
219
|
## Semantic search with granularity
|
package/package.json
CHANGED