132 lines
4.1 KiB
Cheetah
132 lines
4.1 KiB
Cheetah
[language-server.lsp-ai]
|
|
command = "lsp-ai"
|
|
|
|
[language-server.lsp-ai.config.memory]
|
|
file_store = { }
|
|
|
|
[language-server.lsp-ai.config.models.model1]
|
|
type = "open_ai"
|
|
chat_endpoint = "http://localhost:1234/v1/chat/completions"
|
|
completions_endpoint = "http://localhost:1234/v1/completions"
|
|
model = "mistralai/devstral-small-2507"
|
|
auth_token = "foo"
|
|
|
|
[language-server.lsp-ai.config.completion]
|
|
model = "model1"
|
|
|
|
[language-server.lsp-ai.config.completion.parameters]
|
|
max_tokens = 64
|
|
max_context = 1024
|
|
|
|
[[language-server.lsp-ai.config.chat]]
|
|
trigger = "!C"
|
|
action_display_name = "Chat"
|
|
model = "model1"
|
|
|
|
[language-server.lsp-ai.config.chat.parameters]
|
|
max_context = 4096
|
|
max_tokens = 1024
|
|
system = "You are a code assistant chatbot. The user will ask you for assistance coding and you will do you best to answer succinctly and accurately"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "system"
|
|
content = "Instructions:\n- You are an AI programming assistant.\n- Given a piece of code with the cursor location marked by \"<CURSOR>\", replace \"<CURSOR>\" with the correct code or comment.\n- First, think step-by-step.\n- Describe your plan for what to build in pseudocode, written out in great detail.\n- Then output the code replacing the \"<CURSOR>\"\n- Ensure that your completion fits within the language context of the provided code snippet (e.g., Python, JavaScript, Rust).\n\nRules:\n- Only respond with code or comments.\n- Only replace \"<CURSOR>\"; do not include any previously written code.\n- Never include \"<CURSOR>\" in your response\n- If the cursor is within a comment, complete the comment meaningfully.\n- Handle ambiguous cases by providing the most contextually appropriate completion.\n- Be consistent with your responses."
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "user"
|
|
content = "def greet(name):\n print(f\"Hello, {<CURSOR>}\")"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "assistant"
|
|
content = "name"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "user"
|
|
content = "function sum(a, b) {\n return a + <CURSOR>;\n}"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "assistant"
|
|
content = "b"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "user"
|
|
content = "fn multiply(a: i32, b: i32) -> i32 {\n a * <CURSOR>\n}"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "assistant"
|
|
content = "b"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "user"
|
|
content = "# <CURSOR>\ndef add(a, b):\n return a + b"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "assistant"
|
|
content = "Adds two numbers"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "user"
|
|
content = "# This function checks if a number is even\n<CURSOR>"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "assistant"
|
|
content = "def is_even(n):\n return n % 2 == 0"
|
|
|
|
[[language-server.lsp-ai.config.completion.parameters.messages]]
|
|
role = "user"
|
|
content = "{CODE}"
|
|
|
|
[[language]]
|
|
name = "rust"
|
|
language-servers = ["rust-analyzer", "lsp-ai"]
|
|
|
|
[language-server.rust-analyzer.config.check]
|
|
command = "clippy"
|
|
|
|
[language-server.pyright]
|
|
command = "pyright-langserver"
|
|
args = ["--stdio"]
|
|
config = {}
|
|
|
|
[[language]]
|
|
name = "python"
|
|
language-servers = ["pyright", "lsp-ai"]
|
|
|
|
[language-server.roc-ls]
|
|
command = "roc_language_server"
|
|
|
|
[[language]]
|
|
name = "roc"
|
|
scope = "source.roc"
|
|
injection-regex = "roc"
|
|
file-types = ["roc"]
|
|
shebangs = ["roc"]
|
|
roots = []
|
|
comment-token = "#"
|
|
language-servers = ["roc-ls", "lsp-ai"]
|
|
indent = { tab-width = 2, unit = " " }
|
|
auto-format = true
|
|
formatter = { command = "roc", args =[ "format", "--stdin", "--stdout"]}
|
|
|
|
[language.auto-pairs]
|
|
'(' = ')'
|
|
'{' = '}'
|
|
'[' = ']'
|
|
'"' = '"'
|
|
|
|
[[grammar]]
|
|
|
|
name = "roc"
|
|
source = { git = "https://github.com/faldor20/tree-sitter-roc.git", rev = "ef46edd0c03ea30a22f7e92bc68628fb7231dc8a" }
|
|
|
|
[[language]]
|
|
name = "go"
|
|
roots = ["go.work", "go.mod"]
|
|
auto-format = true
|
|
formatter = ["gofmt"]
|
|
comment-token = "//"
|
|
language-servers = ["gopls", "lsp-ai"]
|
|
|
|
[[language]]
|
|
name = "markdown"
|
|
language-servers = ["marksman", "lsp-ai"]
|