Compare commits
No commits in common. "fa40f296e5733a4be29960ebf79daf6d75d38e72" and "831889a206148785f1f1e77e4bbe1db700e00d94" have entirely different histories.
fa40f296e5
...
831889a206
2 changed files with 83 additions and 7 deletions
|
|
@ -1,3 +1,81 @@
|
|||
[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"]
|
||||
|
|
@ -52,7 +130,3 @@ language-servers = ["gopls", "lsp-ai"]
|
|||
[[language]]
|
||||
name = "markdown"
|
||||
language-servers = ["marksman", "lsp-ai"]
|
||||
|
||||
[[language]]
|
||||
name = "lua"
|
||||
formatter = { command = "stylua", args = [ "-" ] }
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ brew install \
|
|||
helix \
|
||||
inlyne \
|
||||
jj \
|
||||
just \
|
||||
kitty \
|
||||
lua-language-server \
|
||||
luarocks \
|
||||
marksman \
|
||||
|
|
@ -33,6 +33,8 @@ brew install \
|
|||
watch \
|
||||
wget \
|
||||
xz \
|
||||
yazi \
|
||||
zellij \
|
||||
zk \
|
||||
zlib
|
||||
|
||||
|
|
@ -45,13 +47,13 @@ nvm install 22
|
|||
nvm use 22
|
||||
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
uv tool install --force --python python3.12 aider-chat@latest
|
||||
|
||||
{{ if eq .hosttype "personal" -}}
|
||||
brew install \
|
||||
love \
|
||||
mingw-w64 \
|
||||
pandoc \
|
||||
stylua
|
||||
pandoc
|
||||
{{ else if eq .hosttype "work" -}}
|
||||
{{ join .chezmoi.sourceDir "encrypted_dot_work_packages.age" | include | decrypt -}}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue