docs: return autocomplete setup
This commit is contained in:
parent
f18946c05e
commit
b456e3dcf5
4 changed files with 54 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ mcpServers:
|
|||
- "@modelcontextprotocol/server-sqlite"
|
||||
- "./database.db"
|
||||
cwd: "/path/to/project"
|
||||
|
||||
|
||||
- name: Local Project Server
|
||||
command: npm
|
||||
args:
|
||||
|
|
|
|||
19
docs/docs/features/autocomplete/context-selection.mdx
Normal file
19
docs/docs/features/autocomplete/context-selection.mdx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Context Selection
|
||||
|
||||
Autocomplete will automatically determine context based on the current cursor position. We use the following techniques to determine what to include in the prompt:
|
||||
|
||||
## File prefix/suffix
|
||||
|
||||
We will always include the code from your file prior to and after the cursor position.
|
||||
|
||||
## Definitions from the Language Server Protocol
|
||||
|
||||
Similar to how you can use cmd/ctrl + click in your editor, we use the same tool (the LSP) to power "go to definition". For example, if you are typing out a function call, we will include the function definition. Or, if you are writing code inside of a method, we will include the type definitions for any parameters or the return type.
|
||||
|
||||
## Imported files
|
||||
|
||||
Because there are often many imports, we can't include all of them. Instead, we look for symbols around your cursor that have matching imports and use that as context.
|
||||
|
||||
## Recent files
|
||||
|
||||
We automatically consider recently opened or edited files and include snippets that are relevant to the current completion.
|
||||
5
docs/docs/features/autocomplete/how-to-customize.mdx
Normal file
5
docs/docs/features/autocomplete/how-to-customize.mdx
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# How to Customize Autocomplete
|
||||
|
||||
Continue offers a handful of settings to customize autocomplete behavior. Visit the [User Settings Page](/customize/deep-dives/settings/) to manage these settings.
|
||||
|
||||
For a comprehensive guide on all configuration options and their impacts, see the [Autocomplete deep dive](/customize/deep-dives/autocomplete).
|
||||
29
docs/docs/features/autocomplete/model-setup.mdx
Normal file
29
docs/docs/features/autocomplete/model-setup.mdx
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Autocomplete Model Setup
|
||||
|
||||
Setting up the right model for autocomplete is crucial for a smooth coding experience. Here are our top recommendations:
|
||||
|
||||
## Recommended Models
|
||||
|
||||
### Hosted-Based (Best Performance)
|
||||
|
||||
For the highest quality autocomplete suggestions, we recommend **[Codestral](https://hub.continue.dev/mistral/codestral)** from Mistral. This model is specifically designed for code completion and offers excellent performance across multiple programming languages.
|
||||
|
||||
**Quick Setup:**
|
||||
|
||||
1. [Add Codestral from the hub](https://hub.continue.dev/mistral/codestral)
|
||||
2. Get your API key from the [Mistral Platform](https://console.mistral.ai/codestral)
|
||||
3. Configure it in your Continue settings
|
||||
|
||||
### Local/Offline (Privacy First)
|
||||
|
||||
For a fully local autocomplete experience that doesn't send your code to external servers, we recommend **[Qwen 2.5 Coder 1.5B](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b)** running on Ollama. This model provides good suggestions while keeping your code completely private.
|
||||
|
||||
**Quick Setup:**
|
||||
|
||||
1. Install [Ollama](https://ollama.ai/)
|
||||
2. [Add Qwen 2.5 Coder from the hub](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b)
|
||||
3. Configure it in your Continue settings
|
||||
|
||||
## Need Help?
|
||||
|
||||
If you're not seeing any completions or need more detailed configuration options, check out our comprehensive [autocomplete deep dive guide](/customize/deep-dives/autocomplete).
|
||||
Loading…
Add table
Reference in a new issue