editors: add zed
This commit is contained in:
parent
127496a192
commit
a42505b7b1
3 changed files with 91 additions and 0 deletions
home/programs/editors/zed
22
home/programs/editors/zed/default.nix
Normal file
22
home/programs/editors/zed/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [./usersettings.nix ./userkeymap.nix];
|
||||
programs.zed-editor = {
|
||||
enable = false;
|
||||
package = pkgs.zed-editor.fhsWithPackages (pkgs: [pkgs.zlib pkgs.openssl]);
|
||||
extensions = [
|
||||
"html"
|
||||
"catppuccin"
|
||||
"toml"
|
||||
"git-firefly"
|
||||
"latex"
|
||||
"svelte"
|
||||
"scss"
|
||||
"nix"
|
||||
"env"
|
||||
"discord-presence"
|
||||
"wakatime"
|
||||
"nu"
|
||||
"gosum"
|
||||
];
|
||||
};
|
||||
}
|
15
home/programs/editors/zed/userkeymap.nix
Normal file
15
home/programs/editors/zed/userkeymap.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
_: {
|
||||
programs.zed-editor.userKeymaps = [
|
||||
{
|
||||
context = "Workspace";
|
||||
bindings = {
|
||||
ctrl-shift-t = "workspace::NewTerminal";
|
||||
};
|
||||
}
|
||||
{
|
||||
context = "Editor";
|
||||
bindings = {
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
54
home/programs/editors/zed/usersettings.nix
Normal file
54
home/programs/editors/zed/usersettings.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
_: {
|
||||
programs.zed-editor.userSettings = {
|
||||
ui_font_size = 16;
|
||||
ui_font_family = "JetBrainsMono Nerd Font";
|
||||
buffer_font_size = 16;
|
||||
buffer_font_family = "JetBrainsMono Nerd Font";
|
||||
relative_line_numbers = true;
|
||||
hour_format = "hour24";
|
||||
shell = "nu";
|
||||
tabs = {
|
||||
file_icons = true;
|
||||
git_status = true;
|
||||
};
|
||||
indent_guides = {
|
||||
enable = true;
|
||||
};
|
||||
inlay_hints = {
|
||||
enable = true;
|
||||
};
|
||||
telemetry = {
|
||||
diagnostics = false;
|
||||
metrics = false;
|
||||
};
|
||||
assistant = {
|
||||
default_model = {
|
||||
provider = "copilot_chat";
|
||||
model = "gpt-4o";
|
||||
};
|
||||
version = "2";
|
||||
};
|
||||
languages = {
|
||||
Nix = {
|
||||
language_servers = ["nil"];
|
||||
formatter = {
|
||||
external = {
|
||||
command = "alejandra";
|
||||
arguments = ["--quiet" "--"];
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
discord_presence = {
|
||||
initialization_options = {
|
||||
git_integration = false;
|
||||
rules = {
|
||||
mode = "blacklist";
|
||||
paths = ["/home/notoh/dev/ec" "/home/notoh/dev/yamilol"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue