hypr eco systems
This commit is contained in:
24
home/core/gui/browsers/default.nix
Normal file
24
home/core/gui/browsers/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
firefoxFlake = inputs.firefox-nightly.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
_firefoxNightly = firefoxFlake.firefox-nightly-bin;
|
||||
|
||||
_chromium = pkgs.ungoogled-chromium;
|
||||
# _mullvad = pkgs.mullvad-browser;
|
||||
in {
|
||||
home.packages = lib.mkMerge [
|
||||
(lib.mkIf (pkgs.hostPlatform.system == "x86_64-linux") (
|
||||
with pkgs; [
|
||||
# browsers
|
||||
_firefoxNightly
|
||||
pkgs.firefox-bin
|
||||
_chromium
|
||||
]
|
||||
))
|
||||
];
|
||||
}
|
||||
44
home/core/gui/discord/default.nix
Normal file
44
home/core/gui/discord/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [vesktop];
|
||||
|
||||
xdg.configFile."vesktop/themes/base16.css".text =
|
||||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
/**
|
||||
* @name Material Gruvbox
|
||||
* @.
|
||||
* @author Costeer
|
||||
* @version 1.5.0
|
||||
* @website https://github.com/Costeer
|
||||
* @source https://github.com/Costeer/Gruvbox-Material-Themes
|
||||
*/
|
||||
|
||||
@import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/DiscordRecolor/DiscordRecolor.css);
|
||||
|
||||
:root {
|
||||
--accentcolor: 137, 180, 130;
|
||||
--accentcolor2: 211, 134, 155;
|
||||
--linkcolor: 125, 174, 163;
|
||||
--mentioncolor: 211, 134, 155;
|
||||
--textbrightest: 221, 199, 161;
|
||||
--textbrighter: 212, 190, 152;
|
||||
--textbright: 168, 153, 132;
|
||||
--textdark: 146, 131, 116;
|
||||
--textdarker: 146, 131, 116;
|
||||
--textdarkest: 80, 80, 80;
|
||||
--font: Input Sans Narrow;
|
||||
--main-font: Input Sans Narrow;
|
||||
--code-font: Input Mono Compressed;
|
||||
--backgroundaccent: 80, 73, 69;
|
||||
--backgroundprimary: 60, 56, 54;
|
||||
--backgroundsecondary: 50, 48, 47;
|
||||
--backgroundsecondaryalt: 40, 40, 40;
|
||||
--backgroundtertiary: 29, 32, 33;
|
||||
--backgroundfloating: 20, 22, 23;
|
||||
--settingsicons: 1;
|
||||
}
|
||||
|
||||
'';
|
||||
}
|
||||
12
home/core/gui/lutris/default.nix
Normal file
12
home/core/gui/lutris/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = [
|
||||
(pkgs.lutris.override {
|
||||
extraPkgs = p: [
|
||||
p.wineWowPackages.staging
|
||||
p.pixman
|
||||
p.libjpeg
|
||||
p.gnome.zenity
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
8
home/core/gui/mangohud/default.nix
Normal file
8
home/core/gui/mangohud/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
programs.mangohud = {
|
||||
enable = true;
|
||||
settings = {
|
||||
full = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
27
home/core/services/hypr/idle/default.nix
Normal file
27
home/core/services/hypr/idle/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
importantPrefixes = [
|
||||
"$lock_cmd = pidof hyprlock || hyprlock"
|
||||
"$suspend_cmd = pidof steam || systemctl suspend || loginctl suspend"
|
||||
];
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "$lock_cmd";
|
||||
before_sleep_cmd = "$lock_cmd";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 900; # 15mins
|
||||
on-timeout = "$lock_cmd";
|
||||
}
|
||||
{
|
||||
timeout = 1200; # 20mins
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
69
home/core/services/hypr/lock/default.nix
Normal file
69
home/core/services/hypr/lock/default.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = false;
|
||||
no_fade_in = true;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
path = "/src/wallpaper.png";
|
||||
blur_size = 3;
|
||||
blur_passes = 2;
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
size = "200, 50";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.33;
|
||||
dots_spacing = 0.15;
|
||||
dots_center = true;
|
||||
dots_rounding = -1;
|
||||
outer_color = "rgba(3B3B3B55)";
|
||||
inner_color = "rgba(33333311)";
|
||||
font_color = "rgba(FFFFFFFF)";
|
||||
fade_on_empty = true;
|
||||
fade_timeout = 5000;
|
||||
placeholder_text = "";
|
||||
hide_input = false;
|
||||
rounding = -1;
|
||||
check_color = "rgb(204, 136, 34)";
|
||||
failed_color = "rgb(204, 34, 34)";
|
||||
}
|
||||
];
|
||||
label = [
|
||||
{
|
||||
# Clock
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] echo '$TIME'";
|
||||
shadow_passes = 1;
|
||||
shadow_boost = 0.5;
|
||||
color = "rgba(FFFFFFFF)";
|
||||
font_size = 85;
|
||||
font_family = "Input Mono";
|
||||
position = "0, 300";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
# Date
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] echo '$(date -I)'";
|
||||
shadow_passes = 1;
|
||||
shadow_boost = 0.5;
|
||||
color = "rgba(FFFFFFFF)";
|
||||
font_size = 25;
|
||||
font_family = "Input Mono Compressed";
|
||||
|
||||
position = "0, 280";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
17
home/core/services/hypr/paper/default.nix
Normal file
17
home/core/services/hypr/paper/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
splash_offset = 2.0;
|
||||
|
||||
preload = ["./src/nix.png" "./src/wallpaper.png"];
|
||||
|
||||
wallpaper = [
|
||||
"DP-3,./src/wallpaper.png"
|
||||
# "DP-1,/share/wallpapers/cat_pacman.png"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
home/core/services/hypr/paper/src/nix.png
Normal file
BIN
home/core/services/hypr/paper/src/nix.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
BIN
home/core/services/hypr/paper/src/wallpaper.png
Normal file
BIN
home/core/services/hypr/paper/src/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 638 KiB |
232
home/core/tui/foot/default.nix
Normal file
232
home/core/tui/foot/default.nix
Normal file
@@ -0,0 +1,232 @@
|
||||
{pkgs, ...}: {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
package = pkgs.foot;
|
||||
settings = {
|
||||
# -*- conf -*-
|
||||
|
||||
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
|
||||
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
|
||||
# login-shell=no
|
||||
|
||||
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
|
||||
# title=foot
|
||||
# locked-title=no
|
||||
|
||||
# font=monospace:size=8
|
||||
# font-bold=<bold variant of regular font>
|
||||
# font-italic=<italic variant of regular font>
|
||||
# font-bold-italic=<bold+italic variant of regular font>
|
||||
# font-size-adjustment=0.5
|
||||
# line-height=<font metrics>
|
||||
# letter-spacing=0
|
||||
# horizontal-letter-offset=0
|
||||
# vertical-letter-offset=0
|
||||
# underline-offset=<font metrics>
|
||||
# underline-thickness=<font underline thickness>
|
||||
# box-drawings-uses-font-glyphs=no
|
||||
# dpi-aware=no
|
||||
|
||||
# initial-window-size-pixels=700x500 # Or,
|
||||
# initial-window-size-chars=<COLSxROWS>
|
||||
# initial-window-mode=windowed
|
||||
# pad=0x0 # optionally append 'center'
|
||||
# resize-by-cells=yes
|
||||
# resize-delay-ms=100
|
||||
|
||||
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
|
||||
|
||||
# bold-text-in-bright=no
|
||||
# word-delimiters=,│`|:"'()[]{}<>
|
||||
# selection-target=primary
|
||||
# workers=<number of logical CPUs>
|
||||
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux)
|
||||
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD)
|
||||
|
||||
main = {
|
||||
font = "Input Mono Compressed:size=10";
|
||||
dpi-aware = "yes";
|
||||
pad = "3x1";
|
||||
};
|
||||
|
||||
environment = {
|
||||
# name=value
|
||||
};
|
||||
|
||||
bell = {
|
||||
urgent = "no";
|
||||
notify = "no";
|
||||
visual = "no";
|
||||
command = "no";
|
||||
command-focused = "no";
|
||||
};
|
||||
|
||||
scrollback = {
|
||||
lines = "100";
|
||||
# multiplier=3.0
|
||||
# indicator-position=relative
|
||||
# indicator-format=""
|
||||
};
|
||||
|
||||
url = {
|
||||
# launch=xdg-open ${url}
|
||||
# label-letters=sadfjklewcmpgh
|
||||
# osc8-underline=url-mode
|
||||
# protocols=http, https, ftp, ftps, file, gemini, gopher
|
||||
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
|
||||
};
|
||||
|
||||
cursor = {
|
||||
style = "block";
|
||||
# color=<inverse foreground/background>
|
||||
blink = "no";
|
||||
# blink-rate=500
|
||||
# beam-thickness=1.5
|
||||
# underline-thickness=<font underline thickness>
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hide-when-typing = "no";
|
||||
# alternate-scroll-mode=yes
|
||||
};
|
||||
|
||||
touch = {
|
||||
# long-press-delay=400
|
||||
};
|
||||
|
||||
colors = {
|
||||
alpha = "0.9";
|
||||
background = "282828";
|
||||
foreground = "ebdbb2";
|
||||
regular0 = "282828";
|
||||
regular1 = "cc241d";
|
||||
regular2 = "98971a";
|
||||
regular3 = "d79921";
|
||||
regular4 = "458588";
|
||||
regular5 = "b16286";
|
||||
regular6 = "689d6a";
|
||||
regular7 = "a89984";
|
||||
bright0 = "928374";
|
||||
bright1 = "fb4934";
|
||||
bright2 = "b8bb26";
|
||||
bright3 = "fabd2f";
|
||||
bright4 = "83a598";
|
||||
bright5 = "d3869b";
|
||||
bright6 = "8ec07c";
|
||||
bright7 = "ebdbb2";
|
||||
};
|
||||
|
||||
csd = {
|
||||
# preferred=server
|
||||
# size=26
|
||||
# font=<primary font>
|
||||
# color=<foreground color>
|
||||
# hide-when-maximized=no
|
||||
# double-click-to-maximize=yes
|
||||
# border-width=0
|
||||
# border-color=<csd.color>
|
||||
# button-width=26
|
||||
# button-color=<background color>
|
||||
# button-minimize-color=<regular4>
|
||||
# button-maximize-color=<regular2>
|
||||
# button-close-color=<regular1>
|
||||
};
|
||||
|
||||
key-bindings = {
|
||||
# scrollback-up-page=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# scrollback-down-half-page=none
|
||||
# scrollback-down-line=none
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
# clipboard-copy=Control+Shift+c XF86Copy
|
||||
# clipboard-paste=Control+Shift+v XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# search-start=Control+Shift+r
|
||||
# font-increase=Control+plus Control+equal Control+KP_Add
|
||||
# font-decrease=Control+minus Control+KP_Subtract
|
||||
# font-reset=Control+0 Control+KP_0
|
||||
# spawn-terminal=Control+Shift+n
|
||||
# minimize=none
|
||||
# maximize=none
|
||||
# fullscreen=none
|
||||
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-selected=[xargs -r firefox] none
|
||||
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
|
||||
# show-urls-launch=Control+Shift+o
|
||||
# show-urls-copy=none
|
||||
# show-urls-persistent=none
|
||||
# prompt-prev=Control+Shift+z
|
||||
# prompt-next=Control+Shift+x
|
||||
# unicode-input=Control+Shift+u
|
||||
# noop=none
|
||||
};
|
||||
|
||||
search-bindings = {
|
||||
# cancel=Control+g Control+c Escape
|
||||
# commit=Return
|
||||
# find-prev=Control+r
|
||||
# find-next=Control+s
|
||||
# cursor-left=Left Control+b
|
||||
# cursor-left-word=Control+Left Mod1+b
|
||||
# cursor-right=Right Control+f
|
||||
# cursor-right-word=Control+Right Mod1+f
|
||||
# cursor-home=Home Control+a
|
||||
# cursor-end=End Control+e
|
||||
# delete-prev=BackSpace
|
||||
# delete-prev-word=Mod1+BackSpace Control+BackSpace
|
||||
# delete-next=Delete
|
||||
# delete-next-word=Mod1+d Control+Delete
|
||||
# extend-char=Shift+Right
|
||||
# extend-to-word-boundary=Control+w Control+Shift+Right
|
||||
# extend-to-next-whitespace=Control+Shift+w
|
||||
# extend-line-down=Shift+Down
|
||||
# extend-backward-char=Shift+Left
|
||||
# extend-backward-to-word-boundary=Control+Shift+Left
|
||||
# extend-backward-to-next-whitespace=none
|
||||
# extend-line-up=Shift+Up
|
||||
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# unicode-input=none
|
||||
# quit=none
|
||||
# scrollback-up-page=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# scrollback-down-half-page=none
|
||||
# scrollback-down-line=none
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
};
|
||||
|
||||
url-bindings = {
|
||||
# cancel=Control+g Control+c Control+d Escape
|
||||
# toggle-url-visible=t
|
||||
};
|
||||
|
||||
text-bindings = {
|
||||
# \x03=Mod4+c # Map Super+c -> Ctrl+c
|
||||
};
|
||||
|
||||
mouse-bindings = {
|
||||
# scrollback-up-mouse=BTN_BACK
|
||||
# scrollback-down-mouse=BTN_FORWARD
|
||||
# selection-override-modifiers=Shift
|
||||
# primary-paste=BTN_MIDDLE
|
||||
# select-begin=BTN_LEFT
|
||||
# select-begin-block=Control+BTN_LEFT
|
||||
# select-extend=BTN_RIGHT
|
||||
# select-extend-character-wise=Control+BTN_RIGHT
|
||||
# select-word=BTN_LEFT-2
|
||||
# select-word-whitespace=Control+BTN_LEFT-2
|
||||
# select-quote = BTN_LEFT-3
|
||||
# select-row=BTN_LEFT-4
|
||||
};
|
||||
|
||||
# vim: ft=dosini
|
||||
};
|
||||
};
|
||||
}
|
||||
42
home/core/tui/kitty/default.nix
Normal file
42
home/core/tui/kitty/default.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
theme = "Gruvbox Material Dark Soft";
|
||||
settings = {
|
||||
enable_audio_bell = false;
|
||||
open_url_with = "firefox-nightly";
|
||||
font_family = "Input Mono Extra Light";
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
font_size = "11.0";
|
||||
cursor_blink_interval = 0;
|
||||
cursor_beam_thickness = 3;
|
||||
copy_on_select = true;
|
||||
background_opacity = "0.95";
|
||||
background_blur = "32";
|
||||
window_padding_width = 3;
|
||||
tab_bar_min_tabs = 1;
|
||||
tab_bar_edge = "bottom";
|
||||
tab_bar_style = "separator";
|
||||
tab_bar_margin_width = "0.0";
|
||||
tab_bar_margin_height = "0.0 0.0";
|
||||
active_tab_font_style = "bold";
|
||||
tab_title_max_length = 30;
|
||||
# colors
|
||||
active_tab_foreground = "#32302f";
|
||||
active_tab_background = "#8bba7f";
|
||||
inactive_tab_foreground = "#665C54";
|
||||
inactive_tab_background = "#6f8352";
|
||||
tab_bar_background = "#504945";
|
||||
};
|
||||
extraConfig = ''
|
||||
kitty_mod ctrl
|
||||
map kitty_mod+q close_tab
|
||||
map ctrl+shift+c copy_to_clipboard
|
||||
map ctrl+shift+v paste_from_clipboard
|
||||
tab_separator " | "
|
||||
tab_title_template "{fmt.fg.tab}{title[:30]}"
|
||||
'';
|
||||
};
|
||||
}
|
||||
31
home/core/tui/neovim/autocommands.nix
Normal file
31
home/core/tui/neovim/autocommands.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
programs.nixvim.autoCmd = [
|
||||
# Open help in a vertical split
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = "help";
|
||||
command = "wincmd L";
|
||||
}
|
||||
|
||||
# Enable spellcheck for some filetypes
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = [
|
||||
"tex"
|
||||
"latex"
|
||||
"markdown"
|
||||
];
|
||||
command = "setlocal spell spelllang=en,se";
|
||||
}
|
||||
{
|
||||
event = "TextYankPost";
|
||||
desc = "Highlight when yanking (copying) text";
|
||||
# group = "vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true })";
|
||||
callback = {
|
||||
__raw = "function()
|
||||
vim.highlight.on_yank()
|
||||
end";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
53
home/core/tui/neovim/completion.nix
Normal file
53
home/core/tui/neovim/completion.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
opts.completeopt = ["menu" "menuone" "noselect"];
|
||||
|
||||
plugins = {
|
||||
luasnip.enable = true;
|
||||
|
||||
lspkind = {
|
||||
enable = true;
|
||||
|
||||
cmp = {
|
||||
enable = true;
|
||||
menu = {
|
||||
nvim_lsp = "[LSP]";
|
||||
nvim_lua = "[api]";
|
||||
path = "[path]";
|
||||
luasnip = "[snip]";
|
||||
buffer = "[buffer]";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cmp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
|
||||
mapping = {
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
};
|
||||
|
||||
sources = [
|
||||
{name = "path";}
|
||||
{name = "nvim_lsp";}
|
||||
{name = "luasnip";}
|
||||
{
|
||||
name = "buffer";
|
||||
# Words from other open buffers can also be suggested.
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
home/core/tui/neovim/default.nix
Normal file
23
home/core/tui/neovim/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./autocommands.nix
|
||||
./completion.nix
|
||||
./keymappings.nix
|
||||
./options.nix
|
||||
./plugins
|
||||
./todo.nix
|
||||
];
|
||||
|
||||
home.shellAliases.v = "nvim";
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
luaLoader.enable = true;
|
||||
};
|
||||
}
|
||||
94
home/core/tui/neovim/keymappings.nix
Normal file
94
home/core/tui/neovim/keymappings.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
|
||||
keymaps = let
|
||||
normal =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "n";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
# "<C-c>" = "<cmd> %y+ <CR>";
|
||||
"<C-v>" = "p";
|
||||
"<C-a>" = "ggVG";
|
||||
"<Space>" = "<NOP>";
|
||||
|
||||
# Esc to clear search results
|
||||
"<esc>" = ":noh<CR>";
|
||||
|
||||
# fix Y behaviour
|
||||
Y = "y$";
|
||||
|
||||
# back and fourth between the two most recent files
|
||||
"<C-c>" = ":b#<CR>";
|
||||
|
||||
# close by Ctrl+x
|
||||
"<C-x>" = ":close<CR>";
|
||||
|
||||
# save by Space+s or Ctrl+s
|
||||
"<leader>s" = ":w<CR>";
|
||||
"<C-s>" = ":w<CR>";
|
||||
|
||||
# navigate to left/right window
|
||||
"<leader>h" = "<C-w>h";
|
||||
"<leader>l" = "<C-w>l";
|
||||
|
||||
# Press 'H', 'L' to jump to start/end of a line (first/last character)
|
||||
L = "$";
|
||||
H = "^";
|
||||
|
||||
# resize with arrows
|
||||
"<C-Up>" = ":resize -2<CR>";
|
||||
"<C-Down>" = ":resize +2<CR>";
|
||||
"<C-Left>" = ":vertical resize +2<CR>";
|
||||
"<C-Right>" = ":vertical resize -2<CR>";
|
||||
|
||||
# move current line up/down
|
||||
# M = Alt key
|
||||
"<M-k>" = ":move-2<CR>";
|
||||
"<M-j>" = ":move+<CR>";
|
||||
|
||||
"<leader>rp" = ":!remi push<CR>";
|
||||
};
|
||||
visual =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "v";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
"<C-c>" = "y";
|
||||
# better indenting
|
||||
">" = ">gv";
|
||||
"<" = "<gv";
|
||||
"<TAB>" = ">gv";
|
||||
"<S-TAB>" = "<gv";
|
||||
|
||||
# move selected line / block of text in visual mode
|
||||
"K" = ":m '<-2<CR>gv=gv";
|
||||
"J" = ":m '>+1<CR>gv=gv";
|
||||
};
|
||||
insert =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "i";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
"<C-v>" = "<esc>p";
|
||||
};
|
||||
in
|
||||
config.nixvim.helpers.keymaps.mkKeymaps
|
||||
{options.silent = true;}
|
||||
(normal ++ visual ++ insert);
|
||||
};
|
||||
}
|
||||
72
home/core/tui/neovim/options.nix
Normal file
72
home/core/tui/neovim/options.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
globals = {
|
||||
# Disable useless providers
|
||||
loaded_ruby_provider = 0; # Ruby
|
||||
loaded_perl_provider = 0; # Perl
|
||||
loaded_python_provider = 0; # Python 2
|
||||
};
|
||||
|
||||
clipboard = {
|
||||
# Use system clipboard
|
||||
register = "unnamedplus";
|
||||
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
|
||||
opts = {
|
||||
updatetime = 100; # Faster completion
|
||||
|
||||
# Line numbers
|
||||
relativenumber = false; # Relative line numbers
|
||||
number = true; # Display the absolute line number of the current line
|
||||
hidden = true; # Keep closed buffer open in the background
|
||||
showmode = false;
|
||||
mouse = "a"; # Enable mouse control
|
||||
mousemodel = "popup"; # Mouse right-click extends the current selection
|
||||
splitbelow = true; # A new window is put below the current one
|
||||
splitright = true; # A new window is put right of the current one
|
||||
list = true;
|
||||
listchars = {
|
||||
tab = "▷ ";
|
||||
trail = "·";
|
||||
nbsp = "○";
|
||||
extends = "◣";
|
||||
precedes = "◢";
|
||||
};
|
||||
|
||||
swapfile = false; # Disable the swap file
|
||||
modeline = true; # Tags such as 'vim:ft=sh'
|
||||
modelines = 100; # Sets the type of modelines
|
||||
undofile = true; # Automatically save and restore undo history
|
||||
incsearch = true; # Incremental search: show match for partly typed search command
|
||||
inccommand = "split"; # Search and replace: preview changes in quickfix list
|
||||
ignorecase = true; # When the search query is lower-case, match both lower and upper-case
|
||||
# patterns
|
||||
smartcase = true; # Override the 'ignorecase' option if the search pattern contains upper
|
||||
# case characters
|
||||
scrolloff = 4; # Number of screen lines to show around the cursor
|
||||
cursorline = true; # Highlight the screen line of the cursor
|
||||
cursorcolumn = false; # Highlight the screen column of the cursor
|
||||
signcolumn = "yes"; # Whether to show the signcolumn
|
||||
colorcolumn = ""; # Columns to highlight
|
||||
laststatus = 3; # When to use a status line for the last window
|
||||
fileencoding = "utf-8"; # File-content encoding for the current buffer
|
||||
# termguicolors = true; # Enables 24-bit RGB color in the |TUI|
|
||||
spell = false; # Highlight spelling mistakes (local to window)
|
||||
wrap = false; # Prevent text from wrapping
|
||||
|
||||
# Tab options
|
||||
tabstop = 4; # Number of spaces a <Tab> in the text stands for (local to buffer)
|
||||
shiftwidth = 4; # Number of spaces used for each step of (auto)indent (local to buffer)
|
||||
expandtab = true; # Expand <Tab> to spaces in Insert mode (local to buffer)
|
||||
autoindent = true; # Do clever autoindenting
|
||||
|
||||
textwidth = 0; # Maximum width of text that is being inserted. A longer line will be
|
||||
# broken after white space to get this width.
|
||||
|
||||
# Folding
|
||||
foldlevel = 99; # Folds with a level higher than this number will be closed
|
||||
};
|
||||
};
|
||||
}
|
||||
10
home/core/tui/neovim/plugins/barbar.nix
Normal file
10
home/core/tui/neovim/plugins/barbar.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.nixvim.plugins.barbar = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
next.key = "<TAB>";
|
||||
previous.key = "<S-TAB>";
|
||||
close.key = "<C-w>";
|
||||
};
|
||||
};
|
||||
}
|
||||
10
home/core/tui/neovim/plugins/comment.nix
Normal file
10
home/core/tui/neovim/plugins/comment.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.nixvim.plugins.comment = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
opleader.line = "<C-b>";
|
||||
toggler.line = "<C-b>";
|
||||
};
|
||||
};
|
||||
}
|
||||
24
home/core/tui/neovim/plugins/conform.nix
Normal file
24
home/core/tui/neovim/plugins/conform.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
formatOnSave = {
|
||||
lspFallback = true;
|
||||
timeoutMs = 500;
|
||||
};
|
||||
notifyOnError = true;
|
||||
formattersByFt = {
|
||||
liquidsoap = [ "liquidsoap-prettier" ];
|
||||
html = [ [ "prettierd" "prettier" ] ];
|
||||
css = [ [ "prettierd" "prettier" ] ];
|
||||
javascript = [ [ "prettierd" "prettier" ] ];
|
||||
javascriptreact = [ [ "prettierd" "prettier" ] ];
|
||||
typescript = [ [ "prettierd" "prettier" ] ];
|
||||
typescriptreact = [ [ "prettierd" "prettier" ] ];
|
||||
python = [ "black" ];
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "alejandra" ];
|
||||
markdown = [ [ "prettierd" "prettier" ] ];
|
||||
yaml = [ "yamllint" "yamlfmt" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
59
home/core/tui/neovim/plugins/default.nix
Normal file
59
home/core/tui/neovim/plugins/default.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./barbar.nix
|
||||
./comment.nix
|
||||
./efm.nix
|
||||
# ./floaterm.nix
|
||||
# ./harpoon.nix
|
||||
./lsp.nix
|
||||
./lualine.nix
|
||||
./markdown-preview.nix
|
||||
./neo-tree.nix
|
||||
./startify.nix
|
||||
./tagbar.nix
|
||||
./telescope.nix
|
||||
./treesitter.nix
|
||||
# ./vimtex.nix
|
||||
./nonels.nix
|
||||
./conform.nix
|
||||
# ./yanky.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
extraPlugins = [pkgs.vimPlugins.gruvbox-material];
|
||||
colorscheme = "gruvbox-material";
|
||||
|
||||
plugins = {
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
settings.signs = {
|
||||
add.text = "+";
|
||||
change.text = "~";
|
||||
};
|
||||
};
|
||||
|
||||
nvim-autopairs.enable = true;
|
||||
|
||||
nvim-colorizer = {
|
||||
enable = true;
|
||||
userDefaultOptions.names = false;
|
||||
};
|
||||
|
||||
oil.enable = true;
|
||||
|
||||
trim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight = false;
|
||||
ft_blocklist = [
|
||||
"checkhealth"
|
||||
"floaterm"
|
||||
"lspinfo"
|
||||
"neo-tree"
|
||||
"TelescopePrompt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
home/core/tui/neovim/plugins/efm.nix
Normal file
22
home/core/tui/neovim/plugins/efm.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
lsp.servers.efm = {
|
||||
enable = true;
|
||||
extraOptions.init_options = {
|
||||
documentFormatting = true;
|
||||
documentRangeFormatting = true;
|
||||
hover = true;
|
||||
documentSymbol = true;
|
||||
codeAction = true;
|
||||
completion = true;
|
||||
};
|
||||
};
|
||||
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
lspServersToEnable = ["efm"];
|
||||
};
|
||||
|
||||
efmls-configs.enable = true;
|
||||
};
|
||||
}
|
||||
12
home/core/tui/neovim/plugins/floaterm.nix
Normal file
12
home/core/tui/neovim/plugins/floaterm.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
programs.nixvim.plugins.floaterm = {
|
||||
enable = true;
|
||||
|
||||
width = 0.8;
|
||||
height = 0.8;
|
||||
|
||||
title = "";
|
||||
|
||||
keymaps.toggle = "<leader>,";
|
||||
};
|
||||
}
|
||||
20
home/core/tui/neovim/plugins/harpoon.nix
Normal file
20
home/core/tui/neovim/plugins/harpoon.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.harpoon = {
|
||||
enable = true;
|
||||
|
||||
keymapsSilent = true;
|
||||
|
||||
keymaps = {
|
||||
addFile = "<leader>a";
|
||||
toggleQuickMenu = "<C-e>";
|
||||
navFile = {
|
||||
"1" = "<C-j>";
|
||||
"2" = "<C-k>";
|
||||
"3" = "<C-l>";
|
||||
"4" = "<C-m>";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
84
home/core/tui/neovim/plugins/lsp.nix
Normal file
84
home/core/tui/neovim/plugins/lsp.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
# Navigate in diagnostics
|
||||
"<leader>k" = "goto_prev";
|
||||
"<leader>j" = "goto_next";
|
||||
};
|
||||
|
||||
lspBuf = {
|
||||
gd = "definition";
|
||||
gD = "references";
|
||||
gt = "type_definition";
|
||||
gi = "implementation";
|
||||
K = "hover";
|
||||
"<F2>" = "rename";
|
||||
};
|
||||
};
|
||||
|
||||
# Language server
|
||||
servers = {
|
||||
# Average webdev LSPs
|
||||
cssls.enable = true; # CSS
|
||||
tailwindcss.enable = true; # TailwindCSS
|
||||
html.enable = true; # HTML
|
||||
astro.enable = true; # AstroJS
|
||||
phpactor.enable = true; # PHP
|
||||
svelte.enable = false; # Svelte
|
||||
vuels.enable = false; # Vue
|
||||
|
||||
# Python
|
||||
pyright.enable = true;
|
||||
|
||||
# Markdown
|
||||
marksman.enable = true;
|
||||
|
||||
# Nix
|
||||
nil-ls.enable = true;
|
||||
|
||||
# Docker
|
||||
dockerls.enable = true;
|
||||
|
||||
# Bash
|
||||
bashls.enable = true;
|
||||
|
||||
# C/C++
|
||||
clangd.enable = true;
|
||||
|
||||
# C#
|
||||
csharp-ls.enable = true;
|
||||
|
||||
# Lua
|
||||
lua-ls = {
|
||||
enable = true;
|
||||
settings.telemetry.enable = false;
|
||||
settings.diagnostics = {
|
||||
globals = ["vim"];
|
||||
};
|
||||
};
|
||||
tsserver = {
|
||||
enable = false; # TS/JS
|
||||
};
|
||||
# Rust
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installRustc = true;
|
||||
installCargo = true;
|
||||
settings = {
|
||||
checkOnSave = true;
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
47
home/core/tui/neovim/plugins/lualine.nix
Normal file
47
home/core/tui/neovim/plugins/lualine.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
theme = "gruvbox-material";
|
||||
|
||||
globalstatus = true;
|
||||
|
||||
# +-------------------------------------------------+
|
||||
# | A | B | C X | Y | Z |
|
||||
# +-------------------------------------------------+
|
||||
sections = {
|
||||
lualine_a = ["mode"];
|
||||
lualine_b = ["branch"];
|
||||
lualine_c = ["filename" "diff"];
|
||||
|
||||
lualine_x = [
|
||||
"diagnostics"
|
||||
|
||||
# Show active language server
|
||||
{
|
||||
name.__raw = ''
|
||||
function()
|
||||
local msg = ""
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then
|
||||
return msg
|
||||
end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
return client.name
|
||||
end
|
||||
end
|
||||
return msg
|
||||
end
|
||||
'';
|
||||
icon = "";
|
||||
color.fg = "#ffffff";
|
||||
}
|
||||
"encoding"
|
||||
"fileformat"
|
||||
"filetype"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
20
home/core/tui/neovim/plugins/markdown-preview.nix
Normal file
20
home/core/tui/neovim/plugins/markdown-preview.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.markdown-preview = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
auto_close = false;
|
||||
theme = "dark";
|
||||
};
|
||||
};
|
||||
|
||||
files."after/ftplugin/markdown.lua".keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>m";
|
||||
action = ":MarkdownPreview<cr>";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
22
home/core/tui/neovim/plugins/neo-tree.nix
Normal file
22
home/core/tui/neovim/plugins/neo-tree.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>n";
|
||||
action = ":Neotree action=focus reveal toggle<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
closeIfLastWindow = true;
|
||||
window = {
|
||||
width = 30;
|
||||
autoExpandWidth = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
44
home/core/tui/neovim/plugins/nonels.nix
Normal file
44
home/core/tui/neovim/plugins/nonels.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
programs.nixvim.plugins.none-ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
cmd = ["bash -c nvim"];
|
||||
debug = true;
|
||||
};
|
||||
sources = {
|
||||
code_actions = {
|
||||
statix.enable = true;
|
||||
gitsigns.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
deadnix.enable = true;
|
||||
pylint.enable = true;
|
||||
checkstyle.enable = true;
|
||||
};
|
||||
formatting = {
|
||||
alejandra.enable = true;
|
||||
stylua.enable = true;
|
||||
shfmt.enable = true;
|
||||
nixpkgs_fmt.enable = true;
|
||||
google_java_format.enable = false;
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
};
|
||||
black = {
|
||||
enable = true;
|
||||
withArgs = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
completion = {
|
||||
luasnip.enable = true;
|
||||
spell.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
32
home/core/tui/neovim/plugins/startify.nix
Normal file
32
home/core/tui/neovim/plugins/startify.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
programs.nixvim.plugins.startify = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
custom_header = [
|
||||
""
|
||||
" ███╗ ██╗██╗██╗ ██╗██╗ ██╗██╗███╗ ███╗"
|
||||
" ████╗ ██║██║╚██╗██╔╝██║ ██║██║████╗ ████║"
|
||||
" ██╔██╗ ██║██║ ╚███╔╝ ██║ ██║██║██╔████╔██║"
|
||||
" ██║╚██╗██║██║ ██╔██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║"
|
||||
" ██║ ╚████║██║██╔╝ ██╗ ╚████╔╝ ██║██║ ╚═╝ ██║"
|
||||
" ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝"
|
||||
];
|
||||
|
||||
# When opening a file or bookmark, change to its directory.
|
||||
change_to_dir = false;
|
||||
|
||||
# By default, the fortune header uses ASCII characters, because they work for everyone.
|
||||
# If you set this option to 1 and your 'encoding' is "utf-8", Unicode box-drawing characters will
|
||||
# be used instead.
|
||||
use_unicode = true;
|
||||
|
||||
lists = [{type = "dir";}];
|
||||
files_number = 30;
|
||||
|
||||
skiplist = [
|
||||
"flake.lock"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
17
home/core/tui/neovim/plugins/tagbar.nix
Normal file
17
home/core/tui/neovim/plugins/tagbar.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.tagbar = {
|
||||
enable = true;
|
||||
settings.width = 50;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-g>";
|
||||
action = ":TagbarToggle<cr>";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
33
home/core/tui/neovim/plugins/telescope.nix
Normal file
33
home/core/tui/neovim/plugins/telescope.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
# Find files using Telescope command-line sugar.
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "live_grep";
|
||||
"<leader>b" = "buffers";
|
||||
"<leader>fh" = "help_tags";
|
||||
"<leader>fd" = "diagnostics";
|
||||
|
||||
# FZF like bindings
|
||||
"<C-p>" = "git_files";
|
||||
"<leader>p" = "oldfiles";
|
||||
"<C-f>" = "live_grep";
|
||||
};
|
||||
|
||||
settings.defaults = {
|
||||
file_ignore_patterns = [
|
||||
"^.git/"
|
||||
"^.mypy_cache/"
|
||||
"^__pycache__/"
|
||||
"^output/"
|
||||
"^data/"
|
||||
"%.ipynb"
|
||||
];
|
||||
set_env.COLORTERM = "truecolor";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
home/core/tui/neovim/plugins/treesitter.nix
Normal file
26
home/core/tui/neovim/plugins/treesitter.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
|
||||
nixvimInjections = true;
|
||||
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
folding = true;
|
||||
};
|
||||
|
||||
treesitter-refactor = {
|
||||
enable = true;
|
||||
highlightDefinitions = {
|
||||
enable = true;
|
||||
# Set to false if you have an `updatetime` of ~100.
|
||||
clearOnCursorMove = false;
|
||||
};
|
||||
};
|
||||
|
||||
hmts.enable = true;
|
||||
};
|
||||
}
|
||||
77
home/core/tui/neovim/plugins/vimtex.nix
Normal file
77
home/core/tui/neovim/plugins/vimtex.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.vimtex = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
view_method = "zathura";
|
||||
|
||||
quickfix_enabled = true;
|
||||
quickfix_open_on_warning = false;
|
||||
|
||||
# Ignore undesired errors and warnings
|
||||
quickfix_ignore_filters = [
|
||||
"Underfull"
|
||||
"Overfull"
|
||||
"specifier changed to"
|
||||
"Token not allowed in a PDF string"
|
||||
];
|
||||
|
||||
# TOC settings
|
||||
toc_config = {
|
||||
name = "TOC";
|
||||
layers = ["content" "todo"];
|
||||
resize = true;
|
||||
split_width = 50;
|
||||
todo_sorted = false;
|
||||
show_help = true;
|
||||
show_numbers = true;
|
||||
mode = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
files."after/ftplugin/tex.lua".keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "m";
|
||||
action = ":VimtexView<cr>";
|
||||
}
|
||||
];
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
event = ["BufEnter" "BufWinEnter"];
|
||||
pattern = "*.tex";
|
||||
command = "set filetype=tex \"| VimtexTocOpen";
|
||||
}
|
||||
|
||||
# Folding
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = ["tex" "latex"];
|
||||
callback.__raw = ''
|
||||
function ()
|
||||
vim.o.foldmethod = 'expr'
|
||||
vim.o.foldexpr = 'vimtex#fold#level(v:lnum)'
|
||||
vim.o.foldtext = 'vimtex#fold#text()'
|
||||
end
|
||||
'';
|
||||
}
|
||||
|
||||
# Compile on initialization
|
||||
{
|
||||
event = "User";
|
||||
pattern = "VimtexEventInitPost";
|
||||
callback = "vimtex#compiler#compile";
|
||||
}
|
||||
|
||||
# Cleanup on exit
|
||||
{
|
||||
event = "User";
|
||||
pattern = "VimtexEventQuit";
|
||||
command = "call vimtex#compiler#clean(0)";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
5
home/core/tui/neovim/plugins/yanky.nix
Normal file
5
home/core/tui/neovim/plugins/yanky.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
programs.nixvim.plugins.yanky = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
26
home/core/tui/neovim/todo.nix
Normal file
26
home/core/tui/neovim/todo.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
highlight.Todo = {
|
||||
fg = "Blue";
|
||||
bg = "Yellow";
|
||||
};
|
||||
|
||||
match.TODO = "TODO";
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-t>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('telescope.builtin').live_grep({
|
||||
default_text="TODO",
|
||||
initial_mode="normal"
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
9
home/core/tui/wezterm/default.nix
Normal file
9
home/core/tui/wezterm/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# extraConfig = ''
|
||||
# config.color_scheme = "Gruvbox Material (Gogh)"
|
||||
# '';
|
||||
};
|
||||
}
|
||||
77
home/core/tui/zellij/default.nix
Normal file
77
home/core/tui/zellij/default.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableZshIntegration = false;
|
||||
};
|
||||
home.shellAliases = {
|
||||
zr = "zellij run --";
|
||||
zrf = "zellij run --floating --";
|
||||
ze = "zellij edit";
|
||||
zef = "zellij edit --floating";
|
||||
};
|
||||
|
||||
xdg.configFile."zellij/config.kdl".text = ''
|
||||
default_layout "compact"
|
||||
mouse_mode true
|
||||
copy_on_select true
|
||||
copy_command "wl-copy"
|
||||
simplified_ui false
|
||||
scrollback_editor "/home/cnst/.nix-profile/bin/nvim"
|
||||
pane_frames true
|
||||
on_force_close "detach"
|
||||
|
||||
ui {
|
||||
pane_frames {
|
||||
rounded_corners false
|
||||
}
|
||||
}
|
||||
|
||||
keybinds {
|
||||
normal {
|
||||
bind "Alt m" {
|
||||
LaunchPlugin "file:~/.config/zellij/plugins/monocle.wasm" {
|
||||
in_place true
|
||||
kiosk true
|
||||
};
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
bind "Ctrl f" {
|
||||
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/monocle.wasm" {
|
||||
floating true
|
||||
}
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
bind "Alt 1" { GoToTab 1;}
|
||||
bind "Alt 2" { GoToTab 2;}
|
||||
bind "Alt 3" { GoToTab 3;}
|
||||
bind "Alt 4" { GoToTab 4;}
|
||||
}
|
||||
|
||||
shared_except "locked" {
|
||||
bind "Ctrl y" {
|
||||
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/room.wasm" {
|
||||
floating true
|
||||
ignore_case true
|
||||
}
|
||||
}
|
||||
}
|
||||
unbind "Ctrl b" "Ctrl h" "Ctrl g" "Alt j"
|
||||
}
|
||||
|
||||
themes {
|
||||
gruvbox-dark {
|
||||
bg "#282828"
|
||||
fg "#D5C4A1"
|
||||
black "#3C3836"
|
||||
red "#CC241D"
|
||||
green "#98971A"
|
||||
yellow "#D79921"
|
||||
blue "#458588"
|
||||
magenta "#B16286"
|
||||
cyan "#689D6A"
|
||||
white "#FBF1C7"
|
||||
orange "#D65D0E"
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user