Skip to content

Commit cb7b1d2

Browse files
Davidyzgithub-actions[bot]
authored andcommitted
Auto generate docs
1 parent d29d5bd commit cb7b1d2

2 files changed

Lines changed: 60 additions & 53 deletions

File tree

doc/VectorCode-cli.txt

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ REFRESHING EMBEDDINGS ~
213213

214214
To maintain the accuracy of the vector search, it’s important to keep your
215215
embeddings up-to-date. You can simply run the `vectorise` subcommand on a file
216-
to refresh the embedding for a particular file, and the CLI provides a
216+
to refresh the embedding for that file. Apart from that, the CLI provides a
217217
`vectorcode update` subcommand, which updates the embeddings for all files that
218218
are currently indexed by VectorCode for the current project.
219219

@@ -242,8 +242,8 @@ For each project, VectorCode creates a collection (similar to tables in
242242
traditional databases) and puts the code embeddings in the corresponding
243243
collection. In the root directory of a project, you may run `vectorcode init`.
244244
This will initialise the repository with a subdirectory
245-
`project_root/.vectorcode/`. This will mark this directory a _project root_, a
246-
concept that will later be used to construct the collection. You may put a
245+
`project_root/.vectorcode/`. This will mark this directory as a _project root_,
246+
a concept that will later be used to construct the collection. You may put a
247247
`config.json` file in `project_root/.vectorcode`. This file may be used to
248248
store project-specific settings such as embedding functions and database entry
249249
point (more on this later). If you already have a global configuration file at
@@ -320,31 +320,32 @@ model_name="nomic-embed-text")`. Default: `{}`; - `db_url`string, the url that
320320
points to the Chromadb server. VectorCode will start an HTTP server for
321321
Chromadb at a randomly picked free port on `localhost` if your configured
322322
`http://host:port` is not accessible. Default: `http://127.0.0.1:8000`; -
323-
`db_path`string, Path to local persistent database. This is where the files for
324-
your database will be stored. Default: `~/.local/share/vectorcode/chromadb/`; -
325-
`db_log_path`string, path to the _directory_ where the built-in chromadb server
326-
will write the log to. Default: `~/.local/share/vectorcode/`; -
327-
`chunk_size`integer, the maximum number of characters per chunk. A larger value
328-
reduces the number of items in the database, and hence accelerates the search,
329-
but at the cost of potentially truncated data and lost information. Default:
330-
`2500`. To disable chunking, set it to a negative number; -
331-
`overlap_ratio`float between 0 and 1, the ratio of overlapping/shared content
332-
between 2 adjacent chunks. A larger ratio improves the coherences of chunks,
333-
but at the cost of increasing number of entries in the database and hence
334-
slowing down the search. Default: `0.2`. _Starting from 0.4.11, VectorCode will
335-
use treesitter to parse languages that it can automatically detect. It uses
336-
pygments to guess the language from filename, and tree-sitter-language-pack to
337-
fetch the correct parser. overlap_ratio has no effects when treesitter works.
338-
If VectorCode fails to find an appropriate parser, it’ll fallback to the
339-
legacy naive parser, in which case overlap_ratio works exactly in the same way
340-
as before;_ - `query_multiplier`integer, when you use the `query` command to
341-
retrieve `n` documents, VectorCode will check `n * query_multiplier` chunks and
342-
return at most `n` documents. A larger value of `query_multiplier` guarantees
343-
the return of `n` documents, but with the risk of including too many
344-
less-relevant chunks that may affect the document selection. Default: `-1` (any
345-
negative value means selecting documents based on all indexed chunks); -
346-
`reranker`string, the reranking method to use. Currently supports
347-
`CrossEncoderReranker` (default, using sentence-transformers cross-encoder
323+
`db_path`string, Path to local persistent database. If you didn’t set up a
324+
standalone Chromadb server, this is where the files for your database will be
325+
stored. Default: `~/.local/share/vectorcode/chromadb/`; - `db_log_path`string,
326+
path to the _directory_ where the built-in chromadb server will write the log
327+
to. Default: `~/.local/share/vectorcode/`; - `chunk_size`integer, the maximum
328+
number of characters per chunk. A larger value reduces the number of items in
329+
the database, and hence accelerates the search, but at the cost of potentially
330+
truncated data and lost information. Default: `2500`. To disable chunking, set
331+
it to a negative number; - `overlap_ratio`float between 0 and 1, the ratio of
332+
overlapping/shared content between 2 adjacent chunks. A larger ratio improves
333+
the coherence of chunks, but at the cost of increasing number of entries in the
334+
database and hence slowing down the search. Default: `0.2`. _Starting from
335+
0.4.11, VectorCode will use treesitter to parse languages that it can
336+
automatically detect. It uses pygments to guess the language from filename, and
337+
tree-sitter-language-pack to fetch the correct parser. overlap_ratio has no
338+
effects when treesitter works. If VectorCode fails to find an appropriate
339+
parser, it’ll fallback to the legacy naive parser, in which case
340+
overlap_ratio works exactly in the same way as before;_ -
341+
`query_multiplier`integer, when you use the `query` command to retrieve `n`
342+
documents, VectorCode will check `n * query_multiplier` chunks and return at
343+
most `n` documents. A larger value of `query_multiplier` guarantees the return
344+
of `n` documents, but with the risk of including too many less-relevant chunks
345+
that may affect the document selection. Default: `-1` (any negative value means
346+
selecting documents based on all indexed chunks); - `reranker`string, the
347+
reranking method to use. Currently supports `CrossEncoderReranker` (default,
348+
using sentence-transformers cross-encoder
348349
<https://sbert.net/docs/package_reference/cross_encoder/cross_encoder.html> )
349350
and `NaiveReranker` (sort chunks by the "distance" between the embedding
350351
vectors); - `reranker_params`dictionary, similar to `embedding_params`. The
@@ -353,17 +354,16 @@ these are the options passed to the `CrossEncoder`
353354
<https://sbert.net/docs/package_reference/cross_encoder/cross_encoder.html#id1>
354355
class. For example, if you want to use a non-default model, you can use the
355356
following: `json { "reranker_params": { "model_name_or_path": "your_model_here"
356-
} }` ; - `db_settings`dictionary, works in a similar way to `embedding_params`,
357+
} }` - `db_settings`dictionary, works in a similar way to `embedding_params`,
357358
but for Chromadb client settings so that you can configure authentication for
358359
remote Chromadb <https://docs.trychroma.com/production/administration/auth>; -
359360
`hnsw`a dictionary of hnsw settings
360361
<https://cookbook.chromadb.dev/core/configuration/#hnsw-configuration> that may
361362
improve the query performances or avoid runtime errors during queries. **It’s
362363
recommended to re-vectorise the collection after modifying these options,
363364
because some of the options can only be set during collection creation.**
364-
Example: `json5 // the following is the default value. "hnsw": { "hnsw:M": 64,
365-
}` - `filetype_map``dict[str, list[str]]`, a dictionary where keys are language
366-
name
365+
Example (and default): `json5 "hnsw": { "hnsw:M": 64, }` -
366+
`filetype_map``dict[str, list[str]]`, a dictionary where keys are language name
367367
<https://github.com/Goldziher/tree-sitter-language-pack?tab=readme-ov-file#available-languages>
368368
and values are lists of Python regex patterns
369369
<https://docs.python.org/3/library/re.html> that will match file extensions.
@@ -558,7 +558,7 @@ the `VECTORCODE_LOG_LEVEL` variable to one of `ERROR`, `WARN` (`WARNING`),
558558
`INFO` or `DEBUG`. For the CLI that you interact with in your shell, this will
559559
output logs to `STDERR` and write a log file to
560560
`~/.local/share/vectorcode/logs/`. For LSP and MCP servers, because `STDIO` is
561-
used for the RPC, only the log file will be written.
561+
used for the RPC, the logs will only be written to the log file, not `STDERR`.
562562

563563
For example:
564564

@@ -567,6 +567,9 @@ For example:
567567
<
568568

569569

570+
Depending on the MCP/LSP client implementation, you may need to take extra
571+
steps to make sure the environment variables are captured by VectorCode.
572+
570573
SHELL COMPLETION*VectorCode-cli-vectorcode-command-line-tool-shell-completion*
571574

572575
VectorCode supports shell completion for bash/zsh/tcsh. You can use `vectorcode
@@ -594,9 +597,9 @@ following options in the JSON config file:
594597
For Intel users, sentence transformer <https://www.sbert.net/index.html>
595598
supports OpenVINO
596599
<https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/overview.html>
597-
backend for supported GPU. Run `pipx install vectorcode[intel]` which will
598-
bundle the relevant libraries when you install VectorCode. After that, you will
599-
need to configure `SentenceTransformer` to use `openvino` backend. In your
600+
backend for supported GPU. Run `uv install vectorcode[intel]` which will bundle
601+
the relevant libraries when you install VectorCode. After that, you will need
602+
to configure `SentenceTransformer` to use `openvino` backend. In your
600603
`config.json`, set `backend` key in `embedding_params` to `"openvino"`
601604

602605
>json

doc/VectorCode.txt

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Table of Contents *VectorCode-table-of-contents*
2121
proceeding.
2222

2323
[!NOTE] When the neovim plugin doesn’t work properly, please try upgrading
24-
the CLI tool to the latest version before opening an issue.
24+
both the CLI and the neovim plugin to the latest version before opening an
25+
issue.
2526
- |VectorCode-installation|
2627
- |VectorCode-nix|
2728
- |VectorCode-integrations|
@@ -49,7 +50,7 @@ Table of Contents *VectorCode-table-of-contents*
4950

5051
INSTALLATION *VectorCode-neovim-plugin-installation*
5152

52-
Use your favorite plugin manager.
53+
Using Lazy:
5354

5455
>lua
5556
{
@@ -75,7 +76,7 @@ VectorCode CLI and pin to the releases for the neovim plugin;
7576
the latest GitHub commit.
7677

7778
It may be helpful to use a `build` hook to automatically upgrade the CLI when
78-
the neovim plugin updates. For example, if you’re using lazy.nvim and `pipx`,
79+
the neovim plugin updates. For example, if you’re using lazy.nvim and `uv`,
7980
you can use the following plugin spec:
8081

8182
>lua
@@ -105,13 +106,10 @@ The wiki <https://github.com/Davidyz/VectorCode/wiki/Neovim-Integrations>
105106
contains instructions to integrate VectorCode with the following plugins:
106107

107108
- milanglacier/minuet-ai.nvim <https://github.com/milanglacier/minuet-ai.nvim>;
108-
- olimorris/codecompanion.nvim <https://github.com/olimorris/codecompanion.nvim> [^];
109+
- olimorris/codecompanion.nvim <https://github.com/olimorris/codecompanion.nvim>;
109110
- nvim-lualine/lualine.nvim <https://github.com/nvim-lualine/lualine.nvim>;
110-
- CopilotC-Nvim/CopilotChat.nvim <https://github.com/CopilotC-Nvim/CopilotChat.nvim> [^];
111-
- ravitemer/mcphub.nvim <https://github.com/ravitemer/mcphub.nvim>[^].
112-
113-
For these plugins, having the plugin installed is sufficient. please go ahead
114-
to the wiki for further instructions.
111+
- CopilotC-Nvim/CopilotChat.nvim <https://github.com/CopilotC-Nvim/CopilotChat.nvim>;
112+
- ravitemer/mcphub.nvim <https://github.com/ravitemer/mcphub.nvim>.
115113

116114

117115
CONFIGURATION *VectorCode-neovim-plugin-configuration*
@@ -176,9 +174,9 @@ wait for the server loading when making your first request. -
176174
`sync_log_env_var``boolean`. If true, this plugin will automatically set the
177175
`VECTORCODE_LOG_LEVEL` environment variable for LSP or cmd processes started
178176
within your neovim session when logging is turned on for this plugin. Use at
179-
caution because the CLI write all logs to stderr, which _may_ make this plugin
180-
VERY verbose. See |VectorCode-debugging-and-logging| for details on how to turn
181-
on logging.
177+
caution because the non-LSP CLI write all logs to stderr, which _may_ make this
178+
plugin VERY verbose. See |VectorCode-debugging-and-logging| for details on how
179+
to turn on logging.
182180

183181
You may notice that a lot of options in `async_opts` are the same as the other
184182
options in the top-level of the main option table. This is because the
@@ -190,6 +188,9 @@ configured.
190188

191189
USER COMMAND *VectorCode-neovim-plugin-user-command*
192190

191+
The neovim plugin provides user commands to work with
192+
|VectorCode-async-caching|.
193+
193194

194195
VECTORCODE REGISTER ~
195196

@@ -307,6 +308,9 @@ path/document content to the prompt like this:
307308
end
308309
<
309310

311+
Keep in mind that this `query` function call will be synchronous and therefore
312+
block the neovim UI. This is where the async cache comes in.
313+
310314

311315
CHECK(CHECK_ITEM?)
312316

@@ -370,8 +374,8 @@ path to the executable) by calling `vim.lsp.config('vectorcode_server', opts)`.
370374

371375
Cons Heavy IO overhead because the Requires vectorcode-server; Only
372376
embedding model and database works if you’re using a standalone
373-
client need to be initialised ChromaDB server; May contain bugs
374-
for every query. because it’s new.
377+
client need to be initialised ChromaDB server.
378+
for every query.
375379
-------------------------------------------------------------------------------
376380
You may choose which backend to use by setting the |VectorCode-`setup`| option
377381
`async_backend`, and acquire the corresponding backend by the following API:
@@ -400,9 +404,9 @@ This function registers a buffer to be cached by VectorCode.
400404
<
401405

402406
The following are the available options for this function: - `bufnr`buffer
403-
number. Default: current buffer; - `opts`accepts a lua table with the following
404-
keys: - `project_root`a string of the path that overrides the detected project
405-
root. Default: `nil`. This is mostly intended to use with the
407+
number. Default: `0` (current buffer); - `opts`accepts a lua table with the
408+
following keys: - `project_root`a string of the path that overrides the
409+
detected project root. Default: `nil`. This is mostly intended to use with the
406410
|VectorCode-user-command|, and you probably should not use this directly in
407411
your config. **If you’re using the LSP backend and did not specify this
408412
value, it will be automatically detected based on .vectorcode or .git. If this

0 commit comments

Comments
 (0)