mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-14 17:35:31 +00:00
yeehaw
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled
This commit is contained in:
parent
c980c44920
commit
b049b797a4
18 changed files with 48 additions and 39 deletions
|
|
@ -7,7 +7,7 @@
|
|||
} @ inputs: let
|
||||
# call the extended library with `inputs`
|
||||
# inputs is used to get the original standard library, and to pass inputs to the plugin autodiscovery function
|
||||
lib = import ./lib/stdlib-extended.nix inputs;
|
||||
lib = import ./lib/stdlib-extended.nix {inherit inputs self;};
|
||||
in
|
||||
flake-parts.lib.mkFlake {
|
||||
inherit inputs;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
types = import ./types {inherit inputs lib;};
|
||||
types = import ./types {inherit self inputs lib;};
|
||||
|
||||
config = import ./config.nix {inherit lib;};
|
||||
binds = import ./binds.nix {inherit lib;};
|
||||
|
|
@ -12,5 +13,5 @@
|
|||
lists = import ./lists.nix {inherit lib;};
|
||||
attrsets = import ./attrsets.nix {inherit lib;};
|
||||
lua = import ./lua.nix {inherit lib;};
|
||||
neovimConfiguration = import ../modules {inherit inputs lib;};
|
||||
neovimConfiguration = import ../modules {inherit self inputs lib;};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
# Convenience function that returns the given Nixpkgs standard library
|
||||
# extended with our functions using `lib.extend`.
|
||||
inputs:
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
...
|
||||
} @ args:
|
||||
inputs.nixpkgs.lib.extend (self: super: {
|
||||
# WARNING: New functions should not be added here, but to files
|
||||
# imported by `./default.nix` under their own categories. If your
|
||||
|
|
@ -12,7 +16,7 @@ inputs.nixpkgs.lib.extend (self: super: {
|
|||
# E.g. for an input called `nvf`, `inputs.nvf.lib.nvim` will return the set
|
||||
# below.
|
||||
nvim = import ./. {
|
||||
inherit inputs;
|
||||
inherit (args) inputs self;
|
||||
lib = self;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
typesDag = import ./dag.nix {inherit lib;};
|
||||
typesPlugin = import ./plugins.nix {inherit inputs lib;};
|
||||
typesPlugin = import ./plugins.nix {inherit self inputs lib;};
|
||||
typesLanguage = import ./languages.nix {inherit lib;};
|
||||
customTypes = import ./custom.nix {inherit lib;};
|
||||
in {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair;
|
||||
inherit (lib.strings) hasPrefix removePrefix;
|
||||
inherit (lib.types) submodule either package enum str lines attrsOf anything listOf nullOr;
|
||||
inherit (lib.strings) hasPrefix removePrefix replaceStrings toLower;
|
||||
inherit (lib.types) submodule either package enum str lines anything listOf nullOr;
|
||||
|
||||
# Get the names of all flake inputs that start with the given prefix.
|
||||
fromInputs = {
|
||||
|
|
@ -16,10 +17,7 @@
|
|||
mapAttrs' (n: v: nameValuePair (removePrefix prefix n) {src = v;}) (filterAttrs (n: _: hasPrefix prefix n) inputs);
|
||||
|
||||
# Get the names of all flake inputs that start with the given prefix.
|
||||
pluginInputNames = attrNames (fromInputs {
|
||||
inherit inputs;
|
||||
prefix = "plugin-";
|
||||
});
|
||||
pluginInputNames = map (pin: replaceStrings ["." "_"] ["-" "-"] (toLower pin)) (attrNames self.pins);
|
||||
|
||||
# You can either use the name of the plugin or a package.
|
||||
pluginType = nullOr (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
lib,
|
||||
}: {
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
specialArgs =
|
||||
extraSpecialArgs
|
||||
// {
|
||||
inherit inputs;
|
||||
inherit self inputs;
|
||||
modulesPath = toString ./.;
|
||||
};
|
||||
modules = concatLists [
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ in {
|
|||
config = mkIf (cfg.enable && cfg.lspSignature.enable) {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"lsp-signature"
|
||||
"lsp-signature-nvim"
|
||||
];
|
||||
|
||||
lsp.lspSignature.setupOpts = {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ in {
|
|||
{
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"none-ls"
|
||||
"none-ls-nvim"
|
||||
"plenary-nvim"
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ in {
|
|||
config = mkIf (cfg.enable && cfg.trouble.enable) {
|
||||
vim = {
|
||||
lazy.plugins.trouble = {
|
||||
package = "trouble";
|
||||
package = "trouble-nvim";
|
||||
setupModule = "trouble";
|
||||
inherit (cfg.trouble) setupOpts;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"todo-comments"
|
||||
"todo-comments-nvim"
|
||||
];
|
||||
|
||||
maps.normal = mkMerge [
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ in {
|
|||
})
|
||||
(mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["lualine"];
|
||||
startPlugins = ["lualine-nvim"];
|
||||
pluginRC.lualine = entryAnywhere ''
|
||||
local lualine = require('lualine')
|
||||
lualine.setup ${toLuaObject cfg.setupOpts}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["smartcolumn"];
|
||||
startPlugins = ["smartcolumn-nvim"];
|
||||
|
||||
pluginRC.smartcolumn = entryAnywhere ''
|
||||
require("smartcolumn").setup(${toLuaObject cfg.setupOpts})
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["which-key"];
|
||||
startPlugins = ["which-key-nvim"];
|
||||
|
||||
pluginRC.whichkey = entryAnywhere ''
|
||||
local wk = require("which-key")
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ in {
|
|||
startPlugins = ["plenary-nvim"];
|
||||
|
||||
lazy.plugins.telescope = {
|
||||
package = "telescope";
|
||||
package = "telescope-nvim";
|
||||
setupModule = "telescope";
|
||||
inherit (cfg) setupOpts;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["highlight-undo"];
|
||||
startPlugins = ["highlight-undo-nvim"];
|
||||
|
||||
pluginRC.highlight-undo = entryAnywhere ''
|
||||
require("highlight-undo").setup(${toLuaObject cfg.setupOpts})
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["indent-blankline"];
|
||||
startPlugins = ["indent-blankline-nvim"];
|
||||
|
||||
pluginRC.indent-blankline = entryAnywhere ''
|
||||
require("ibl").setup(${toLuaObject cfg.setupOpts})
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
self,
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}
|
||||
: let
|
||||
|
|
@ -15,15 +16,15 @@
|
|||
vimOptions = config.vim;
|
||||
|
||||
noBuildPlug = pname: let
|
||||
input = inputs."plugin-${pname}";
|
||||
version = input.shortRev or input.shortDirtyRev or "dirty";
|
||||
pin = self.pins.${pname};
|
||||
version = pin.revision or "dirty";
|
||||
in {
|
||||
# vim.lazy.plugins relies on pname, so we only set that here
|
||||
# version isn't needed for anything, but inherit it anyway for correctness
|
||||
inherit pname version;
|
||||
outPath = path {
|
||||
name = "${pname}-0-unstable-${version}";
|
||||
path = input.outPath;
|
||||
path = pin.outPath;
|
||||
};
|
||||
passthru.vimPlugin = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -84,6 +84,21 @@
|
|||
"url": "https://github.com/famiu/bufdelete.nvim/archive/f6bcea78afb3060b198125256f897040538bcb81.tar.gz",
|
||||
"hash": "0xfzk3zgnxbwnr55n3lglsb8nmhnchpiqz9d152xr6j8d9z0sdcn"
|
||||
},
|
||||
"catppuccin": {
|
||||
"type": "GitRelease",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nvim"
|
||||
},
|
||||
"pre_releases": false,
|
||||
"version_upper_bound": null,
|
||||
"release_prefix": null,
|
||||
"version": "v1.9.0",
|
||||
"revision": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5",
|
||||
"url": "https://api.github.com/repos/catppuccin/nvim/tarball/v1.9.0",
|
||||
"hash": "1y5f1fj672q8drr06q6w8yhwrqzp0265jb2gmr0ql8m3hd1v0sj0"
|
||||
},
|
||||
"ccc.nvim": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
@ -1266,18 +1281,6 @@
|
|||
"url": "https://github.com/MunifTanjim/nui.nvim/archive/53e907ffe5eedebdca1cd503b00aa8692068ca46.tar.gz",
|
||||
"hash": "1m4vlf9qcs01a8qrq3salcz966sp8cpf01gbrg8dbf255vzc8kp9"
|
||||
},
|
||||
"nvim": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nvim"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "f67b886d65a029f12ffa298701fb8f1efd89295d",
|
||||
"url": "https://github.com/catppuccin/nvim/archive/f67b886d65a029f12ffa298701fb8f1efd89295d.tar.gz",
|
||||
"hash": "0fwgsvlxvzz5r8jfmj1fp97cqv9b9h2f37fn4nhmim5lm6d0n14p"
|
||||
},
|
||||
"nvim-autopairs": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue