From ab3b928a0b9789c06a8d6bcd188a351e70480b23 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Thu, 14 Nov 2024 10:26:02 +0100 Subject: [PATCH] feat(helix): Added config for `lsp-ai` --- editor/helix/default.nix | 5 +++-- editor/helix/languages.toml | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/editor/helix/default.nix b/editor/helix/default.nix index c85c522..881b169 100644 --- a/editor/helix/default.nix +++ b/editor/helix/default.nix @@ -1,6 +1,7 @@ {pkgs, ...}: { - home.packages = [ - pkgs.helix + home.packages = with pkgs; [ + helix + lsp-ai ]; home.file = { diff --git a/editor/helix/languages.toml b/editor/helix/languages.toml index a84874a..4d35f9d 100644 --- a/editor/helix/languages.toml +++ b/editor/helix/languages.toml @@ -1,3 +1,31 @@ +############################## +## Configuration for lsp-ai ## +############################## + +[language-server.lsp-ai] +command = "lsp-ai" + +[language-server.lsp-ai.config.memory] +file_store = { } + +[language-server.lsp-ai.config.models.codestral] +type = "mistral_fim" +fim_endpoint = "https://api.mistral.ai/v1/fim/completions" +model = "codestral-latest" +auth_token_env_var_name = "CODESTRAL_API_KEY" + +[language-server.lsp-ai.config.completion] +model = "codestral" + +[language-server.lsp-ai.config.completion.parameters] +max_tokens = 64 +max_context = 1024 + + +################################# +## Configuration for languages ## +################################# + [[language]] name = "rust"