Merge pull request ' Neovim refactoring' (#15) from neovim-refactoring into master

Reviewed-on: #15
This commit was merged in pull request #15.
This commit is contained in:
2026-09-14 18:48:46 -05:00
5 changed files with 193 additions and 112 deletions
+7 -82
View File
@@ -1,85 +1,10 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- You can also add or configure plugins by creating files in this `plugins/` folder
-- Here are some examples:
---@type LazySpec ---@type LazySpec
return { return {
{ "nvim-treesitter/nvim-treesitter" },
-- == Examples of Adding Plugins == { "neovim/nvim-lspconfig" },
{ "kylechui/nvim-surround" },
"andweeb/presence.nvim", { "nvim-neo-tree/neo-tree.nvim" },
{ { "akinsho/toggleterm.nvim" },
"ray-x/lsp_signature.nvim", { "nvimtools/none-ls.nvim" },
event = "BufRead", { "rebelot/heirline.nvim" },
config = function() require("lsp_signature").setup() end,
},
-- == Examples of Overriding Plugins ==
-- customize alpha options
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
" █████ ███████ ████████ ██████ ██████",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████",
" ",
" ███  ██ ██  ██ ██ ███  ███",
" ████  ██ ██  ██ ██ ████  ████",
" ██ ██  ██ ██  ██ ██ ██ ████ ██",
" ██  ██ ██  ██  ██  ██ ██  ██  ██",
" ██   ████   ████   ██ ██      ██",
}
return opts
end,
},
-- You can disable default plugins as follows:
{ "max397574/better-escape.nvim", enabled = false },
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
{
"L3MON4D3/LuaSnip",
config = function(plugin, opts)
require "astronvim.plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
-- add more custom luasnip configuration such as filetype extend or custom snippets
local luasnip = require "luasnip"
luasnip.filetype_extend("javascript", { "javascriptreact" })
end,
},
{
"windwp/nvim-autopairs",
config = function(plugin, opts)
require "astronvim.plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
-- add more custom autopairs configuration such as custom rules
local npairs = require "nvim-autopairs"
local Rule = require "nvim-autopairs.rule"
local cond = require "nvim-autopairs.conds"
npairs.add_rules(
{
Rule("$", "$", { "tex", "latex" })
-- don't add a pair if the next character is %
:with_pair(cond.not_after_regex "%%")
-- don't add a pair if the previous character is xxx
:with_pair(
cond.not_before_regex("xxx", 3)
)
-- don't move right when repeat character
:with_move(cond.none())
-- don't delete if the next character is xx
:with_del(cond.not_after_regex "xx")
-- disable adding a newline when you press <cr>
:with_cr(cond.none()),
},
-- disable for .vim files, but it work for another filetypes
Rule("a", "a", "-vim")
)
end,
},
} }
Generated
+75 -10
View File
@@ -135,6 +135,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1777699697,
"narHash": "sha256-Eg9b/rq/ECYwNwEXs5i9wHyhxNI0JrYx2srdI2uZMaQ=",
"ref": "refs/heads/main",
"rev": "382052b74656a369c5408822af3f2501e9b1af81",
"revCount": 94,
"type": "git",
"url": "https://git.lix.systems/lix-project/flake-compat.git"
},
"original": {
"type": "git",
"url": "https://git.lix.systems/lix-project/flake-compat.git"
}
},
"flake-schemas": { "flake-schemas": {
"locked": { "locked": {
"lastModified": 1780327564, "lastModified": 1780327564,
@@ -251,11 +267,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1789140629, "lastModified": 1789395265,
"narHash": "sha256-1TN95Z5nh1z6pyuou2QguhkWJKAl+hIpcfVV/RayGQQ=", "narHash": "sha256-EvwCTZsXjw2AkEYP3dJd/ZQDxfMhK73p1t17Dl+kx3g=",
"owner": "purpleclay", "owner": "purpleclay",
"repo": "go-overlay", "repo": "go-overlay",
"rev": "7069b95f142184721d3aeac373d687912e7ada0e", "rev": "615091b8fb4b01d37b01f81bd68fe57e500066c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -352,6 +368,21 @@
"type": "github" "type": "github"
} }
}, },
"mnw": {
"locked": {
"lastModified": 1780772958,
"narHash": "sha256-VKKe8r4pwCGWZ3Yr9CPN129R4S3CKLSrlYqdYz3vKpM=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "0871dbf63a53610c95db04439ed8ea4d6ec9c160",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "mnw",
"type": "github"
}
},
"nix-flatpak": { "nix-flatpak": {
"locked": { "locked": {
"lastModified": 1739444422, "lastModified": 1739444422,
@@ -386,11 +417,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1789114715, "lastModified": 1789344334,
"narHash": "sha256-ugpsyk3NM2s87vXfUiIIiibbJ4Pp0JPS5p/3mfs+q+c=", "narHash": "sha256-vdhpDJ3Lr24lkZ+fDCjmBRRtw9/vcSzkqGJOJyF5h2U=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "21a67dc470149f337cecafbe965d8d252a390518", "rev": "c3eea5b2156db11c7eeeada3dc737711255b253e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -417,6 +448,19 @@
} }
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": {
"lastModified": 1787498568,
"narHash": "sha256-FoOSoBG7tEvOlGRTpWnVdY506Ner4y7r7UYO3OGgmE8=",
"rev": "56c02bc00adcf003215cc4bd996d6efaf4cff188",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1060451.56c02bc00adc/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
"nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1744536153, "lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
@@ -456,6 +500,26 @@
"url": "https://scm.wyattjmiller.com/wymiller/nur.git" "url": "https://scm.wyattjmiller.com/wymiller/nur.git"
} }
}, },
"nvf": {
"inputs": {
"flake-compat": "flake-compat_4",
"mnw": "mnw",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1789333536,
"narHash": "sha256-C9GsjXostGh50d62SYEXVJOSDTwk7RjAumJmwzkJKEY=",
"owner": "notashelf",
"repo": "nvf",
"rev": "2d6b480abfa9fcf84841e62c27922bfa3f3d0d2b",
"type": "github"
},
"original": {
"owner": "notashelf",
"repo": "nvf",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"aagl": "aagl", "aagl": "aagl",
@@ -465,6 +529,7 @@
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nur": "nur", "nur": "nur",
"nvf": "nvf",
"rust-overlay": "rust-overlay_5" "rust-overlay": "rust-overlay_5"
} }
}, },
@@ -556,14 +621,14 @@
}, },
"rust-overlay_5": { "rust-overlay_5": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1789196581, "lastModified": 1789372034,
"narHash": "sha256-yJr1Bt4fKkKIpPYbsKGqJ0VFdoDnURgRwuffmBQ2WzY=", "narHash": "sha256-mu6atvdBHYpDsFhJkPtSsS6auSWAnWONVJMCvpL0900=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "228ecefb6329d5a531b77b46b581a2f0c26ee056", "rev": "a5f41d15ba0e9442542c5324fbccd7a87105a90d",
"type": "github" "type": "github"
}, },
"original": { "original": {
+4 -2
View File
@@ -17,6 +17,7 @@
url = "github:ezKEa/aagl-gtk-on-nix"; url = "github:ezKEa/aagl-gtk-on-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nvf.url = "github:notashelf/nvf";
nur.url = "git+https://scm.wyattjmiller.com/wymiller/nur.git"; nur.url = "git+https://scm.wyattjmiller.com/wymiller/nur.git";
}; };
@@ -30,12 +31,13 @@
go-overlay, go-overlay,
aagl, aagl,
nur, nur,
nvf,
... ...
}: let }: let
userName = "wyatt"; userName = "wyatt";
userEmail = "wyatt@wyattjmiller.com"; userEmail = "wyatt@wyattjmiller.com";
extraSpecialArgs = { extraSpecialArgs = {
inherit userName userEmail nur; inherit userName userEmail nur nvf;
}; };
myOverlays = { ... }: { myOverlays = { ... }: {
@@ -273,7 +275,7 @@
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { extraSpecialArgs = {
inherit userName userEmail hostname; inherit userName userEmail hostname nvf;
isNixOS = false; isNixOS = false;
role = "workstation"; role = "workstation";
}; };
+107 -14
View File
@@ -1,18 +1,111 @@
{...}: let { nvf, ... }: {
dirs = { imports = [
defaults = ../defaults; nvf.homeManagerModules.default
}; ];
in {
programs.neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
};
xdg.configFile = { programs.nvf = {
nvim = { enable = true;
onChange = "nvim --headless -c 'if exists(\":LuaCacheClear\") | :LuaCacheClear' +quitall"; settings = {
source = dirs.defaults + /nvim; vim = {
viAlias = true;
vimAlias = true;
lsp.enable = true;
treesitter.enable = true;
autocomplete.nvim-cmp.enable = true;
autopairs.nvim-autopairs.enable = true;
languages = {
nix.enable = true;
rust.enable = true;
go.enable = true;
python.enable = true;
markdown.enable = true;
css.enable = true;
scss.enable = true;
tsx.enable = true;
typescript = {
enable = true;
lsp.servers = [ "typescript-language-server" "deno" ];
};
};
utility.surround.enable = true;
telescope.enable = true;
mini.icons.enable = true;
notes.obsidian = {
enable = true;
setupOpts.workspaces = [
{
name = "personal";
path = "~/Documents/Obsidian/notes";
}
];
};
terminal.toggleterm = {
enable = true;
lazygit = {
enable = true;
mappings.open = "<leader>gg";
};
};
filetree.neo-tree.enable = true;
binds.whichKey.enable = true;
clipboard = {
enable = true;
registers = "unnamedplus";
providers = {
wl-copy.enable = true;
xclip.enable = true;
};
};
lsp.null-ls = {
enable = true;
setupOpts = {};
};
lsp.trouble.enable = true;
theme = {
enable = true;
name = "catppuccin";
style = "mocha";
transparent = false;
};
dashboard.alpha.enable = true;
statusline.lualine.enable = true;
tabline.nvimBufferline.enable = true;
keymaps = [
{
key = "<C-s>";
mode = "n";
action = "<cmd>w<CR>";
silent = true;
noremap = true;
}
{ key = "<leader>o"; mode = "n"; action = "<cmd>Neotree toggle<CR>"; silent = true; noremap = true; }
{ key = "<leader>tf"; mode = "n"; action = "<cmd>ToggleTerm direction=float<CR>"; silent = true; noremap = true; }
{ key = "<leader>th"; mode = "n"; action = "<cmd>ToggleTerm direction=horizontal<CR>"; silent = true; noremap = true; }
{ key = "<leader>tv"; mode = "n"; action = "<cmd>ToggleTerm direction=vertical<CR>"; silent = true; noremap = true; }
{ key = "<leader>n"; mode = "n"; action = "<nop>"; desc = "Notes"; silent = true; noremap = true; }
{ key = "<leader>nd"; mode = "n"; action = "<cmd>Obsidian today<CR>"; desc = "Obsidian daily note"; silent = true; noremap = true; }
{ key = "<leader>nf"; mode = "n"; action = "<cmd>Obsidian quick_switch<CR>"; desc = "Obsidian find note"; silent = true; noremap = true; }
{ key = "<leader>ns"; mode = "n"; action = "<cmd>Obsidian search<CR>"; desc = "Obsidian search notes"; silent = true; noremap = true; }
{ key = "<leader>nn"; mode = "n"; action = "<cmd>Obsidian new<CR>"; desc = "Obsidian new note"; silent = true; noremap = true; }
{ key = "<leader>ff"; mode = "n"; action = "<cmd>Telescope find_files<CR>"; silent = true; noremap = true; }
{ key = "<leader>fD"; mode = "n"; action = "<cmd>lua require('telescope.builtin').find_files({ cwd = vim.fn.input('Dir: ', vim.loop.cwd() .. '/', 'dir') })<CR>"; silent = true; noremap = true; }
{ key = "<leader>fg"; mode = "n"; action = "<cmd>Telescope live_grep<CR>"; silent = true; noremap = true; }
{ key = "<leader>/"; mode = "n"; action = "<cmd>Telescope current_buffer_fuzzy_find<CR>"; silent = true; noremap = true; }
{ key = "<leader>gb"; mode = "n"; action = "<cmd>Telescope git_branches<CR>"; silent = true; noremap = true; }
{ key = "<leader>gc"; mode = "n"; action = "<cmd>Telescope git_commits<CR>"; silent = true; noremap = true; }
{ key = "<leader>gl"; mode = "n"; action = "<cmd>Telescope git_bcommits<CR>"; silent = true; noremap = true; }
{ key = "<leader>gr"; mode = "n"; action = "<cmd>Telescope git_status<CR>"; silent = true; noremap = true; }
];
};
}; };
}; };
} }
-4
View File
@@ -84,9 +84,6 @@ in {
ollama-rocm ollama-rocm
newelle newelle
vlc vlc
mediainfo
makemkv
ffmpeg
]; ];
# Enable Polkit # Enable Polkit
@@ -128,7 +125,6 @@ in {
ffxiv.enable = true; ffxiv.enable = true;
archon.enable = true; archon.enable = true;
minecraft.enable = true; minecraft.enable = true;
aagl.wavey-launcher.enable = true;
vintage-story.enable = true; vintage-story.enable = true;
}; };