Compare commits

..

No commits in common. "8e3d0c90a89709f6a39460831367b7dcea6c8dcd" and "34ed24d47037c63ab54baea759c74066e3f5734a" have entirely different histories.

2 changed files with 27 additions and 87 deletions

View file

@ -17,7 +17,7 @@
enableSshSupport = true;
maxCacheTtl = 72000;
maxCacheTtlSsh = 72000;
pinentryPackage = if config.minimal then pkgs.pinentry.tty else pkgs.pinentry.qt;
pinentryPackage = pkgs.pinentry.tty;
};
home.shellAliases = {
s = "sudo -A";

View file

@ -73,11 +73,9 @@
luasnip = REQ "luasnip";
plugins = let ps = pkgs.vimPlugins; in [
{ plugin = ps.vim-svelte; }
ps.vim-svelte
# vim-nix isn't necessary for syntax highlighting, but it improves overall editing experience
{ plugin = ps.vim-nix; }
# the latest version of vscode-nvim has breaking changes and i'm too lazy to migrate
# FIXME: migrate
ps.vim-nix
{ plugin = pkgs.vimUtils.buildVimPlugin {
pname = "vscode-nvim";
version = "2023-02-10";
@ -111,12 +109,14 @@
bg = "NONE";
})
]; }
{ settings.plugins.web-devicons.enable = true; }
{ settings.plugins.nvim-tree.enable = true;
settings.globalOpts.termguicolors = true;
settings.globals.loaded_netrw = 1;
settings.globals.loaded_netrwPlugin = 1;
{ plugin = ps.nvim-web-devicons;
config = ((REQ "nvim-web-devicons").setup { }); }
{ plugin = ps.nvim-tree-lua;
config = (LET (REQ "nvim-tree") (REQ "nvim-tree.api") (nvim-tree: nvim-tree-api: [
(SET (vimg "loaded_netrw") 1)
(SET (vimg "loaded_netrwPlugin") 1)
(SET vim.o.termguicolors true)
(nvim-tree.setup { }) # :help nvim-tree-setup
(kmSetNs {
"<C-N>" = {
rhs = nvim-tree-api.tree.toggle;
@ -124,10 +124,9 @@
};
})
])); }
{ settings.plugins.sleuth.enable = true; }
{ settings.plugins.luasnip.enable = true; }
ps.vim-sleuth
ps.luasnip
{ plugin = ps.nvim-cmp;
settings.plugins.cmp.enable = false;
config = let
border = (name: [
[ "" name ]
@ -198,15 +197,13 @@
sources = cmp.config.sources [
{ name = "nvim_lsp"; }
{ name = "luasnip"; }
{ name = "neorg"; }
];
}
)); }
{ settings.plugins.lspkind.enable = true; }
{ settings.plugins.cmp_luasnip.enable = true; }
{ settings.plugins.cmp-nvim-lsp.enable = true; }
ps.lspkind-nvim
ps.cmp_luasnip
ps.cmp-nvim-lsp
{ plugin = ps.nvim-autopairs;
settings.plugins.nvim-autopairs.enable = false;
config = (LET
(REQ "cmp") (REQ "nvim-autopairs.completion.cmp") (REQ "nvim-autopairs")
(cmp: cmp-autopairs: nvim-autopairs:
@ -216,9 +213,9 @@
})
(cmp.event.on cmp.event "confirm_done" (cmp-autopairs.on_confirm_done { }))
])); }
{ settings.plugins.comment.enable = true;
{ plugin = ps.comment-nvim;
config = [
# ((REQ "Comment").setup { })
((REQ "Comment").setup { })
(kmSetNs {
"<space>/" = {
# metatables......
@ -234,7 +231,6 @@
})
]; }
{ plugin = ps.nvim-lspconfig;
settings.plugins.lsp.enable = false;
config = (
let lsp = name: builtins.seq
# ensure an lsp exists (otherwise lspconfig will still create an empty config for some reason)
@ -378,70 +374,14 @@
]) # END
)) # END
]); }
{ settings.plugins.which-key.enable = true;
settings.globalOpts.timeout = true;
settings.globalOpts.timeoutlen = 500; }
{ settings.plugins.treesitter = {
enable = true;
grammarPackages = with pkgs.tree-sitter-grammars; [
tree-sitter-norg
tree-sitter-norg-meta
];
settings.highlight.enable = true;
}; }
{ settings.plugins.image = {
enable = true;
backend = "kitty";
integrations = {
markdown = {
enabled = true;
downloadRemoteImages = false;
};
neorg = {
enabled = true;
downloadRemoteImages = true;
};
};
}; }
{ settings.plugins.telescope.enable = true; }
{ plugin = ps.neorg;
# TODO: remove when bumping inputs https://github.com/nix-community/nixvim/issues/1395
settings.extraLuaPackages = (x: with x; [
lua-utils-nvim
pathlib-nvim
nvim-nio
]);
config = (REQ "neorg").setup {
load = {
"core.defaults" = { };
"core.completion".config = {
engine = "nvim-cmp";
};
"core.concealer" = { };
"core.dirman".config = {
workspaces.ws = "~/notes";
default_workspace = "ws";
};
"core.esupports.metagen".config = {
author = "chayleaf";
timezone = "utc";
type = "empty";
};
"core.integrations.nvim-cmp" = { };
"core.integrations.image" = { };
"core.integrations.treesitter".config = {
# install_parsers = false;
};
"core.journal".config = {
workspace = "ws";
};
"core.keybinds" = { };
"core.latex.renderer" = { };
};
}; }
{ plugin = ps.neorg-telescope; }
{ plugin = ps.which-key-nvim;
config = [
(SET vim.o.timeout true)
(SET vim.o.timeoutlen 500)
(which-key.setup { })
]; }
];
in lib.mkMerge ((builtins.concatLists (map (x: lib.toList (x.settings or [ ])) plugins)) ++ lib.toList {
in {
enable = true;
defaultEditor = true;
package = pkgs.neovim-unwrapped;
@ -473,7 +413,7 @@
vimdiffAlias = true;
extraConfigLua = compile "main" (
builtins.concatLists (map (x: if x?plugin && x?config then lib.toList x.config else [ ]) plugins) ++ [
builtins.concatLists (map (x: if x?plugin then lib.toList x.config else [ ]) plugins) ++ [
(kmSetNs {
"<C-X>" = {
rhs = DEFUN (vim.fn.system [ "chmod" "+x" (vim.fn.expand "%") ]);
@ -535,6 +475,6 @@
}
))
]);
extraPlugins = builtins.filter (x: x != null) (map (x: x.plugin or null) plugins);
});
extraPlugins = map (x: x.plugin or x) plugins;
};
}