1

Modules/Zed: Update extensions

This commit is contained in:
2026-06-05 12:37:04 +02:00
parent 9f01c4ecf1
commit d1808b93af

View File

@ -5,10 +5,12 @@
mylib, mylib,
pkgs, pkgs,
... ...
}: let }:
let
inherit (config.homemodules) zed color; inherit (config.homemodules) zed color;
in { in
options.homemodules.zed = import ./options.nix {inherit lib mylib;}; {
options.homemodules.zed = import ./options.nix { inherit lib mylib; };
config = lib.mkIf zed.enable { config = lib.mkIf zed.enable {
programs.zed-editor = { programs.zed-editor = {
@ -23,33 +25,74 @@ in {
extensions = [ extensions = [
"catppuccin" "catppuccin"
"catppuccin-icons" "catppuccin-icons"
"comment"
"git-firefly"
"nix"
"perl"
"fish"
"lua"
"toml"
"csharp"
"java"
"latex"
"typst"
"haskell"
"glsl"
"mermaid"
"clojure"
"verilog"
"qml"
"plantuml"
"graphviz"
"dockerfile" "dockerfile"
"docker-compose" "docker-compose"
"html" "html"
"svelte" "xml"
"svelte-mcp" "scss"
"make"
"rainbow-csv" "rainbow-csv"
"sql" "sql"
"nix" "svelte"
"svelte-mcp"
"jinja2"
"just" "just"
"perl" "make"
"neocmake"
"assembly" "assembly"
"wat" "wat"
"neocmake"
"linkerscript" "linkerscript"
"r"
]; ];
themes = {}; themes = { };
userDebug = []; userDebug = [ ];
# TODO: Add neovim keymaps
userKeymaps = [ userKeymaps = [
{ {
context = "Workspace"; context = "Workspace";
bindings = { bindings = {
ctrl-shift-t = "workspace::NewTerminal"; "ctrl-/" = "terminal_panel::Toggle";
};
}
{
context = "Editor";
unbind = {
"ctrl-/" = [
"editor::ToggleComments"
{
advance_downwards = false;
}
];
};
}
{
context = "(vim_mode == normal || vim_mode == visual) && !menu";
bindings = {
"ctrl-c" = "editor::ToggleComments";
}; };
} }
]; ];
@ -70,6 +113,13 @@ in {
tree_view = true; tree_view = true;
}; };
# TODO: Doesn't work, although perlnavigator advertises Perl::Tidy autoformatting...
languages = {
Perl = {
formatter = "language_server";
};
};
auto_signature_help = true; auto_signature_help = true;
lsp = { lsp = {
nil = { nil = {
@ -82,10 +132,31 @@ in {
nixd = { nixd = {
initialization_options = { initialization_options = {
formatting = { formatting = {
command = ["${pkgs.alejandra}/bin/alejandra"]; command = [ "${pkgs.alejandra}/bin/alejandra" ];
}; };
}; };
}; };
# No idea how to configure the formatter
# perlnavigator-server = let
# # TODO: Duplicated in neovim/default.nix. Need Perl module.
# perl = pkgs.perl.withPackages (p:
# with p; [
# PLS
# PerlCritic
# PerlTidy
# NetOpenSSH
# DateTime
# DBI
# DBDMariaDB
# CursesUI
# TextCSV_XS
# ]);
# in {
# initialization_options = {
# "perlnavigator.perlPath" = "${perl}/bin";
# "perlnavigator.includePaths" = ["${perl}/lib/perl5"];
# };
# };
}; };
disable_ai = false; disable_ai = false;
@ -120,7 +191,7 @@ in {
}; };
}; };
userTasks = []; userTasks = [ ];
}; };
}; };
} }