random tweaks

This commit is contained in:
Matthew Ryan Dillon 2025-08-03 21:41:12 -04:00
parent f751605860
commit 744574169c
4 changed files with 108 additions and 3 deletions

View file

@ -69,6 +69,9 @@ check_paths=(
# uv
$HOME/.local/bin
# lm studio
$HOME/.lmstudio/bin
{{ join .chezmoi.sourceDir "encrypted_dot_work_paths.age" | include | decrypt -}}
)

View file

@ -83,3 +83,17 @@ export FZF_DEFAULT_OPTS=" \
--color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \
--color=selected-bg:#45475a \
--color=border:#313244,label:#cdd6f4"
find_note() {
if [ -z "$1" ]; then
echo "error: no substring provided. usage: note_search <substring>"
return 1
fi
cd ~/notebook || {
echo "error: directory '~/notebook' does not exist."
return 1
}
git log --oneline -G"$1"
}

View file

@ -9,3 +9,8 @@
api_base: "https://api.githubcopilot.com"
api_key_name: copilot
supports_tools: true
- model_id: lms-qwen3-coder-30b
model_name: qwen3/qwen3-coder-30b
api_base: "http://localhost:1234/v1"
api_key_name: copilot

View file

@ -1,5 +1,84 @@
[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"
@ -11,7 +90,7 @@ config = {}
[[language]]
name = "python"
language-servers = ["pyright"]
language-servers = ["pyright", "lsp-ai"]
[language-server.roc-ls]
command = "roc_language_server"
@ -24,7 +103,7 @@ file-types = ["roc"]
shebangs = ["roc"]
roots = []
comment-token = "#"
language-servers = ["roc-ls"]
language-servers = ["roc-ls", "lsp-ai"]
indent = { tab-width = 2, unit = " " }
auto-format = true
formatter = { command = "roc", args =[ "format", "--stdin", "--stdout"]}
@ -46,4 +125,8 @@ roots = ["go.work", "go.mod"]
auto-format = true
formatter = ["gofmt"]
comment-token = "//"
language-servers = [ "gopls" ]
language-servers = ["gopls", "lsp-ai"]
[[language]]
name = "markdown"
language-servers = ["marksman", "lsp-ai"]