1
Fork 0

Update invidious and some other nvim stuff

This commit is contained in:
prescientmoon 2024-04-27 21:38:06 +02:00
parent e58eb41fb1
commit 3c1f1d71f3
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
15 changed files with 170 additions and 146 deletions

View file

@ -1278,11 +1278,11 @@
"purifix": "purifix" "purifix": "purifix"
}, },
"locked": { "locked": {
"lastModified": 1713852340, "lastModified": 1713856075,
"narHash": "sha256-4H5l6Hsg6SzhZwB8ikphlJmLtyi3xeUcPPsVh3gVd/k=", "narHash": "sha256-3nmcWGRczFJAiObkG+XUK9OdY8EVjySOUbDSK6yVyVE=",
"owner": "mateiadrielrafael", "owner": "mateiadrielrafael",
"repo": "miros", "repo": "miros",
"rev": "80a1cd4726b6d1b7b9d9ee4cfe850d87d524090b", "rev": "37081c34cb04b0751527c4ed740220c57cea3151",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -224,15 +224,15 @@
extra-substituters = [ extra-substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
# "https://anyrun.cachix.org" # "https://anyrun.cachix.org"
# "https://smos.cachix.org" "https://smos.cachix.org"
# "https://intray.cachix.org" "https://intray.cachix.org"
]; ];
extra-trusted-public-keys = [ extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" # "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
# "smos.cachix.org-1:YOs/tLEliRoyhx7PnNw36cw2Zvbw5R0ASZaUlpUv+yM=" "smos.cachix.org-1:YOs/tLEliRoyhx7PnNw36cw2Zvbw5R0ASZaUlpUv+yM="
# "intray.cachix.org-1:qD7I/NQLia2iy6cbzZvFuvn09iuL4AkTmHvjxrQlccQ=" "intray.cachix.org-1:qD7I/NQLia2iy6cbzZvFuvn09iuL4AkTmHvjxrQlccQ="
]; ];
}; };
# }}} # }}}

View file

