cleanup nvim merge and general janitorial work
This commit is contained in:
parent
c544159576
commit
db330b546d
30 changed files with 254 additions and 1300 deletions
85
pkgs/nvim/default.nix
Normal file
85
pkgs/nvim/default.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{ inputs, pkgs }:
|
||||
let
|
||||
mkNeovim =
|
||||
{
|
||||
plugins ? [ ],
|
||||
packages ? [ ],
|
||||
}:
|
||||
let
|
||||
finalPlugins = plugins ++ [
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "iofq-nvim";
|
||||
src = pkgs.lib.cleanSource ./nvim;
|
||||
version = "0.1";
|
||||
doCheck = false;
|
||||
})
|
||||
];
|
||||
wrapperArgs = ''--prefix PATH : "${pkgs.lib.makeBinPath packages}"'';
|
||||
in
|
||||
pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped {
|
||||
inherit wrapperArgs;
|
||||
plugins = finalPlugins;
|
||||
withPython3 = false;
|
||||
withRuby = false;
|
||||
vimAlias = true;
|
||||
};
|
||||
mkPlugin =
|
||||
src: pname:
|
||||
pkgs.vimUtils.buildVimPlugin {
|
||||
inherit pname src;
|
||||
version = src.lastModifiedDate;
|
||||
};
|
||||
|
||||
dart-nvim = inputs.dart.packages.x86_64-linux.default;
|
||||
jj-nvim = mkPlugin inputs.jj-nvim "jj-nvim";
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
blink-cmp
|
||||
blink-ripgrep-nvim
|
||||
conform-nvim
|
||||
dart-nvim
|
||||
jj-nvim
|
||||
mini-nvim
|
||||
nvim-autopairs
|
||||
nvim-lint
|
||||
nvim-lspconfig
|
||||
nvim-treesitter.withAllGrammars
|
||||
nvim-treesitter-textobjects
|
||||
nvim-treesitter-context
|
||||
quicker-nvim
|
||||
render-markdown-nvim
|
||||
snacks-nvim
|
||||
];
|
||||
|
||||
basePackages = with pkgs; [
|
||||
ripgrep
|
||||
fd
|
||||
];
|
||||
# Extra packages that should be included on nixos but don't need to be bundled
|
||||
extraPackages = with pkgs; [
|
||||
# linters
|
||||
yamllint
|
||||
jq
|
||||
hadolint
|
||||
nixfmt
|
||||
shellcheck
|
||||
golangci-lint
|
||||
|
||||
# LSPs
|
||||
gopls
|
||||
lua-language-server
|
||||
nixd
|
||||
basedpyright
|
||||
];
|
||||
in
|
||||
{
|
||||
nvim = mkNeovim {
|
||||
inherit plugins;
|
||||
packages = basePackages ++ extraPackages;
|
||||
};
|
||||
|
||||
nvim-min = mkNeovim {
|
||||
inherit plugins;
|
||||
packages = basePackages;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue