refactor: reduce strangeness

This commit is contained in:
isabel 2024-10-29 23:56:21 +00:00
parent c3567238aa
commit caf80f4832
No known key found for this signature in database
GPG key ID: 3E7C7A1B5DEDBB03
8 changed files with 104 additions and 204 deletions

121
_sources/generated.json generated
View file

@ -25,7 +25,9 @@
"date": "2024-10-20",
"extract": null,
"name": "catppuccin",
"passthru": null,
"passthru": {
"as": "catppuccin"
},
"pinned": false,
"src": {
"deepClone": false,
@ -62,27 +64,6 @@
},
"version": "648aca6d33ec011dc3166e7af3b38820d01a71e4"
},
"cmp": {
"cargoLocks": null,
"date": "2024-10-21",
"extract": null,
"name": "cmp",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "hrsh7th",
"repo": "nvim-cmp",
"rev": "29fb4854573355792df9e156cb779f0d31308796",
"sha256": "sha256-dAsXxv1RtgMc1i5QrR2xqOeK6aRgYNqdYyTXVBXhVJ4=",
"sparseCheckout": [],
"type": "github"
},
"version": "29fb4854573355792df9e156cb779f0d31308796"
},
"cmp-buffer": {
"cargoLocks": null,
"date": "2022-08-10",
@ -251,27 +232,6 @@
},
"version": "3e38d855c764bb1bec230130ed0e026fca54e4c8"
},
"editorconfig": {
"cargoLocks": null,
"date": "2023-01-10",
"extract": null,
"name": "editorconfig",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "gpanders",
"repo": "editorconfig.nvim",
"rev": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf",
"sha256": "sha256-pR57tITdVGF4luEmmRYv/XFb35E3KDfcgYRijkPAc+Y=",
"sparseCheckout": [],
"type": "github"
},
"version": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf"
},
"evergarden": {
"cargoLocks": null,
"date": "2024-10-21",
@ -571,7 +531,9 @@
"date": "2024-10-24",
"extract": null,
"name": "lz-n",
"passthru": null,
"passthru": {
"start": "true"
},
"pinned": false,
"src": {
"deepClone": false,
@ -650,11 +612,11 @@
},
"version": "ce43f2eb2a52492157d7742e5f684b9a42bb3e5c"
},
"null-ls": {
"none-ls": {
"cargoLocks": null,
"date": "2024-10-17",
"extract": null,
"name": "null-ls",
"name": "none-ls",
"passthru": null,
"pinned": false,
"src": {
@ -671,6 +633,27 @@
},
"version": "dcc8cd4efdcb29275681a3c95786a816330dbca6"
},
"nvim-cmp": {
"cargoLocks": null,
"date": "2024-10-21",
"extract": null,
"name": "nvim-cmp",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "hrsh7th",
"repo": "nvim-cmp",
"rev": "29fb4854573355792df9e156cb779f0d31308796",
"sha256": "sha256-dAsXxv1RtgMc1i5QrR2xqOeK6aRgYNqdYyTXVBXhVJ4=",
"sparseCheckout": [],
"type": "github"
},
"version": "29fb4854573355792df9e156cb779f0d31308796"
},
"nvim-colorizer": {
"cargoLocks": null,
"date": "2024-09-11",
@ -844,7 +827,9 @@
"date": "2024-09-17",
"extract": null,
"name": "plenary",
"passthru": null,
"passthru": {
"start": "true"
},
"pinned": false,
"src": {
"deepClone": false,
@ -986,27 +971,6 @@
},
"version": "df534c3042572fb958586facd02841e10186707c"
},
"telescope-file-browser": {
"cargoLocks": null,
"date": "2024-09-21",
"extract": null,
"name": "telescope-file-browser",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "nvim-telescope",
"repo": "telescope-file-browser.nvim",
"rev": "3b8a1e17187cfeedb31decbd625da62398a8ff34",
"sha256": "sha256-44o8sapjIdIJ+UJJH3X8mUcQjWXzOEI05kCFiVQrlO4=",
"sparseCheckout": [],
"type": "github"
},
"version": "3b8a1e17187cfeedb31decbd625da62398a8ff34"
},
"telescope-project": {
"cargoLocks": null,
"date": "2024-09-09",
@ -1049,27 +1013,6 @@
},
"version": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2"
},
"tiny-devicons-auto-colors-nvim": {
"cargoLocks": null,
"date": "2024-08-23",
"extract": null,
"name": "tiny-devicons-auto-colors-nvim",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "rachartier",
"repo": "tiny-devicons-auto-colors.nvim",
"rev": "a39fa4c92268832f6034306793b8acbfec2a7549",
"sha256": "sha256-Ndkbvxn/x7+fxEYD7JIygqUiItuhoY+4+DaL/pJGKdc=",
"sparseCheckout": [],
"type": "github"
},
"version": "a39fa4c92268832f6034306793b8acbfec2a7549"
},
"todo-comments": {
"cargoLocks": null,
"date": "2024-09-16",

67
_sources/generated.nix generated
View file

@ -23,6 +23,7 @@
fetchSubmodules = false;
sha256 = "sha256-xTiNV7qdUpvqUEiDj3EEKEvGSWij+9MwA5Cj1oJzHHw=";
};
as = "catppuccin";
date = "2024-10-20";
};
cloak = {
@ -37,18 +38,6 @@
};
date = "2024-06-12";
};
cmp = {
pname = "cmp";
version = "29fb4854573355792df9e156cb779f0d31308796";
src = fetchFromGitHub {
owner = "hrsh7th";
repo = "nvim-cmp";
rev = "29fb4854573355792df9e156cb779f0d31308796";
fetchSubmodules = false;
sha256 = "sha256-dAsXxv1RtgMc1i5QrR2xqOeK6aRgYNqdYyTXVBXhVJ4=";
};
date = "2024-10-21";
};
cmp-buffer = {
pname = "cmp-buffer";
version = "3022dbc9166796b644a841a02de8dd1cc1d311fa";
@ -145,18 +134,6 @@
};
date = "2024-07-08";
};
editorconfig = {
pname = "editorconfig";
version = "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf";
src = fetchFromGitHub {
owner = "gpanders";
repo = "editorconfig.nvim";
rev = "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf";
fetchSubmodules = false;
sha256 = "sha256-pR57tITdVGF4luEmmRYv/XFb35E3KDfcgYRijkPAc+Y=";
};
date = "2023-01-10";
};
evergarden = {
pname = "evergarden";
version = "d7adb7e8e1f803176e588a427d7d21e76840bb83";
@ -335,6 +312,7 @@
fetchSubmodules = false;
sha256 = "sha256-0w/UmtI7qDpxEElMV7ycs2c37OXj9jJTYzyqYCKqZPY=";
};
start = "true";
date = "2024-10-24";
};
markview = {
@ -373,8 +351,8 @@
};
date = "2024-10-09";
};
null-ls = {
pname = "null-ls";
none-ls = {
pname = "none-ls";
version = "dcc8cd4efdcb29275681a3c95786a816330dbca6";
src = fetchFromGitHub {
owner = "nvimtools";
@ -385,6 +363,18 @@
};
date = "2024-10-17";
};
nvim-cmp = {
pname = "nvim-cmp";
version = "29fb4854573355792df9e156cb779f0d31308796";
src = fetchFromGitHub {
owner = "hrsh7th";
repo = "nvim-cmp";
rev = "29fb4854573355792df9e156cb779f0d31308796";
fetchSubmodules = false;
sha256 = "sha256-dAsXxv1RtgMc1i5QrR2xqOeK6aRgYNqdYyTXVBXhVJ4=";
};
date = "2024-10-21";
};
nvim-colorizer = {
pname = "nvim-colorizer";
version = "0671e0eabc6842676d3310370e8fae4e1c51d7f9";
@ -491,6 +481,7 @@
fetchSubmodules = false;
sha256 = "sha256-bmmPekAvuBvLQmrnnX0n+FRBqfVxBsObhxIEkDGAla4=";
};
start = "true";
date = "2024-09-17";
};
py_lsp = {
@ -565,18 +556,6 @@
};
date = "2024-10-10";
};
telescope-file-browser = {
pname = "telescope-file-browser";
version = "3b8a1e17187cfeedb31decbd625da62398a8ff34";
src = fetchFromGitHub {
owner = "nvim-telescope";
repo = "telescope-file-browser.nvim";
rev = "3b8a1e17187cfeedb31decbd625da62398a8ff34";
fetchSubmodules = false;
sha256 = "sha256-44o8sapjIdIJ+UJJH3X8mUcQjWXzOEI05kCFiVQrlO4=";
};
date = "2024-09-21";
};
telescope-project = {
pname = "telescope-project";
version = "796200876bb0fe8157b8eb1ce03d927d3827a052";
@ -601,18 +580,6 @@
};
date = "2023-12-04";
};
tiny-devicons-auto-colors-nvim = {
pname = "tiny-devicons-auto-colors-nvim";
version = "a39fa4c92268832f6034306793b8acbfec2a7549";
src = fetchFromGitHub {
owner = "rachartier";
repo = "tiny-devicons-auto-colors.nvim";
rev = "a39fa4c92268832f6034306793b8acbfec2a7549";
fetchSubmodules = false;
sha256 = "sha256-Ndkbvxn/x7+fxEYD7JIygqUiItuhoY+4+DaL/pJGKdc=";
};
date = "2024-08-23";
};
todo-comments = {
pname = "todo-comments";
version = "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0";

View file

@ -4,11 +4,6 @@ require("izvim.config.keybinds")
require("izvim.config.neovide")
require("izvim.config.options")
vim.api.nvim_cmd({
cmd = "packadd",
args = { "lz-n" },
}, {})
require("lz.n").load(require("izvim.plugins"))
require("izvim.health").loaded = true

View file

@ -7,7 +7,7 @@ end
return {
-- tree view
{
"nvim-tree",
"nvim-tree.lua",
after = function()
require("nvim-tree").setup({
sync_root_with_cwd = true,
@ -23,7 +23,7 @@ return {
-- mini
{
"mini-surround",
"mini.surround",
event = "InsertEnter",
after = function()
require("mini.surround").setup({
@ -44,18 +44,18 @@ return {
-- markdown stuff
{
"markview",
"markview.nvim",
lazy = false,
after = rq("markview"),
},
{
"obsidian-nvim",
"obsidian.nvim",
after = rq("obsidian"),
},
-- rice
{
"alpha",
"alpha-nvim",
after = rq("alpha"),
},
{
@ -64,7 +64,7 @@ return {
},
{
"lualine",
"lualine.nvim",
after = rq("lualine"),
},
@ -80,7 +80,7 @@ return {
},
{
"fidget",
"fidget.nvim",
after = function()
require("fidget").setup({
display = { done_icon = "󰗡" },
@ -99,7 +99,7 @@ return {
},
{
"nvim-colorizer",
"nvim-colorizer.lua",
after = function()
require("colorizer").setup({
user_default_options = {
@ -132,7 +132,7 @@ return {
},
{
"todo-comments",
"todo-comments.nvim",
after = function()
require("todo-comments").setup()
end,
@ -140,7 +140,7 @@ return {
-- quicker movement
{
"telescope",
"telescope.nvim",
after = rq("telescope"),
},
@ -150,7 +150,6 @@ return {
},
-- copilot
-- copilot-cmp
{
"copilot-lua",
enabled = function()
@ -165,7 +164,7 @@ return {
"nvim-treesitter",
after = rq("tree-sitter"),
},
{ "rainbow-delimiters" },
{ "rainbow-delimiters.nvim" },
-- rust lsp + formmating
{
@ -179,18 +178,18 @@ return {
},
{
"trouble",
"trouble.nvim",
after = rq("trouble"),
},
{
"lazydev",
"lazydev.nvim",
after = function()
require("lazydev").setup()
end,
},
{
"crates",
"crates.nvim",
after = function()
require("crates").setup({})
end,
@ -198,7 +197,7 @@ return {
},
{
"go-nvim",
"go.nvim",
ft = {
"go",
"gomod",
@ -229,11 +228,11 @@ return {
require("lspconfig").gopls.setup(require("go.lsp").config())
end,
},
{ "guihua-lua" },
{ "guihua.lua" },
-- hide my secrets
{
"cloak",
"cloak.nvim",
after = rq("cloak"),
},
@ -247,7 +246,7 @@ return {
-- alow me to paste images really easy
{
"img-clip-nvim",
"img-clip.nvim",
after = function()
require("img-clip").setup({
filetypes = {
@ -275,7 +274,7 @@ return {
},
{
"indent-blankline",
"indent-blankline.nvim",
event = "DeferredUIEnter",
after = function()
require("ibl").setup({
@ -302,7 +301,7 @@ return {
-- cool snippets saving
{
"sayama-nvim",
"sayama.nvim",
after = function()
require("sayama").setup({
dir = vim.fn.glob("$XDG_DATA_HOME/zzz"),
@ -311,13 +310,13 @@ return {
},
{
"freeze",
"freeze.nvim",
after = rq("freeze"),
},
-- lazygit integration
{
"toggleterm",
"toggleterm.nvim",
after = function()
require("toggleterm").setup({
hide_numbers = true,
@ -347,7 +346,7 @@ return {
},
{
"direnv",
"direnv.nvim",
enabled = function()
return vim.fn.executable("direnv") == 1
end,
@ -370,10 +369,6 @@ return {
},
-- deps
{
"plenary",
priority = 100,
},
{
"nvim-web-devicons",
priority = 100,

View file

@ -1,17 +1,17 @@
local plugins = {
"cmp",
"nvim-cmp",
"cmp-buffer",
"cmp-cmdline",
"cmp-nvim-lsp",
"cmp-path",
"cmp_luasnip",
"lspkind",
"null-ls",
"lsp-status",
"ltex-extra",
"schemastore",
"py_lsp",
"typescript-tools",
"lspkind.nvim",
"none-ls.nvim",
"lsp-status.nvim",
"ltex-extra.nvim",
"schemastore.nvim",
"py_lsp.nvim",
"typescript-tools.nvim",
"luasnip",
}

View file

@ -1,7 +1,7 @@
-- so quircky but we need to load this before telescope
local exts = {
"project",
"ui-select",
"project.nvim",
"ui-select.nvim",
"fzf-native.nvim",
}

View file

@ -5,12 +5,13 @@ src.git = "https://github.com/goolord/alpha-nvim"
[catppuccin]
fetch.github = "catppuccin/nvim"
src.git = "https://github.com/catppuccin/nvim"
passthru.as = "catppuccin"
[cloak]
fetch.github = "laytan/cloak.nvim"
src.git = "https://github.com/laytan/cloak.nvim"
[cmp]
[nvim-cmp]
fetch.github = "hrsh7th/nvim-cmp"
src.git = "https://github.com/hrsh7th/nvim-cmp"
@ -46,10 +47,6 @@ src.git = "https://github.com/saecki/crates.nvim"
fetch.github = "NotAShelf/direnv.nvim"
src.git = "https://github.com/NotAShelf/direnv.nvim"
[editorconfig]
fetch.github = "gpanders/editorconfig.nvim"
src.git = "https://github.com/gpanders/editorconfig.nvim"
[evergarden]
fetch.github = "comfysage/evergarden"
src.git = "https://github.com/comfysage/evergarden"
@ -111,6 +108,7 @@ src.git = "https://github.com/L3MON4D3/LuaSnip"
[lz-n]
fetch.github = "nvim-neorocks/lz.n"
src.git = "https://github.com/nvim-neorocks/lz.n"
passthru.start = "true"
[markview]
fetch.github = "OXY2DEV/markview.nvim"
@ -124,7 +122,7 @@ src.git = "https://github.com/echasnovski/mini.surround"
fetch.github = "Shatur/neovim-session-manager"
src.git = "https://github.com/Shatur/neovim-session-manager"
[null-ls]
[none-ls]
fetch.github = "nvimtools/none-ls.nvim"
src.git = "https://github.com/nvimtools/none-ls.nvim"
@ -163,6 +161,7 @@ src.git = "https://github.com/epwalsh/obsidian.nvim"
[plenary]
fetch.github = "nvim-lua/plenary.nvim"
src.git = "https://github.com/nvim-lua/plenary.nvim"
passthru.start = "true"
[py_lsp]
fetch.github = "hallerpatrick/py_lsp.nvim"
@ -188,10 +187,6 @@ src.git = "https://github.com/b0o/schemastore.nvim"
fetch.github = "nvim-telescope/telescope.nvim"
src.git = "https://github.com/nvim-telescope/telescope.nvim"
[telescope-file-browser]
fetch.github = "nvim-telescope/telescope-file-browser.nvim"
src.git = "https://github.com/nvim-telescope/telescope-file-browser.nvim"
[telescope-project]
fetch.github = "nvim-telescope/telescope-project.nvim"
src.git = "https://github.com/nvim-telescope/telescope-project.nvim"
@ -200,10 +195,6 @@ src.git = "https://github.com/nvim-telescope/telescope-project.nvim"
fetch.github = "nvim-telescope/telescope-ui-select.nvim"
src.git = "https://github.com/nvim-telescope/telescope-ui-select.nvim"
[tiny-devicons-auto-colors-nvim]
fetch.github = "rachartier/tiny-devicons-auto-colors.nvim"
src.git = "https://github.com/rachartier/tiny-devicons-auto-colors.nvim"
[todo-comments]
fetch.github = "folke/todo-comments.nvim"
src.git = "https://github.com/folke/todo-comments.nvim"

View file

@ -99,6 +99,9 @@ let
baseNameOf
typeOf
mapAttrs
readFile
fromTOML
fromJSON
attrValues
removeAttrs
;
@ -150,25 +153,31 @@ let
lazygit
];
mkPlugin =
pname: attrs:
vimUtils.buildVimPlugin {
inherit pname;
inherit (attrs) src version;
};
nv = removeAttrs (callPackage ../_sources/generated.nix { }) [
"override"
"overrideDerivation"
];
toml = fromTOML (readFile ../nvfetcher.toml);
nvPlugins = mapAttrs mkPlugin nv;
mkPlugin =
name: attrs:
let
old = toml.${name};
in
vimUtils.buildVimPlugin {
pname = old.passthru.as or (baseNameOf old.src.git);
inherit (attrs) src version;
passthru.start = if (attrs ? start) then fromJSON attrs.start else false;
};
packDir = runCommandLocal "packdir" { } ''
mkdir -pv $out/pack/${pname}/{start,opt}
${concatMapStringsSep "\n" (p: ''
ln -vsfT ${p} $out/pack/${pname}/opt/${
ln -vsfT ${p} $out/pack/${pname}/${if (p.passthru.start or false) then "start" else "opt"}/${
if typeOf p == "path" then baseNameOf p else (p.pname or p.name)
}
'') plugins}