158 lines
4.9 KiB
Nix
158 lines
4.9 KiB
Nix
{ inputs, lib, pkgs, config, ...}: let
|
|
inherit (lib) mkIf mkEnableOption;
|
|
cfg = config.chuj.stuff.other-dev-programs;
|
|
user = config.chuj.system.user;
|
|
in {
|
|
options.chuj.stuff.other-dev-programs = {
|
|
enable = mkEnableOption "other-dev-programs";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = with pkgs; [
|
|
cmake
|
|
pkg-config
|
|
nixd
|
|
gdb
|
|
clang-tools
|
|
valgrind
|
|
linuxKernel.packages.linux_6_6.perf
|
|
ccache
|
|
];
|
|
|
|
programs.adb.enable = true;
|
|
|
|
home-manager.users.${user}.programs.zed-editor = {
|
|
enable = true;
|
|
package = (inputs.zed.packages.${pkgs.system}.zed-editor.overrideAttrs {
|
|
patches = [
|
|
../../files/zed-no-rounded-corners.patch
|
|
../../files/zed-replace-window.patch
|
|
];
|
|
});
|
|
extensions = [
|
|
"gdscript"
|
|
"make"
|
|
"nix"
|
|
"assembly"
|
|
"glsl"
|
|
"html"
|
|
];
|
|
userSettings = let
|
|
font = "Monaspace Xenon";
|
|
in {
|
|
# appearance and shit
|
|
theme = "MOJE";
|
|
buffer_font_family = font;
|
|
ui_font_family = font;
|
|
buffer_font_size = 13.5;
|
|
buffer_line_height.custom = 1.7;
|
|
ui_font_size = 16;
|
|
buffer_font_features.calt = false; # disable ligatures
|
|
git.inline_blame.enabled = false;
|
|
gutter = {
|
|
line_numbers = false;
|
|
code_actions = false;
|
|
runnables = false;
|
|
folds = false;
|
|
};
|
|
project_panel = {
|
|
folder_icons = false;
|
|
indent_size = 20;
|
|
auto_reveal_entries = false;
|
|
auto_fold_dirs = false;
|
|
};
|
|
|
|
terminal = {
|
|
line_height = "standard";
|
|
blinking = "on";
|
|
font_size = 13.5;
|
|
font_weight = 300;
|
|
working_directory = "first_project_directory";
|
|
detect_venv.on = {
|
|
directories = [".env" "env" ".venv" "venv"];
|
|
activate_script = "fish";
|
|
};
|
|
};
|
|
|
|
# language config crap
|
|
lsp.gdscript.binary.args = [ "127.0.0.1" "6005" ];
|
|
languages = {
|
|
Nix.tab_size = 2;
|
|
JSON.enable_language_server = false; # who up lsp'ing they json
|
|
JSONC.enable_language_server = false;
|
|
HTML.enable_language_server = false;
|
|
CSS.enable_language_server = false;
|
|
GDScript.hard_tabs = false;
|
|
};
|
|
file_types.C = [ "c" "h" ]; # i don't remember why
|
|
|
|
# editor behavior
|
|
auto_signature_help = true;
|
|
use_system_path_prompts = false;
|
|
soft_wrap = "editor_width";
|
|
seed_search_query_from_cursor = "selection";
|
|
double_click_in_multibuffer = "open";
|
|
preview_tabs.enabled = false;
|
|
format_on_save = "off";
|
|
auto_update = false;
|
|
middle_click_paste = false;
|
|
# this + files/zed-window-replace.patch is a workaround for
|
|
# https://github.com/zed-industries/zed/issues/18194
|
|
restore_on_startup = "none";
|
|
|
|
# disable stupid shit
|
|
assistant = {
|
|
enabled = false;
|
|
button = false;
|
|
};
|
|
features.inline_completion_provider = "none";
|
|
telemetry = {
|
|
diagnostics = false;
|
|
metrics = false;
|
|
};
|
|
|
|
# keymap
|
|
base_keymap = "JetBrains";
|
|
};
|
|
userKeymaps = let
|
|
context = ctx: stuff: { context = ctx; bindings = stuff; };
|
|
in [
|
|
(context "Editor" {
|
|
ctrl-b = "editor::GoToDefinition";
|
|
ctrl-y = "editor::Redo";
|
|
home = "editor::MoveToBeginningOfLine";
|
|
down = "editor::MoveDown"; # why is this here???
|
|
ctrl-r = ["buffer_search::Deploy" { replace_enabled = true; }];
|
|
pageup = null;
|
|
shift-pageup = null;
|
|
pagedown = null;
|
|
shift-pagedown = null;
|
|
# multi-cursor
|
|
ctrl-alt-up = "editor::AddSelectionAbove";
|
|
ctrl-alt-down = "editor::AddSelectionBelow";
|
|
})
|
|
(context "Pane" {
|
|
alt-left = "pane::ActivatePrevItem";
|
|
alt-right = "pane::ActivateNextItem";
|
|
"ctrl-k ctrl-up" = "pane::SplitUp";
|
|
"ctrl-k ctrl-down" = "pane::SplitDown";
|
|
"ctrl-k ctrl-left" = "pane::SplitLeft";
|
|
"ctrl-k ctrl-right" = "pane::SplitRight";
|
|
"ctrl-k up" = ["workspace::ActivatePaneInDirection" "Up"];
|
|
"ctrl-k down" = ["workspace::ActivatePaneInDirection" "Down"];
|
|
"ctrl-k left" = ["workspace::ActivatePaneInDirection" "Left"];
|
|
"ctrl-k right" = ["workspace::ActivatePaneInDirection" "Right"];
|
|
})
|
|
(context "Terminal" {
|
|
ctrl-w = "pane::CloseActiveItem";
|
|
})
|
|
(context "Editor && (showing_code_actons || showing_completions)" {
|
|
# yes, these are the defaults. for some reason "down"
|
|
# does not work unless we repeat it???
|
|
up = "editor::ContextMenuPrev";
|
|
down = "editor::ContextMenuNext";
|
|
})
|
|
];
|
|
};
|
|
};
|
|
}
|