mirror of
https://codeberg.org/muon/home.git
synced 2026-03-09 03:53:11 +00:00
Refactor terminal development
This commit is contained in:
parent
76d16b1348
commit
85c51ff9d0
7 changed files with 484 additions and 2133 deletions
91
modules/home/terminal/helix/default.nix
Normal file
91
modules/home/terminal/helix/default.nix
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
options.mods.helix.enable =
|
||||
lib.mkEnableOption "enables helix";
|
||||
|
||||
config = lib.mkIf config.mods.terminal.development.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Nix
|
||||
nil
|
||||
|
||||
# Rust
|
||||
rust-analyzer
|
||||
lldb_18
|
||||
|
||||
# Shaders
|
||||
glsl_analyzer
|
||||
wgsl-analyzer
|
||||
|
||||
# Python
|
||||
black
|
||||
];
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
package = pkgs.evil-helix;
|
||||
|
||||
settings = {
|
||||
keys.normal = {
|
||||
"esc" = ["collapse_selection" "keep_primary_selection"];
|
||||
"Z" = {
|
||||
"Q" = ":quit!";
|
||||
"Z" = ":write-quit!";
|
||||
};
|
||||
"V" = ["select_mode" "extend_to_line_bounds"];
|
||||
};
|
||||
editor = {
|
||||
line-number = "relative";
|
||||
completion-replace = true;
|
||||
bufferline = "always";
|
||||
rulers = [80];
|
||||
soft-wrap.enable = true;
|
||||
indent-guides.render = true;
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
languages.language-server = {
|
||||
glsl.command = "${pkgs.glsl_analyzer}/bin/glsl_analyzer";
|
||||
wgsl.command = "${pkgs.wgsl-analyzer}/bin/wgsl-analyzer";
|
||||
};
|
||||
|
||||
languages.language = [
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
|
||||
}
|
||||
{
|
||||
name = "rust";
|
||||
auto-format = true;
|
||||
formatter.command = "rustfmt";
|
||||
}
|
||||
{
|
||||
name = "glsl";
|
||||
language-servers = ["glsl"];
|
||||
}
|
||||
{
|
||||
name = "wgsl";
|
||||
language-servers = ["wgsl"];
|
||||
}
|
||||
{
|
||||
name = "python";
|
||||
auto-format = true;
|
||||
formatter = {
|
||||
command = "${pkgs.black}/bin/black";
|
||||
args = ["-" "--quiet" "--line-length=79"];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue