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