@ -149,10 +149,16 @@ in
aliases = [ "@gh" "@github" ]; aliases = [ "@gh" "@github" ];
}; };
"Invidious" = mkBasicSearchEngine {
url = "https://yt.moonythm.dev/results";
param = "search_query";
aliases = [ "@yt" "@invidious" ];
};
"Youtube" = mkBasicSearchEngine { "Youtube" = mkBasicSearchEngine {
url = "https://www.youtube.com/results"; url = "https://www.youtube.com/results";
param = "search_query"; param = "search_query";
aliases = [ "@yt" "@youtube" ]; aliases = [ "@gyt" "@youtube" ];
}; };
"Arcaea wiki" = mkBasicSearchEngine { "Arcaea wiki" = mkBasicSearchEngine {

View file

@ -18,12 +18,11 @@ local font_size = 20.0
config.colors = wezterm.color.load_base16_scheme(colorscheme.source) config.colors = wezterm.color.load_base16_scheme(colorscheme.source)
-- {{{ Window frame -- {{{ Window frame
local tab_bar_bg = colorscheme.transparency.terminal.base04
config.window_frame = { config.window_frame = {
font = wezterm.font({ family = colorscheme.fonts.sansSerif }), font = wezterm.font({ family = colorscheme.fonts.sansSerif }),
font_size = font_size - 3, font_size = font_size - 3,
active_titlebar_bg = tab_bar_bg, active_titlebar_bg = "none",
inactive_titlebar_bg = tab_bar_bg, inactive_titlebar_bg = "none",
} }
config.window_padding = { config.window_padding = {
@ -35,17 +34,17 @@ config.window_padding = {
-- }}} -- }}}
-- {{{ Tab bar colors -- {{{ Tab bar colors
config.colors.tab_bar = { config.colors.tab_bar = {
background = tab_bar_bg, background = "none",
active_tab = { active_tab = {
bg_color = colorscheme.transparency.terminal.base00, bg_color = colorscheme.transparency.terminal.base00,
fg_color = colorscheme.base05, fg_color = colorscheme.base05,
}, },
inactive_tab = { inactive_tab = {
bg_color = colorscheme.base02, bg_color = "none",
fg_color = colorscheme.base05, fg_color = colorscheme.base05,
}, },
inactive_tab_hover = { inactive_tab_hover = {
bg_color = colorscheme.base01, bg_color = colorscheme.base00,
fg_color = colorscheme.base05, fg_color = colorscheme.base05,
}, },
new_tab = { new_tab = {

View file

@ -56,23 +56,6 @@ local abolishAbbreviations = {
options = A.no_capitalization, options = A.no_capitalization,
}, },
-- }}} -- }}}
-- {{{ General function calls:
-- {function-name}{modifier?}{argument}{argument-modifier?}
--
-- - function-name = f/g/h/P
-- - modifier:
-- - d => derivative
-- - 2 => squared
-- - 3 => cubed
-- - i => inverse
-- - argument = x/y/z/a/t/i/n/k
-- - argument-modifier:
-- - n => subscript n
{
"{f,g,h,P}{d,2,3,i,}{x,y,z,a,t,i,n,k}{n,}",
"{}{',^2,^3,^\\{-1\\},}({}{_n,})",
},
-- }}}
-- {{{ Graph theory -- {{{ Graph theory
-- Graph theory function syntax: -- Graph theory function syntax:
-- gt[function]{graph}{modifier} -- gt[function]{graph}{modifier}

View file

@ -2,31 +2,14 @@ local A = require("my.abbreviations")
local scrap = require("scrap") local scrap = require("scrap")
local M = {} local M = {}
M.symols = { M.symbols = {
{ "mto", ">>=" }, -- [M]onadic [t]o { "mto", ">>=" }, -- [M]onadic [t]o
{ "oalt", "<|>" }, -- [O]peration [A]lternative { "oalt", "<|>" }, -- [O]peration [A]lternative
{ "omono", "<>" }, -- [O]peration [M]onoid { "omono", "<>" }, -- [O]peration [M]onoid
} }
M.types = {
{ "tarr", "Array" },
{ "tlis", "List" },
{ "tmay", "Maybe" },
{ "teff", "Effect" },
{ "tio", "IO" },
{ "taff", "Aff" },
{ "tnea", "NonEmptyArray" },
}
M.functions = {
{ "tfold", "toUnfoldable" }, -- [T]o [f]oldable
{ "ffold", "fromFoldable" }, -- [F]rom un[f]oldable
}
function M.setup() function M.setup()
A.manyLocalAbbr(scrap.expand_many(M.types, A.no_capitalization)) A.manyLocalAbbr(scrap.expand_many(M.symbols, A.no_capitalization))
A.manyLocalAbbr(scrap.expand_many(M.symols, A.no_capitalization))
A.manyLocalAbbr(scrap.expand_many(M.functions, A.no_capitalization))
end end
return M return M

View file

@ -52,26 +52,8 @@ M.words = {
-- }}} -- }}}
} }
M.notation = {
-- {{{ Exponents and subscripts:
-- {operation}{argument}
-- - operation = e (exponent) | s (subscript)
-- - argument = t{special} | {basic}
-- - basic = 0-9|n|i|t|k
-- - special =
-- - "p" => +
-- - "m" => -
-- - "i" => -1
{
"{e,s}{{0,1,2,3,4,5,6,7,8,9,n,i,t,k,m},t{i,m,p}}",
"{^,_}{{},{\\{-1\\},-,+}}",
},
-- }}}
}
function M.setup() function M.setup()
A.manyGlobalAbbr(scrap.expand_many(M.words)) A.manyGlobalAbbr(scrap.expand_many(M.words))
A.manyGlobalAbbr(scrap.expand_many(M.notation, { capitalized = false }))
end end
return M return M

View file

@ -2,7 +2,6 @@ local A = require("my.abbreviations")
local scrap = require("scrap") local scrap = require("scrap")
local M = {} local M = {}
-- {{{ Unicode
M.unicode = { M.unicode = {
-- {{{ Logic -- {{{ Logic
{ "frl", "" }, -- [f]o[r]al[l] { "frl", "" }, -- [f]o[r]al[l]
@ -13,9 +12,6 @@ M.unicode = {
{ "Lor", "" }, -- [l]ogical [or] { "Lor", "" }, -- [l]ogical [or]
{ "bot", "" }, -- false { "bot", "" }, -- false
{ "top", "" }, -- true { "top", "" }, -- true
{ "iip", "" }, -- [i]t [i]m[p]lies
{ "iib", "" }, -- [i]t's [i]mplied [b]y
{ "iff", "" }, -- [if] and only i[f]
{ "lneg", "¬" }, -- [l]ogical [neg]ation { "lneg", "¬" }, -- [l]ogical [neg]ation
-- }}} -- }}}
-- {{{ Set theory -- {{{ Set theory
@ -75,22 +71,17 @@ M.unicode = {
{ "cbrt", "" }, -- cube root { "cbrt", "" }, -- cube root
-- }}} -- }}}
-- {{{ Integrals -- {{{ Integrals
{ "int", "" }, -- integral { "int", "" },
{ "iint", "" }, -- integral { "iint", "" },
{ "iiint", "" }, -- integral { "iiint", "" },
{ "pint", "" }, -- integral { "pint", "" },
{ "piint", "" }, -- integral { "piint", "" },
{ "piiint", "" }, -- integral { "piiint", "" },
-- }}} -- }}}
-- {{{ Common relations -- {{{ Common relations
{ "sim", "" }, -- similarity { "sim", "" }, -- similarity
{ "simeq", "" }, { "simeq", "" },
{ "cong", "" }, -- congruence { "cong", "" }, -- congruence
{ "defas", "" }, -- defined as
{ "eq", "=" }, -- [eq]ual
{ "neq", "" }, -- [n]ot [eq]ual
{ "leq", "" }, -- [l]ess than or [e][q]ual
{ "geq", "" }, -- [g]reater than or [e][q]ual
{ "iin", "" }, -- [I]ncluded [i][n] { "iin", "" }, -- [I]ncluded [i][n]
{ "nin", "" }, -- [n]ot included [i][n] { "nin", "" }, -- [n]ot included [i][n]
@ -145,12 +136,7 @@ M.unicode = {
{ "rquare", "" }, -- rounded square { "rquare", "" }, -- rounded square
{ "diam", "" }, { "diam", "" },
-- }}} -- }}}
-- {{{ Brackets
{ "langle", "" },
{ "rangle", "" },
-- }}}
} }
-- }}}
function M.setup() function M.setup()
A.manyLocalAbbr(scrap.expand_many(M.unicode, { capitalized = false })) A.manyLocalAbbr(scrap.expand_many(M.unicode, { capitalized = false }))

View file

@ -1 +0,0 @@
{}

View file

@ -424,6 +424,7 @@ let
package = "nvim-telescope/telescope.nvim"; package = "nvim-telescope/telescope.nvim";
version = "0.1.x"; version = "0.1.x";
cond = blacklist "vscode"; cond = blacklist "vscode";
event = "VeryLazy";
# {{{ Dependencies # {{{ Dependencies
dependencies = { dependencies = {
@ -485,7 +486,6 @@ let
# }}} # }}}
# {{{ Options # {{{ Options
opts.defaults.mappings.i."<C-h>" = "which_key"; opts.defaults.mappings.i."<C-h>" = "which_key";
opts.pickers.find_files.hidden = true;
opts.extensions.fzf = { opts.extensions.fzf = {
fuzzy = true; fuzzy = true;
override_generic_sorter = true; override_generic_sorter = true;
@ -609,18 +609,6 @@ let
opts.indent.enable = true; opts.indent.enable = true;
}; };
# }}} # }}}
# {{{ treesitter context
# REASON: broken
# show context at top of file
# treesitter-top-context = {
# package = "nvim-treesitter/nvim-treesitter-context";
# dependencies.lua = [ "treesitter" ];
#
# cond = blacklist "vscode";
# event = "VeryLazy";
# opts.enable = true;
# };
# }}}
# {{{ mini.starter # {{{ mini.starter
mini-starter = { mini-starter = {
package = "echasnovski/mini.starter"; package = "echasnovski/mini.starter";
@ -628,11 +616,21 @@ let
cond = blacklist [ "vscode" "firenvim" ]; cond = blacklist [ "vscode" "firenvim" ];
lazy = false; lazy = false;
config.autocmds = {
event = "User";
pattern = "MiniStarterOpened";
group = "RemoveMiniStarterKeybinds";
action.callback = thunk /* lua */ ''
vim.keymap.del('n', '<C-n>', { buffer = true })
vim.keymap.del('n', '<C-p>', { buffer = true })
'';
};
opts = _: { opts = _: {
header = builtins.readFile ./header.txt; header = builtins.readFile ./header.txt;
footer = importFrom ./plugins/ministarter.lua "lazy_stats_item"; footer = importFrom ./plugins/ministarter.lua "lazy_stats_item";
items = [ ];
content_hooks = [ content_hooks = [
(lua ''require("mini.starter").gen_hook.adding_bullet()'')
(lua ''require("mini.starter").gen_hook.aligning('center', 'center')'') (lua ''require("mini.starter").gen_hook.aligning('center', 'center')'')
]; ];
silent = true; silent = true;
@ -750,7 +748,7 @@ let
b = balanced "()"; b = balanced "()";
B = balanced "{}"; B = balanced "{}";
r = balanced "[]"; r = balanced "[]";
v = balanced ""; v = [ ".-" "^().*()$" ];
q = balanced "\"\""; q = balanced "\"\"";
Q = balanced "``"; Q = balanced "``";
a = balanced "''"; a = balanced "''";
@ -1435,16 +1433,16 @@ let
# }}} # }}}
# {{{ gitlinker # {{{ gitlinker
# generate permalinks for code # generate permalinks for code
gitlinker = gitlinker = rec {
let mapping = "<leader>yg";
in
{
package = "ruifm/gitlinker.nvim"; package = "ruifm/gitlinker.nvim";
dependencies.lua = [ "plenary" ]; dependencies.lua = [ "plenary" ];
cond = blacklist [ "vscode" "firenvim" ]; cond = blacklist [ "vscode" "firenvim" ];
opts.mappings = mapping; opts.mappings = "<leader>yg";
keys = mapping; keys = {
mapping = opts.mappings;
desc = "[y]ank [g]it permalink";
};
}; };
# }}} # }}}
# {{{ obsidian # {{{ obsidian
@ -1589,18 +1587,16 @@ in
imports = [ ../desktop/wakatime ]; imports = [ ../desktop/wakatime ];
# {{{ Basic config # {{{ Basic config
# We still want other modules to know that we are using neovim! # We want other modules to know that we are using neovim!
satellite.toggles.neovim.enable = true; satellite.toggles.neovim.enable = true;
# Link files in the appropriate places
xdg.configFile.nvim.source = config.satellite.dev.path "home/features/neovim/config"; xdg.configFile.nvim.source = config.satellite.dev.path "home/features/neovim/config";
home.sessionVariables.EDITOR = "nvim"; home.sessionVariables.EDITOR = "nvim";
home.file.".nvim_nix_runtime".source = generatedConfig; home.file.".nvim_nix_runtime".source = generatedConfig;
home.packages = [ # Install packages
neovim home.packages = [ neovim neovide pkgs.vimclip ];
neovide
pkgs.vimclip
];
# }}} # }}}
# {{{ Persistence # {{{ Persistence
satellite.persistence.at.state.apps.neovim.directories = [ satellite.persistence.at.state.apps.neovim.directories = [

View file

@ -1,6 +1,10 @@
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ██████╗ ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓ ██████
████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ██╗╚════██╗ ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▓ ▒██ ░▒▓▓██
██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ╚═╝ █████╔╝ ▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░ ░▒ ░█████
██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ██╗ ╚═══██╗ ▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ ██ ░▒▓██
██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ╚═╝██████╔╝ ▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒ ░▒▒ ██████▒
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░ ░ ░▒ ░▓░
░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░ ░ ░░ ░ ░
░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░

View file

@ -6,4 +6,6 @@ block auto
abbr leq <= abbr leq <=
abbr geq >= abbr geq >=
abbr land /\ abbr land /\
abbr lor /\ abbr lor \/
abbr langle ⟨
abbr rangle \⟩

View file

@ -92,8 +92,8 @@ block math
$7 & $8 & $9 $7 & $8 & $9
\end{@matenv} \end{@matenv}
for operator <- @⟨eq,neq,defas,leq,geq,lt,gt,iip,iib⟩ for operator <- @⟨eq,neq,defas,leq,geq,lt,gt,iip,iib,iff
for symbol <- @⟨@operator:=,\neq,\coloneq,\leq,\geq,<,>,\implies,\impliedby⟩ for symbol <- @⟨@operator:=,\neq,\coloneq,\leq,\geq,<,>,\implies,\impliedby,\iff
block auto block auto
abbr @operator @symbol abbr @operator @symbol
@ -102,7 +102,7 @@ block math
name align at @operator name align at @operator
snip &@symbol $0 snip &@symbol $0
block auto start block start
string al@operator string al@operator
name aligned @operator name aligned @operator
snip snip
@ -224,13 +224,22 @@ block math
snip ^{$1} $0 snip ^{$1} $0
pattern (%a)(.)pp pattern (%a)(.)pp
name auto parenthesis name auto function call
snip @0(@1) $0 snip @0(@1) $0
pattern (%a)d(.)p pattern (%a)d(.)p
name auto parenthesis name auto derivative call
snip @0'(@1) $0 snip @0'(@1) $0
pattern (%a)i(.)p
name auto preimage call
snip @0^{-1}(@1) $0
block !word
abbr .inv ^{-1}
abbr .neg _-
abbr .pos _+
for limtarget <- @⟨anything,zero,infinity,negative infinity⟩ for limtarget <- @⟨anything,zero,infinity,negative infinity⟩
for prefix <- @⟨@limtarget:,z,i,n⟩ for prefix <- @⟨@limtarget:,z,i,n⟩
for limtargetsymbol <- @⟨@limtarget:$2,0,\infty,-\infty⟩ for limtargetsymbol <- @⟨@limtarget:$2,0,\infty,-\infty⟩

View file

@ -0,0 +1,75 @@
block auto start
for thmenv <- @⟨lemma,theorem,corollary,definition⟩
string @thmenv
snip
#@thmenv$|1⟨(name: "$1"),$1⟩[
$0
]
for proofenv <- @⟨proof,solution⟩
string @proofenv
snip
#@proofenv$|1⟨$1,(name: "$1")⟩[
$0
]
string dm
name display math
snip
$
$0
$
block auto
string ccf
name continuously differentiable function
snip $C^1$
string ftdef
name function type definition
snip $$1 : $2 → $3$ $0
block auto
string tdif
name total derivative
snip (dif $1) / (dif $2) $0
string pdif
name partial derivative
snip (diff $1) / (diff $2) $0
string dint
name definite integral
snip ∫_$|1⟨$1,(-∞$1)⟩^$|2⟨$2,∞$2⟩ $3 dif $0
block !word
abbr .inv ^(-1)
abbr .neg _-
abbr .pos _+
for limtarget <- @⟨anything,zero,infinity,negative infinity⟩
for prefix <- @⟨@limtarget:,z,i,n⟩
for limtargetsymbol <- @⟨@limtarget:$2,0,∞,-∞⟩
string @prefix⋄lim
name limit to @limtarget
snip lim_($1 → @limtargetsymbol) $0
for operator <- @⟨eq,neq,defas,leq,geq,lt,gt,iip,iib,iff⟩
for symbol <- @⟨@operator:=,≠,≔,≤,≥,<,>,⟹,⟸,⟺⟩
abbr @operator @symbol
string a@operator
name align at @operator
snip &@symbol $0
block start
string al@operator
name aligned @operator
snip
\ $1 &@symbol $2
$0
string cr@operator
name start with @operator
snip \ &@symbol $0

View file

@ -38,8 +38,8 @@
owner = "iv-org"; owner = "iv-org";
repo = "invidious"; repo = "invidious";
fetchSubmodules = true; fetchSubmodules = true;
rev = "08390acd0c17875fddb84cabba54197a5b5740e4"; rev = "eda7444ca46dbc3941205316baba8030fe0b2989";
sha256 = "sha256-75C/ImX/PYikVdSO4rZM/aYyEgx6pU90BHNeRFfcsDM="; sha256 = "0iafxgb93jxx9ams6ll2yx8il4d7h89a630hcx9y8jj4gn3ax7v1";
}; };
}); });
}; };