diff --git a/home/dot_zshenv.tmpl b/home/dot_zshenv.tmpl index 19a0fcc..f89dca8 100644 --- a/home/dot_zshenv.tmpl +++ b/home/dot_zshenv.tmpl @@ -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 -}} ) diff --git a/home/dot_zshrc.tmpl b/home/dot_zshrc.tmpl index 09679c2..48a0dc3 100644 --- a/home/dot_zshrc.tmpl +++ b/home/dot_zshrc.tmpl @@ -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 " + return 1 + fi + + cd ~/notebook || { + echo "error: directory '~/notebook' does not exist." + return 1 + } + + git log --oneline -G"$1" +} diff --git a/home/private_Library/private_Application Support/io.datasette.llm/extra-openai-models.yaml b/home/private_Library/private_Application Support/io.datasette.llm/extra-openai-models.yaml index 644777a..e2b00c1 100644 --- a/home/private_Library/private_Application Support/io.datasette.llm/extra-openai-models.yaml +++ b/home/private_Library/private_Application Support/io.datasette.llm/extra-openai-models.yaml @@ -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 diff --git a/home/private_dot_config/helix/languages.toml.tmpl b/home/private_dot_config/helix/languages.toml.tmpl index beb503b..6f93bf9 100644 --- a/home/private_dot_config/helix/languages.toml.tmpl +++ b/home/private_dot_config/helix/languages.toml.tmpl @@ -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 \"\", replace \"\" 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 \"\"\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 \"\"; do not include any previously written code.\n- Never include \"\" 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, {}\")" + +[[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 + ;\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 * \n}" + +[[language-server.lsp-ai.config.completion.parameters.messages]] +role = "assistant" +content = "b" + +[[language-server.lsp-ai.config.completion.parameters.messages]] +role = "user" +content = "# \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" + +[[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"]