feat(home): move nvf config to homes and use home-manager modules

This commit is contained in:
Mohammad Rafiq 2025-06-14 18:52:44 +08:00
parent af7226d30e
commit 1a3ff4b92a
No known key found for this signature in database
21 changed files with 40 additions and 50 deletions

View file

@ -11,7 +11,6 @@
screensaver.enable = lib.mkEnableOption "";
screensaver.timeout = lib.pantheon.mkStrOption;
screensaver.command = lib.pantheon.mkStrOption;
editor = lib.pantheon.mkStrOption;
file-browser = lib.pantheon.mkStrOption;
multiplexer = lib.pantheon.mkStrOption;
fetch = lib.pantheon.mkStrOption;

View file

@ -1,31 +0,0 @@
{ lib }:
{
blink-cmp = {
enable = true;
friendly-snippets.enable = true;
sourcePlugins = {
ripgrep.enable = true;
spell.enable = true;
};
setupOpts = {
completion.documentation.auto_show_delay_ms = 0;
signature.enabled = true;
enabled =
lib.generators.mkLuaInline
# lua
''
--- Disable completion for markdown
function()
return not vim.tbl_contains({"markdown"}, vim.bo.filetype)
and vim.bo.buftype ~= "prompt"
and vim.b.completion ~= false
end
'';
cmdline = {
enabled = true;
sources = null;
completion.menu.auto_show = false;
};
};
};
}

View file

@ -1,15 +0,0 @@
{
hardtime-nvim = {
enable = true;
setupOpts = {
max_count = 1;
disabled_keys = {
"<Up>" = [ ];
"<Down>" = [ ];
"<Right>" = [ ];
"<Left>" = [ ];
};
};
};
whichKey.enable = true;
}

View file

@ -1,2 +0,0 @@
{
}

View file

@ -1,46 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf (config.cli.editor == "nvf") {
home.sessionVariables.EDITOR = "nvim";
home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [
".local/share/nvf"
];
programs.nvf = {
enable = true;
settings.vim = {
startPlugins = [ pkgs.pantheon.snippets ];
hideSearchHighlight = true;
syntaxHighlighting = true;
telescope.enable = true;
searchCase = "ignore";
undoFile.enable = true;
fzf-lua.enable = true;
git.enable = true;
git.gitsigns.enable = false;
autocomplete = import ./autocomplete.nix { inherit lib; };
autopairs.nvim-autopairs.enable = true;
binds = import ./binds.nix;
clipboard = import ./clipboard.nix;
diagnostics = import ./diagnostics.nix;
keymaps = import ./keymaps.nix;
languages = import ./languages.nix;
lsp = import ./lsp.nix;
navigation = import ./navigation.nix;
notes = import ./notes.nix;
options = import ./options.nix;
notify = import ./notify.nix;
snippets = import ./snippets.nix;
statusline = import ./statusline.nix;
treesitter = import ./treesitter.nix;
ui = import ./ui.nix;
utility = import ./utility.nix;
visuals = import ./visuals.nix;
};
};
};
}

View file

@ -1,2 +0,0 @@
{
}

View file

@ -1,23 +0,0 @@
[
{
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
key = "gf";
mode = "n";
action = ":cd %:p:h<CR>:e <cfile><CR>";
silent = true;
}
{
desc = "";
key = "<C-u>";
mode = "n";
action = "<C-u>zz";
silent = true;
}
{
desc = "";
key = "<C-d>";
mode = "n";
action = "<C-d>zz";
silent = true;
}
]

View file

@ -1,29 +0,0 @@
{
enableExtraDiagnostics = true;
enableFormat = true;
enableTreesitter = true;
bash.enable = true;
clang.enable = true;
csharp.enable = true;
css.enable = true;
go.enable = true;
html.enable = true;
lua.enable = true;
markdown.enable = true;
markdown.extensions.markview-nvim.enable = true;
markdown.format.type = "prettierd";
nix = {
enable = true;
format.type = "nixfmt";
lsp.server = "nil";
};
python.enable = true;
python.lsp.server = "python-lsp-server";
rust.enable = true;
rust.crates.enable = true;
ts.enable = true;
ts.extensions.ts-error-translator.enable = true;
typst.enable = true;
typst.extensions.typst-preview-nvim.enable = true;
yaml.enable = true;
}

View file

@ -1,9 +0,0 @@
{
enable = true;
formatOnSave = true;
inlayHints.enable = true;
lightbulb.enable = true;
lspkind.enable = true;
null-ls.enable = true;
otter-nvim.enable = true;
}

View file

@ -1,5 +0,0 @@
{
harpoon = {
enable = true;
};
}

View file

@ -1,3 +0,0 @@
{
todo-comments.enable = true;
}

View file

@ -1,2 +0,0 @@
{
}

View file

@ -1,11 +0,0 @@
{
scroll = 1;
autoindent = true;
backspace = "indent,eol,start";
cursorline = true;
expandtab = true;
shiftwidth = 2;
smartindent = true;
tabstop = 2;
updatetime = 0;
}

View file

@ -1,6 +0,0 @@
{
luasnip = {
enable = true;
setupOpts.enable_autosnippets = true;
};
}

View file

@ -1,12 +0,0 @@
{
lualine = {
enable = true;
refresh = {
statusline = 10;
winbar = 10;
};
activeSection = {
};
};
}

View file

@ -1,6 +0,0 @@
{
autotagHtml = true;
fold = true;
indent.disable = [ "markdown" ];
textobjects.enable = true;
}

View file

@ -1,13 +0,0 @@
{
borders = {
enable = true;
globalStyle = "rounded";
};
breadcrumbs.enable = true;
colorizer.enable = true;
illuminate.enable = true;
noice.enable = true;
noice.setupOpts.notify.enabled = false;
nvim-ufo.enable = true;
smartcolumn.enable = true;
}

View file

@ -1,14 +0,0 @@
{
ccc.enable = true;
leetcode-nvim.enable = true;
mkdir.enable = true;
motion.hop.enable = true;
yazi-nvim = {
enable = true;
mappings = {
openYazi = "<leader>tt";
openYaziDir = "<leader>TT";
};
setupOpts.open_for_directories = true;
};
}

View file

@ -1,8 +0,0 @@
{
indent-blankline.enable = true;
fidget-nvim.enable = true;
fidget-nvim.setupOpts.notification.override_vim_notify = true;
nvim-cursorline.enable = true;
nvim-web-devicons.enable = true;
rainbow-delimiters.enable = true;
}