mirror of
https://codeberg.org/tmayoff/.dotfiles.git
synced 2025-12-06 08:48:34 -05:00
Updated helix config to allow for flake based overrides
This commit is contained in:
parent
3c172ef9fc
commit
07177c14ca
5 changed files with 286 additions and 104 deletions
|
|
@ -101,6 +101,7 @@ in {
|
|||
"notunes"
|
||||
|
||||
"hammerspoon"
|
||||
"claude-code"
|
||||
|
||||
"firefox"
|
||||
"gpg-suite"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,107 @@
|
|||
../../modules/darwin/PaperWM.spoon
|
||||
];
|
||||
|
||||
# Hinge-specific Helix configuration with lsp-ai
|
||||
programs.helix.languages = {
|
||||
language-server.lsp_ai = {
|
||||
command = "lsp-ai";
|
||||
args = [
|
||||
"--use-seperate-log-file"
|
||||
"--stdio"
|
||||
];
|
||||
config = {
|
||||
memory = {
|
||||
file_store = {};
|
||||
};
|
||||
models = {
|
||||
model1 = {
|
||||
type = "anthropic";
|
||||
chat_endpoint = "https://api.anthropic.com/v1/messages";
|
||||
model = "claude-3-5-haiku-20241022";
|
||||
auth_token_env_var_name = "ANTHROPIC_API_KEY";
|
||||
};
|
||||
};
|
||||
completion = {
|
||||
model = "model1";
|
||||
parameters = {
|
||||
max_context = 2048;
|
||||
max_tokens = 50;
|
||||
system = "You are a code completion assistant. Complete the code at <CURSOR>. Only output the completion itself, nothing else. Be concise.";
|
||||
messages = [
|
||||
{
|
||||
role = "user";
|
||||
content = "def greet(name):\n print(f\"Hello, {<CURSOR>}\")";
|
||||
}
|
||||
{
|
||||
role = "assistant";
|
||||
content = "name";
|
||||
}
|
||||
{
|
||||
role = "user";
|
||||
content = "function sum(a, b) {\n return a + <CURSOR>;\n}";
|
||||
}
|
||||
{
|
||||
role = "assistant";
|
||||
content = "b";
|
||||
}
|
||||
{
|
||||
role = "user";
|
||||
content = "fn multiply(a: i32, b: i32) -> i32 {\n a * <CURSOR>\n}";
|
||||
}
|
||||
{
|
||||
role = "assistant";
|
||||
content = "b";
|
||||
}
|
||||
{
|
||||
role = "user";
|
||||
content = "# <CURSOR>\ndef add(a, b):\n return a + b";
|
||||
}
|
||||
{
|
||||
role = "assistant";
|
||||
content = "Adds two numbers";
|
||||
}
|
||||
{
|
||||
role = "user";
|
||||
content = "# This function checks if a number is even\n<CURSOR>";
|
||||
}
|
||||
{
|
||||
role = "assistant";
|
||||
content = "def is_even(n):\n return n % 2 == 0";
|
||||
}
|
||||
{
|
||||
role = "user";
|
||||
content = "{CODE}";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
language = [
|
||||
{
|
||||
name = "cpp";
|
||||
language-servers = ["clangd" "lsp_ai"];
|
||||
}
|
||||
{
|
||||
name = "python";
|
||||
language-servers = ["ruff" "basedpyright" "lsp_ai"];
|
||||
}
|
||||
{
|
||||
name = "typescript";
|
||||
language-servers = ["typescript-language-server" "lsp_ai"];
|
||||
}
|
||||
{
|
||||
name = "bash";
|
||||
language-servers = ["bash-language-server" "lsp_ai"];
|
||||
}
|
||||
{
|
||||
name = "toml";
|
||||
language-servers = ["taplo" "lsp_ai"];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
targets.darwin.linkApps.enable = false;
|
||||
targets.darwin.copyApps.enable = true;
|
||||
|
||||
|
|
@ -58,6 +159,9 @@
|
|||
unstable.biome
|
||||
uv
|
||||
|
||||
unstable.jiratui
|
||||
unstable.opencode
|
||||
|
||||
ffmpeg
|
||||
sccache
|
||||
just
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue