aboutsummaryrefslogtreecommitdiffstats
path: root/home/helix/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/helix/default.nix')
-rw-r--r--home/helix/default.nix151
1 files changed, 136 insertions, 15 deletions
diff --git a/home/helix/default.nix b/home/helix/default.nix
index 2438703..37c8529 100644
--- a/home/helix/default.nix
+++ b/home/helix/default.nix
@@ -1,35 +1,156 @@
+{ inputs, pkgs, ... }:
{
- inputs,
- pkgs,
- ...
-}: {
programs.helix = {
+ extraPackages = [ ];
enable = true;
+ defaultEditor = false;
settings = {
theme = "catppuccin_mocha";
editor = {
+ auto-format = true;
+ auto-pairs = false;
+ bufferline = "multiple";
color-modes = true;
+ completion-replace = true;
+ completion-trigger-len = 1;
cursorline = true;
- cursor-shape = {
- insert = "bar";
- normal = "block";
- select = "underline";
- };
indent-guides.render = true;
- lsp.display-inlay-hints = true;
- statusline.center = ["position-percentage"];
+ soft-wrap.enable = true;
+ statusline.center = [ "position-percentage" ];
true-color = true;
- whitespace.characters = {
- newline = "↴";
- tab = "⇥";
+ whitespace = {
+ render = "all";
+ characters = {
+ newline = "↴";
+ tab = "⇥";
+ };
};
};
-
keys.normal.space.u = {
f = ":format"; # format using LSP formatter
w = ":set whitespace.render all";
W = ":set whitespace.render none";
};
+ editor.cursor-shape = {
+ insert = "bar";
+ normal = "block";
+ select = "underline";
+ };
+ editor.lsp = {
+ display-messages = true;
+ display-inlay-hints = true;
+ display-signature-help-docs = true;
+ };
+ };
+ languages = {
+ language-server = {
+ vale-ls = {
+ command = "${pkgs.vale-ls}/bin/vale-ls";
+ };
+ rust-analyzer = {
+ config = {
+ checkOnSave = {
+ command = "${pkgs.clippy}/bin/clippy";
+ };
+ cargo = {
+ allFeatures = true;
+ };
+ };
+ };
+ biome = {
+ command = "${pkgs.biome}/bin/biome";
+ args = [ "lsp-proxy" ];
+ };
+ ruff = {
+ command = "${pkgs.ruff}/bin/ruff";
+ args = [
+ "server"
+ "--preview"
+ "--isolated"
+ ];
+ };
+ pyright = {
+ command = "${pkgs.pyright}/bin/pyright-langserver";
+ args = [ "--stdio" ];
+ };
+ };
+ language = [
+ {
+ name = "asciidoc";
+ language-servers = [ "vale-ls" ];
+ scope = "source.adoc";
+ file-types = [ "adoc" ];
+ grammar = "asciidoc";
+ }
+ {
+ name = "rust";
+ auto-format = true;
+ }
+ {
+ name = "python";
+ language-servers = [
+ "ruff"
+ "pyright"
+ ];
+ auto-format = true;
+ }
+ {
+ name = "latex";
+ language-servers = [
+ "texlab"
+ "vale-ls"
+ ];
+ auto-format = true;
+ formatter = {
+ command = "${pkgs.tex-fmt}/bin/tex-fmt";
+ args = [
+ "--stdin"
+ "--keep"
+ ];
+ };
+ }
+ {
+ name = "nix";
+ auto-format = true;
+ formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
+ }
+ {
+ name = "markdown";
+ auto-format = true;
+ formatter = {
+ command = "${pkgs.dprint}/bin/dprint";
+ args = [
+ "fmt"
+ "--stdin"
+ "md"
+ ];
+ };
+ language-servers = [
+ "vale-ls"
+ "marksman"
+ ];
+ }
+ {
+ name = "toml";
+ auto-format = true;
+ }
+ {
+ name = "javascript";
+ language-servers = [
+ {
+ name = "typescript-language-server";
+ except-features = [ "format" ];
+ }
+ "biome"
+ ];
+ auto-format = true;
+ }
+ {
+ name = "json";
+ language-servers = [ "biome" ];
+ auto-format = true;
+ }
+ ];
};
};
}