Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann committed Nov 16, 2024
1 parent 6dc8dc2 commit 3063b62
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 19 deletions.
5 changes: 4 additions & 1 deletion docs/src/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ Inlay hints are disabled by default and can be enabled with the `"show_inlay_hin

Inline completions are typically provided by an AI code assistant.
They can span multiple lines and are rendered directly in the source code as grayed out text ("ghost text").
Currently inline completions are only requested when you manually trigger auto-completions (<kbd>Ctrl</kbd> + <kbd>Space</kbd>).

!!! note
Currently inline completions are only requested when you manually trigger auto-completions (<kbd>Ctrl</kbd> + <kbd>Space</kbd>).
Inline completions are disabled if you have enabled `"mini_auto_complete"`.

## Server Commands

Expand Down
3 changes: 3 additions & 0 deletions docs/src/keyboard_shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Refer to the [Customization section](customization.md#keyboard-shortcuts-key-bin
| Feature | Shortcut | Command |
| ------- | -------- | ------- |
| Auto Complete | <kbd>ctrl</kbd> <kbd>space</kbd> (also on macOS) | `auto_complete`
| Commit Inline Completion | <kbd>alt</kbd> <kbd>enter</kbd> | `lsp_commit_inline_completion`
| Expand Selection | unbound | `lsp_expand_selection`
| Find References | <kbd>shift</kbd> <kbd>f12</kbd> | `lsp_symbol_references`<br>Supports optional args: `{"include_declaration": true | false, "output_mode": "output_panel" | "quick_panel"}`.<br>Triggering from context menus while holding <kbd>ctrl</kbd> opens in "side by side" mode. Holding <kbd>shift</kbd> triggers opposite behavior relative to what `show_references_in_quick_panel` is set to.
| Fold | unbound | `lsp_fold`<br>Supports optional args: `{"strict": true/false}` - to configure whether to fold only when the caret is contained within the folded region (`true`), or even when it is anywhere on the starting line (`false`).
Expand All @@ -28,13 +29,15 @@ Refer to the [Customization section](customization.md#keyboard-shortcuts-key-bin
| Next Diagnostic | unbound | `lsp_next_diagnostic`
| Previous Diagnostic | unbound | `lsp_prev_diagnostic`
| Rename | unbound | `lsp_symbol_rename`
| Request Inline Completions | unbound | `lsp_inline_completion`
| Restart Server | unbound | `lsp_restart_server`
| Run Code Action | unbound | `lsp_code_actions`
| Run Code Lens | unbound | `lsp_code_lens`
| Run Refactor Action | unbound | `lsp_code_actions`<br>With args: `{"only_kinds": ["refactor"]}`.
| Run Source Action | unbound | `lsp_code_actions`<br>With args: `{"only_kinds": ["source"]}`.
| Save All | unbound | `lsp_save_all`<br>Supports optional args `{"only_files": true | false}` - whether to ignore buffers which have no associated file on disk.
| Show Call Hierarchy | unbound | `lsp_call_hierarchy`
| Show next Inline Completion | unbound | `lsp_next_inline_completion`
| Show Type Hierarchy | unbound | `lsp_type_hierarchy`
| Signature Help | <kbd>ctrl</kbd> <kbd>alt</kbd> <kbd>space</kbd> | `lsp_signature_help_show`
| Toggle Diagnostics Panel | <kbd>ctrl</kbd> <kbd>alt</kbd> <kbd>m</kbd> | `lsp_show_diagnostics_panel`
Expand Down
46 changes: 28 additions & 18 deletions docs/src/language_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,37 @@ The following steps describe a local installation on a Windows PC with compatibl

2. Download and extract a CUDA version of Tabby from the [GitHub releases page](https://github.com/TabbyML/tabby/releases) (click on "Assets"); e.g. `tabby_x86_64-windows-msvc-cuda122.zip`

3. Install the `tabby-agent` language server via npm (requires NodeJS):
3. On macOS and Linux it might be necessary to change the access permissions of `lama-server` and `tabby` to be executable:

```sh
$ tabby_aarch64-apple-darwin chmod +x llama-server
$ tabby_aarch64-apple-darwin chmod +x tabby
```

!!! note "On macOS you might get an error that “tabby” cannot be opened because it is from an unidentified developer."
After changing the permission to executable, right click on `tabby` and select "Open", that will get rid of the error.

4. Download a completion model (see <https://tabby.tabbyml.com/docs/models/> for available model files and GPU requirements):

```sh
tabby download --model StarCoder-1B
```

5. If necessary, edit the configuration file under `~/.tabby-client/agent/config.toml`, which is generated automatically on the first start of tabby-agent.
For example, to disable anonymous usage tracking add

```toml
[anonymousUsageTracking]
disable = true
```

6. Install the `tabby-agent` language server via npm (requires NodeJS):

```sh
npm install -g tabby-agent
```

4. Open `Preferences > Package Settings > LSP > Settings` and add the `"tabby"` client configuration to the `"clients"`:
7. Open `Preferences > Package Settings > LSP > Settings` and add the `"tabby"` client configuration to the `"clients"`:

```jsonc
{
Expand All @@ -49,29 +73,15 @@ The following steps describe a local installation on a Windows PC with compatibl
}
```

5. Download a completion model (see <https://tabby.tabbyml.com/docs/models/> for available model files and GPU requirements):

```sh
tabby download --model StarCoder-1B
```

6. If necessary, edit the configuration file under `~/.tabby-client/agent/config.toml`, which is generated automatically on the first start of tabby-agent.
For example, to disable anonymous usage tracking add

```toml
[anonymousUsageTracking]
disable = true
```

7. Manually start the Tabby backend:
8. Manually start the Tabby backend:

```sh
tabby serve --model StarCoder-1B --no-webserver
```

The language server communicates with this backend, i.e. it needs to be running in order for `tabby-agent` to work.

8. Now you can open a file in Sublime Text and start coding.
9. Now you can open a file in Sublime Text and start coding.
Inline completions are requested when you manually trigger auto-complete via <kbd>Ctrl</kbd> + <kbd>Space</kbd>.


Expand Down

0 comments on commit 3063b62

Please sign in to comment.