huge
This commit is contained in:
@@ -57,7 +57,7 @@ in {
|
||||
variant =
|
||||
"colemak_dh"
|
||||
+ (
|
||||
if osConfig.module.host.name == "dunamis"
|
||||
if osConfig.unexplrd.host.name == "dunamis"
|
||||
then "_ortho"
|
||||
else ""
|
||||
)
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
};
|
||||
};
|
||||
in {
|
||||
polkit-agent = mkGraphicalService {
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = pkgs.mate.mate-polkit + "/libexec/polkit-mate-authentication-agent-1";
|
||||
};
|
||||
};
|
||||
# polkit-agent = mkGraphicalService {
|
||||
# Service = {
|
||||
# Type = "simple";
|
||||
# ExecStart = pkgs.mate.mate-polkit + "/libexec/polkit-mate-authentication-agent-1";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.atuin = {
|
||||
flags = [
|
||||
"--disable-up-arrow"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,15 @@
|
||||
{
|
||||
imports = [
|
||||
./atuin.nix
|
||||
./fish.nix
|
||||
./ghostty.nix
|
||||
./helix.nix
|
||||
./kitty.nix
|
||||
./oh-my-posh.nix
|
||||
./syncthing.nix
|
||||
./wezterm.nix
|
||||
./wl-kbptr.nix
|
||||
./yazi.nix
|
||||
./zed-editor.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe;
|
||||
in {
|
||||
programs.fish = {
|
||||
shellAliases = {
|
||||
cd = "z";
|
||||
ed = "$EDITOR";
|
||||
jf = "jj-fzf"; # think of jeff
|
||||
jo = "joshuto"; # think of josh
|
||||
l = "ls -lah";
|
||||
la = "ls -ah";
|
||||
ll = "ls -lh";
|
||||
p = "pueue";
|
||||
s = "systemctl";
|
||||
stui = "systemctl-tui";
|
||||
};
|
||||
shellAbbrs = {
|
||||
pa = "pueue add --";
|
||||
pl = "pueue log";
|
||||
};
|
||||
interactiveShellInit = ''
|
||||
bind \e\[3\;5~ kill-word
|
||||
bind \cH backward-kill-word
|
||||
set fish_greeting
|
||||
set fish_cursor_default block blink
|
||||
# ${getExe pkgs.bat-extras.batman} --export-env | source
|
||||
if test -e ~/.profile; source ~/.profile; end
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
perSystem,
|
||||
...
|
||||
}: {
|
||||
programs.ghostty = {
|
||||
package = perSystem.ghostty.ghostty;
|
||||
settings = {
|
||||
gtk-single-instance = true;
|
||||
window-decoration = "client";
|
||||
keybind = [
|
||||
"ctrl+shift+f=close_surface"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe;
|
||||
in {
|
||||
programs.helix = {
|
||||
# defaultEditor = true;
|
||||
settings = {
|
||||
editor = {
|
||||
bufferline = "multiple";
|
||||
cursorline = true;
|
||||
inline-diagnostics.cursor-line = "warning";
|
||||
line-number = "relative";
|
||||
lsp = {
|
||||
display-messages = true;
|
||||
display-inlay-hints = true;
|
||||
};
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
statusline = {
|
||||
left = ["mode" "spinner" "version-control"];
|
||||
center = ["file-name"];
|
||||
right = ["diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type"];
|
||||
separator = "|";
|
||||
};
|
||||
soft-wrap = {
|
||||
enable = true;
|
||||
max-wrap = 25;
|
||||
max-indent-retain = 0;
|
||||
wrap-indicator = "";
|
||||
};
|
||||
};
|
||||
keys = {
|
||||
insert.C-c = "normal_mode";
|
||||
normal = {
|
||||
esc = ["collapse_selection" "keep_primary_selection"];
|
||||
space = {
|
||||
space = "file_picker";
|
||||
w = ":w";
|
||||
q = ":q";
|
||||
x = ":x";
|
||||
n = ":n";
|
||||
"," = "goto_previous_buffer";
|
||||
"." = "goto_next_buffer";
|
||||
l = ":reflow";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
language-server = {
|
||||
# markdown-oxide.command = getExe pkgs.markdown-oxide;
|
||||
# nixd.command = getExe pkgs.nixd;
|
||||
# pyright = {
|
||||
# command = getExe pkgs.pyright;
|
||||
# args = ["-"];
|
||||
# };
|
||||
# rust-analyzer.command = getExe pkgs.rust-analyzer;
|
||||
# texlab.command = getExe pkgs.texlab;
|
||||
bash-language-server = {
|
||||
command = getExe pkgs.bash-language-server;
|
||||
environment = {
|
||||
"SHELLCHECK_PATH" = getExe pkgs.shellcheck;
|
||||
"SHFMT_PATH" = getExe pkgs.shfmt;
|
||||
};
|
||||
};
|
||||
clangd.command = "${pkgs.clang-tools}/bin/clangd";
|
||||
# fsac = {
|
||||
# command = getExe pkgs.fsautocomplete;
|
||||
# config = {
|
||||
# editor.formatOnSave = true;
|
||||
# AutomaticWorkspaceInit = true;
|
||||
# FSharp.ExternalAutocomplete = true;
|
||||
# FSharp.linting.fsharplint.enabled = true;
|
||||
# FSharp.linting.fsharplint.configFile = "fsharplint.json";
|
||||
# FSharp.formatting.fantomas.enabled = true;
|
||||
# };
|
||||
# };
|
||||
nil = {
|
||||
command = getExe pkgs.nil;
|
||||
config = {
|
||||
formatting.command = [(getExe pkgs.alejandra)];
|
||||
};
|
||||
};
|
||||
ruff = {
|
||||
command = getExe pkgs.ruff;
|
||||
args = ["server"];
|
||||
};
|
||||
tinymist.command = getExe pkgs.tinymist;
|
||||
vscode-json-language-server.command = getExe pkgs.nodePackages.vscode-json-languageserver;
|
||||
yaml-language-server.command = getExe pkgs.yaml-language-server;
|
||||
zk = {
|
||||
command = getExe pkgs.zk;
|
||||
args = ["lsp"];
|
||||
};
|
||||
};
|
||||
language = [
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
language-servers = ["nil"];
|
||||
}
|
||||
{
|
||||
name = "typst";
|
||||
auto-format = true;
|
||||
formatter.command = getExe pkgs.typstyle;
|
||||
language-servers = ["tinymist"];
|
||||
}
|
||||
{
|
||||
name = "markdown";
|
||||
# auto-format = true;
|
||||
language-servers = ["zk" "markdown-oxide"];
|
||||
}
|
||||
{
|
||||
name = "c";
|
||||
auto-format = true;
|
||||
# formatter.command = "${pkgs.clang-tools}/bin/clang-format";
|
||||
}
|
||||
{
|
||||
name = "cpp";
|
||||
auto-format = true;
|
||||
# formatter.command = "${pkgs.clang-tools}/bin/clang-format";
|
||||
}
|
||||
# {
|
||||
# name = "fsharp";
|
||||
# auto-format = true;
|
||||
# language-servers = ["fsac"];
|
||||
# scope = "source.fs";
|
||||
# roots = ["fsproj" "sln" ".git"];
|
||||
# }
|
||||
# {
|
||||
# name = "rust";
|
||||
# auto-format = true;
|
||||
# language-servers = ["rust-analyzer"];
|
||||
# formatter.command = getExe pkgs.rustfmt;
|
||||
# }
|
||||
{
|
||||
name = "json";
|
||||
auto-format = true;
|
||||
formatter.command = getExe pkgs.jq;
|
||||
language-servers = ["vscode-json-language-server"];
|
||||
}
|
||||
{
|
||||
name = "yaml";
|
||||
auto-format = true;
|
||||
formatter.command = getExe pkgs.yamlfmt;
|
||||
formatter.args = ["-"];
|
||||
language-servers = ["yaml-language-server"];
|
||||
}
|
||||
{
|
||||
name = "bash";
|
||||
auto-format = true;
|
||||
# formatter.command = getExe pkgs.shfmt;
|
||||
# formatter.args = ["-"];
|
||||
}
|
||||
{
|
||||
name = "python";
|
||||
auto-format = true;
|
||||
language-servers = [
|
||||
{
|
||||
name = "ruff";
|
||||
# only-features = ["format" "diagnostics"];
|
||||
}
|
||||
# {
|
||||
# name = "pyright";
|
||||
# except-features = ["format" "diagnostics"];
|
||||
# }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.kitty = {
|
||||
settings = {
|
||||
tab_bar_edge = "bottom";
|
||||
tab_bar_align = "left";
|
||||
tab_bar_style = "fade";
|
||||
# tab_separator = " ";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.oh-my-posh = {
|
||||
settings = {
|
||||
# version = 2;
|
||||
final_space = true;
|
||||
shell_integration = true;
|
||||
console_title_template = "{{ .Shell }} in {{ .Folder }}";
|
||||
blocks = [
|
||||
{
|
||||
type = "prompt";
|
||||
alignment = "left";
|
||||
overflow = "hidden";
|
||||
segments = [
|
||||
{
|
||||
type = "path";
|
||||
style = "plain";
|
||||
background = "transparent";
|
||||
foreground = "blue";
|
||||
template = "{{ .Path }}";
|
||||
properties = {
|
||||
style = "full";
|
||||
};
|
||||
}
|
||||
{
|
||||
type = "text";
|
||||
style = "plain";
|
||||
background = "transparent";
|
||||
template = "{{ if .Env.BW_SESSION }} {{ end }}";
|
||||
}
|
||||
{
|
||||
type = "nix-shell";
|
||||
style = "plain";
|
||||
background = "transparent";
|
||||
template = "{{ if ne .Type \"unknown\" }} {{ end }}";
|
||||
}
|
||||
{
|
||||
type = "git";
|
||||
style = "plain";
|
||||
foreground = "p:grey";
|
||||
background = "transparent";
|
||||
template = " {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} <cyan>{{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}</>";
|
||||
properties = {
|
||||
branch_icon = "";
|
||||
commit_icon = "@";
|
||||
fetch_status = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "prompt";
|
||||
alignment = "right";
|
||||
segments = [
|
||||
{
|
||||
type = "session";
|
||||
style = "plain";
|
||||
foreground = "white";
|
||||
background = "transparent";
|
||||
template = "{{ if .SSHSession }} {{ .UserName }}@{{ .HostName }}{{ end }}";
|
||||
}
|
||||
{
|
||||
style = "plain";
|
||||
foreground = "white";
|
||||
background = "transparent";
|
||||
properties = {
|
||||
charged_icon = "";
|
||||
charging_icon = "";
|
||||
discharging_icon = "";
|
||||
};
|
||||
template = "{{ if not .Error }} {{ .Icon }} {{ .Percentage }}%{{ end }}";
|
||||
type = "battery";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "rprompt";
|
||||
overflow = "hidden";
|
||||
segments = [
|
||||
{
|
||||
type = "executiontime";
|
||||
style = "plain";
|
||||
foreground = "yellow";
|
||||
background = "transparent";
|
||||
template = "{{.FormattedMs}}";
|
||||
properties = {
|
||||
threshold = 5000;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "prompt";
|
||||
alignment = "left";
|
||||
newline = true;
|
||||
segments = [
|
||||
{
|
||||
type = "text";
|
||||
style = "plain";
|
||||
foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"];
|
||||
background = "transparent";
|
||||
template = ">";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
transient_prompt = {
|
||||
foreground_templates = ["{{if gt .Code 0}}red{{end}}" "{{if eq .Code 0}}magenta{{end}}"];
|
||||
background = "transparent";
|
||||
template = "> ";
|
||||
};
|
||||
secondary_prompt = {
|
||||
foreground = "magenta";
|
||||
background = "transparent";
|
||||
template = "-> ";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
{
|
||||
config,
|
||||
# inputs,
|
||||
# pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.wezterm = {
|
||||
# package = inputs.wezterm.packages.${pkgs.system}.default;
|
||||
extraConfig = let
|
||||
arrows = {
|
||||
left = "LeftArrow";
|
||||
down = "DownArrow";
|
||||
up = "UpArrow";
|
||||
right = "RightArrow";
|
||||
};
|
||||
homerow-arrows = {
|
||||
left = "n";
|
||||
down = "e";
|
||||
up = "i";
|
||||
right = "o";
|
||||
};
|
||||
genNavigation = keys: ''
|
||||
{ key = '${keys.left}', mods = 'LEADER', action = act.ActivatePaneDirection 'Left' },
|
||||
{ key = '${keys.down}', mods = 'LEADER', action = act.ActivatePaneDirection 'Down' },
|
||||
{ key = '${keys.up}', mods = 'LEADER', action = act.ActivatePaneDirection 'Up' },
|
||||
{ key = '${keys.right}', mods = 'LEADER', action = act.ActivatePaneDirection 'Right' },
|
||||
{ key = '${keys.left}', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Left' },
|
||||
{ key = '${keys.down}', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Down' },
|
||||
{ key = '${keys.up}', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Up' },
|
||||
{ key = '${keys.right}', mods = 'CTRL|SHIFT', action = act.ActivatePaneDirection 'Right' },
|
||||
'';
|
||||
in
|
||||
# lua
|
||||
''
|
||||
local wezterm = require 'wezterm'
|
||||
local act = wezterm.action
|
||||
|
||||
local resurrect = wezterm.plugin.require("https://github.com/MLFlexer/resurrect.wezterm")
|
||||
local workspace_switcher = wezterm.plugin.require("https://github.com/MLFlexer/smart_workspace_switcher.wezterm")
|
||||
|
||||
wezterm.on("augment-command-palette", function(window, pane)
|
||||
local workspace_state = resurrect.workspace_state
|
||||
return {
|
||||
{
|
||||
brief = "Window | Workspace: Switch Workspace",
|
||||
icon = "md_briefcase_arrow_up_down",
|
||||
action = workspace_switcher.switch_workspace(),
|
||||
},
|
||||
{
|
||||
brief = "Window | Workspace: Rename Workspace",
|
||||
icon = "md_briefcase_edit",
|
||||
action = wezterm.action.PromptInputLine({
|
||||
description = "Enter new name for workspace",
|
||||
action = wezterm.action_callback(function(window, pane, line)
|
||||
if line then
|
||||
wezterm.mux.rename_workspace(wezterm.mux.get_active_workspace(), line)
|
||||
resurrect.state_manager.save_state(workspace_state.get_workspace_state())
|
||||
end
|
||||
end),
|
||||
}),
|
||||
},
|
||||
}
|
||||
end)
|
||||
|
||||
|
||||
return {
|
||||
front_end = 'WebGpu',
|
||||
unix_domains = {
|
||||
{
|
||||
name = 'unix',
|
||||
},
|
||||
},
|
||||
enable_kitty_graphics = true,
|
||||
window_padding = {
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
},
|
||||
use_fancy_tab_bar = false,
|
||||
inactive_pane_hsb = {
|
||||
-- saturation = 0.8,
|
||||
brightness = 0.7,
|
||||
},
|
||||
-- window_frame = {
|
||||
-- font = wezterm.font { family = 'Cantarell', weight = 'Bold' },
|
||||
-- },
|
||||
disable_default_key_bindings = true,
|
||||
leader = { key = 'Space', mods = 'CTRL', timeout_milliseconds = 2000 },
|
||||
keys = {
|
||||
{
|
||||
key = "w",
|
||||
mods = "LEADER",
|
||||
action = resurrect.window_state.save_window_action(),
|
||||
},
|
||||
{
|
||||
key = "t",
|
||||
mods = "LEADER",
|
||||
action = resurrect.tab_state.save_tab_action(),
|
||||
},
|
||||
{
|
||||
key = "s",
|
||||
mods = "LEADER",
|
||||
action = wezterm.action_callback(function(win, pane)
|
||||
resurrect.state_manager.save_state(resurrect.workspace_state.get_workspace_state())
|
||||
resurrect.window_state.save_window_action()
|
||||
end),
|
||||
},
|
||||
{
|
||||
key = "r",
|
||||
mods = "LEADER",
|
||||
action = wezterm.action_callback(function(win, pane)
|
||||
resurrect.fuzzy_loader.fuzzy_load(win, pane, function(id, label)
|
||||
local type = string.match(id, "^([^/]+)") -- match before '/'
|
||||
id = string.match(id, "([^/]+)$") -- match after '/'
|
||||
id = string.match(id, "(.+)%..+$") -- remove file extention
|
||||
local opts = {
|
||||
relative = true,
|
||||
restore_text = true,
|
||||
on_pane_restore = resurrect.tab_state.default_on_pane_restore,
|
||||
}
|
||||
if type == "workspace" then
|
||||
local state = resurrect.state_manager.load_state(id, "workspace")
|
||||
resurrect.workspace_state.restore_workspace(state, opts)
|
||||
elseif type == "window" then
|
||||
local state = resurrect.state_manager.load_state(id, "window")
|
||||
resurrect.window_state.restore_window(pane:window(), state, opts)
|
||||
elseif type == "tab" then
|
||||
local state = resurrect.state_manager.load_state(id, "tab")
|
||||
resurrect.tab_state.restore_tab(pane:tab(), state, opts)
|
||||
end
|
||||
end)
|
||||
end),
|
||||
},
|
||||
{
|
||||
key = "d",
|
||||
mods = "LEADER",
|
||||
action = wezterm.action_callback(function(win, pane)
|
||||
resurrect.fuzzy_loader.fuzzy_load(win, pane, function(id)
|
||||
resurrect.state_manager.delete_state(id)
|
||||
end,
|
||||
{
|
||||
title = "Delete State",
|
||||
description = "Select State to Delete and press Enter = accept, Esc = cancel, / = filter",
|
||||
fuzzy_description = "Search State to Delete: ",
|
||||
is_fuzzy = true,
|
||||
})
|
||||
end),
|
||||
},
|
||||
{
|
||||
key = 'p',
|
||||
mods = 'LEADER',
|
||||
action = wezterm.action.ActivateCommandPalette,
|
||||
},
|
||||
{ key = 'Enter', mods = 'SHIFT|CTRL', action = act.ActivateCopyMode },
|
||||
{ key = 'R', mods = 'SHIFT|CTRL', action = act.ReloadConfiguration },
|
||||
{ key = '=', mods = 'CTRL', action = act.IncreaseFontSize },
|
||||
{ key = '-', mods = 'CTRL', action = act.DecreaseFontSize },
|
||||
{ key = '0', mods = 'CTRL', action = act.ResetFontSize },
|
||||
{ key = 'C', mods = 'SHIFT|CTRL', action = act.CopyTo 'Clipboard' },
|
||||
-- { key = 'N', mods = 'SHIFT|CTRL', action = act.SpawnWindow },
|
||||
{ key = 'l', mods = 'SHIFT|CTRL', action = act.CharSelect{ copy_on_select = true, copy_to = 'ClipboardAndPrimarySelection' } },
|
||||
{ key = 'v', mods = 'SHIFT|CTRL', action = act.PasteFrom 'Clipboard' },
|
||||
{ key = '<', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(-1) },
|
||||
{ key = '>', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(1) },
|
||||
{ key = 'Tab', mods = 'CTRL|SHIFT', action = act.ActivateTabRelative(-1) },
|
||||
{ key = 'Tab', mods = 'CTRL', action = act.ActivateTabRelative(1) },
|
||||
{ key = '%', mods = 'SHIFT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' }, },
|
||||
{ key = '"', mods = 'SHIFT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' }, },
|
||||
-- pane navigation
|
||||
${genNavigation arrows}
|
||||
${genNavigation homerow-arrows}
|
||||
|
||||
{ key = 't', mods = 'SHIFT|CTRL', action = act.SpawnTab 'CurrentPaneDomain' },
|
||||
{ key = 'w', mods = 'SHIFT|CTRL', action = act.CloseCurrentTab{ confirm = false } },
|
||||
{ key = 'f', mods = 'SHIFT|CTRL', action = act.CloseCurrentPane{ confirm = false } },
|
||||
{ key = 'b', mods = 'LEADER|CTRL', action = act.SendString '\x02', },
|
||||
{ key = 'Enter', mods = 'LEADER', action = act.ActivateCopyMode, },
|
||||
-- { key = 'p', mods = 'LEADER', action = act.PasteFrom 'PrimarySelection', },
|
||||
{ key = 'k', mods = 'SHIFT|CTRL', action = act.Multiple
|
||||
{
|
||||
act.ClearScrollback 'ScrollbackAndViewport',
|
||||
act.SendKey { key = 'L', mods = 'CTRL' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
{
|
||||
pkgs,
|
||||
# config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.yazi = {
|
||||
shellWrapperName = "y";
|
||||
settings = {
|
||||
opener = {
|
||||
open = [
|
||||
{
|
||||
run = "xdg-open \"$@\"";
|
||||
orphan = true;
|
||||
desc = "Open";
|
||||
}
|
||||
];
|
||||
edit = [
|
||||
{
|
||||
run = "$EDITOR \"$@\"";
|
||||
block = true;
|
||||
desc = "Edit";
|
||||
}
|
||||
];
|
||||
dragdrop = [
|
||||
{
|
||||
run = "${lib.getExe pkgs.ripdrag} -ab \"$@\"";
|
||||
desc = "Drag'n'drop";
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
};
|
||||
open.rules = [
|
||||
{
|
||||
mime = "text/*";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.json";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.yaml";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.yml";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.toml";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.sh";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.ini";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.conf";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.csv";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.go";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.html";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.c";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.cpp";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.rs";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.nix";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*.py";
|
||||
use = ["edit" "open" "dragdrop"];
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
use = ["open" "edit" "dragdrop"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe mkForce;
|
||||
in {
|
||||
programs.zed-editor = {
|
||||
extensions = [
|
||||
"bash"
|
||||
"fsharp"
|
||||
"justfile"
|
||||
"nix"
|
||||
"typst"
|
||||
];
|
||||
userSettings = {
|
||||
vim_mode = true;
|
||||
ui_font_size = mkForce 16;
|
||||
buffer_font_size = mkForce 16;
|
||||
# features = {inline_completion_provider = "none";};
|
||||
auto_update = false;
|
||||
languages = {
|
||||
"FSharp" = {
|
||||
language-servers = [
|
||||
"fsautocomplete"
|
||||
];
|
||||
};
|
||||
"Nix" = {
|
||||
language-servers = [
|
||||
"nil"
|
||||
];
|
||||
# formatter = {
|
||||
# external.command = getExe pkgs.alejandra;
|
||||
# };
|
||||
};
|
||||
# "Rust" = {
|
||||
# formatter = {
|
||||
# external = {
|
||||
# command = getExe pkgs.rustfmt;
|
||||
# arguments = ["--edition" "2021"];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
"typst" = {
|
||||
language-servers = ["tinymist"];
|
||||
format_on_save = "on";
|
||||
# formatter = {
|
||||
# external = {
|
||||
# command = getExe pkgs.typstyle;
|
||||
# arguments = ["-i" "{buffer_path}"];
|
||||
# };
|
||||
# };
|
||||
};
|
||||
"Python" = {
|
||||
format_on_save = "on";
|
||||
formatter = [
|
||||
{
|
||||
language_server = {
|
||||
name = "ruff";
|
||||
};
|
||||
}
|
||||
];
|
||||
language_servers = ["ruff"];
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
bash-language-server = {
|
||||
binary = {
|
||||
path = getExe pkgs.bash-language-server;
|
||||
env = {
|
||||
"SHELLCHECK_PATH" = getExe pkgs.shellcheck;
|
||||
"SHFMT_PATH" = getExe pkgs.shfmt;
|
||||
};
|
||||
};
|
||||
};
|
||||
fsautocomplete = {
|
||||
binary = {
|
||||
path = getExe pkgs.fsautocomplete;
|
||||
};
|
||||
settings = {
|
||||
AutomaticWorkspaceInit = true;
|
||||
FSharp.ExternalAutocomplete = true;
|
||||
FSharp.linting.fsharplint.enabled = true;
|
||||
FSharp.linting.fsharplint.configFile = "fsharplint.json";
|
||||
FSharp.formatting.fantomas.enabled = true;
|
||||
};
|
||||
};
|
||||
clangd = {
|
||||
binary = {
|
||||
arguments = [];
|
||||
path = "${pkgs.clang-tools}/bin/clangd";
|
||||
};
|
||||
};
|
||||
# rust-analyzer = {
|
||||
# binary = {
|
||||
# arguments = [];
|
||||
# path = getExe pkgs.rust-analyzer;
|
||||
# };
|
||||
# };
|
||||
ruff = {
|
||||
binary = {
|
||||
arguments = [];
|
||||
path = getExe pkgs.ruff;
|
||||
};
|
||||
};
|
||||
# nixd = {
|
||||
# binary = {
|
||||
# arguments = [];
|
||||
# path = getExe pkgs.nixd;
|
||||
# };
|
||||
# initialization_options.formatting.command = [(getExe pkgs.alejandra)];
|
||||
# };
|
||||
nil = {
|
||||
binary = {
|
||||
arguments = [];
|
||||
path = getExe pkgs.nil;
|
||||
};
|
||||
settings.formatting.command = [(getExe pkgs.alejandra)];
|
||||
};
|
||||
# texlab = {
|
||||
# binary = {
|
||||
# arguments = [];
|
||||
# path = getExe pkgs.texlab;
|
||||
# };
|
||||
# };
|
||||
tinymist = {
|
||||
binary = {
|
||||
arguments = [];
|
||||
path = getExe pkgs.tinymist;
|
||||
};
|
||||
};
|
||||
vscode-json-language-server = {
|
||||
binary = {
|
||||
path = getExe pkgs.nodePackages.vscode-json-languageserver;
|
||||
};
|
||||
};
|
||||
yaml-language-server = {
|
||||
binary = {
|
||||
path = getExe pkgs.yaml-language-server;
|
||||
};
|
||||
};
|
||||
};
|
||||
telemetry = {
|
||||
diagnostics = false;
|
||||
metrics = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user