mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-08 09:09:49 +01:00
Compare commits
11 commits
7a13ba9d8f
...
27df3a0970
Author | SHA1 | Date | |
---|---|---|---|
27df3a0970 | |||
a1bac1d356 | |||
|
de02e2fa57 | ||
|
c071f2caa2 | ||
|
92e38fbfae | ||
|
ee4c072ba3 | ||
9888a277ad | |||
b7bea89d9a | |||
9584fe25e2 | |||
eb6e8b17b7 | |||
fcc6aa485c |
21 changed files with 193 additions and 35 deletions
36
.github/README.md
vendored
36
.github/README.md
vendored
|
@ -206,6 +206,16 @@ features.
|
|||
|
||||
## Credits
|
||||
|
||||
### Co-Maintainers
|
||||
|
||||
Alongside myself, nvf is developed by those talented folk:
|
||||
|
||||
- [**@horriblename**](https://github.com/horriblename) - For actively
|
||||
implementing planned features and quality of life updates.
|
||||
- [**@Diniamo**](https://github.com/Diniamo)
|
||||
([Liberapay](https://en.liberapay.com/diniamo/)) - For actively submitting
|
||||
pull requests, issues and assistance with maintenance of nvf.
|
||||
|
||||
### Contributors
|
||||
|
||||
[mnw]: https://github.com/gerg-l/mnw
|
||||
|
@ -213,21 +223,19 @@ features.
|
|||
nvf would not be what it is today without the awesome people below. Special,
|
||||
heart-felt thanks to
|
||||
|
||||
- [@fufexan](https://github.com/fufexan) - For the transition to flake-parts and
|
||||
invaluable Nix assistance.
|
||||
- [@FlafyDev](https://github.com/FlafyDev) - For getting home-manager module to
|
||||
work and Nix assistance.
|
||||
- [@n3oney](https://github.com/n3oney) - For making custom keybinds finally
|
||||
- [**@fufexan**](https://github.com/fufexan) - For the transition to flake-parts
|
||||
and invaluable Nix assistance.
|
||||
- [**@FlafyDev**](https://github.com/FlafyDev) - For getting Home-Manager module
|
||||
to work and Nix assistance.
|
||||
- [**@n3oney**](https://github.com/n3oney) - For making custom keybinds finally
|
||||
possible, and other module additions.
|
||||
- [@horriblename](https://github.com/horriblename) - For actively implementing
|
||||
planned features and quality of life updates.
|
||||
- [@Yavko](https://github.com/Yavko) - For the amazing **nvf** logo
|
||||
- [@FrothyMarrow](https://github.com/FrothyMarrow) - For seeing mistakes that I
|
||||
could not.
|
||||
- [@Diniamo](https://github.com/Diniamo) - For actively submitting pull
|
||||
requests, issues and assistance with maintenance of nvf.
|
||||
- [@Gerg-l](https://github.com/gerg-l) - For the modern Neovim wrapper, [mnw],
|
||||
and occasional code improvements.
|
||||
- [**@Yavko**](https://github.com/Yavko) - For the amazing **nvf** logo
|
||||
- [**@FrothyMarrow**](https://github.com/FrothyMarrow) - For seeing mistakes
|
||||
that I could not.
|
||||
- [**@Gerg-l**](https://github.com/gerg-l) 🐸 - For the modern Neovim wrapper,
|
||||
[mnw], and occasional code improvements.
|
||||
- [**@Soliprem**](https://github.com/soliprem) - Rigorously implementing missing
|
||||
features and excellent work on new language modules.
|
||||
|
||||
and everyone who has submitted issues or pull requests!
|
||||
|
||||
|
|
|
@ -44,12 +44,15 @@ Followed by importing the home-manager module somewhere in your configuration.
|
|||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, nvf, ... }: let
|
||||
system = "x86_64-linux"; in {
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
# ↓ this is your home output in the flake schema, expected by home-manager
|
||||
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration
|
||||
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
nvf.homeManagerModules.default # <- this imports the home-manager module that provides the options
|
||||
./home.nix # <- your home entrypoint
|
||||
./home.nix # <- your home entrypoint, `programs.nvf.*` may be defined here
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -42,13 +42,12 @@ Followed by importing the NixOS module somewhere in your configuration.
|
|||
nvf.url = "github:notashelf/nvf";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, nvf, ... }: let
|
||||
system = "x86_64-linux"; in {
|
||||
outputs = { nixpkgs, nvf, ... }: {
|
||||
# ↓ this is your host output in the flake schema
|
||||
nixosConfigurations."yourUsername»" = nixpkgs.lib.nixosSystem {
|
||||
nixosConfigurations."your-hostname" = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
nvf.nixosModules.default # <- this imports the NixOS module that provides the options
|
||||
./configuration.nix # <- your host entrypoint
|
||||
./configuration.nix # <- your host entrypoint, `programs.nvf.*` may be defined here
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,6 +11,7 @@ try-it-out.md
|
|||
default-configs.md
|
||||
installation.md
|
||||
configuring.md
|
||||
tips.md
|
||||
```
|
||||
|
||||
```{=include=} chapters
|
||||
|
|
6
docs/manual/tips.md
Normal file
6
docs/manual/tips.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Helpful Tips {#ch-helpful-tips}
|
||||
|
||||
```{=include=} chapters
|
||||
tips/debugging-nvf.md
|
||||
tips/offline-docs.md
|
||||
```
|
19
docs/manual/tips/debugging-nvf.md
Normal file
19
docs/manual/tips/debugging-nvf.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Debugging nvf {#sec-debugging-nvf}
|
||||
|
||||
There may be instances where the your Nix configuration evaluates to invalid
|
||||
Lua, or times when you will be asked to provide your built Lua configuration for
|
||||
easier debugging by nvf maintainers. nvf provides two helpful utilities out of
|
||||
the box.
|
||||
|
||||
**nvf-print-config** and **nvf-print-config-path** will be bundled with nvf as
|
||||
lightweight utilities to help you view or share your built configuration when
|
||||
necessary.
|
||||
|
||||
To view your configuration with syntax highlighting, you may use the
|
||||
[bat pager](https://github.com/sharkdp/bat).
|
||||
|
||||
```bash
|
||||
nvf-print-config | bat --language=lua
|
||||
```
|
||||
|
||||
Alternatively, `cat` or `less` may also be used.
|
11
docs/manual/tips/offline-docs.md
Normal file
11
docs/manual/tips/offline-docs.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Offline Documentation {#sec-offline-documentation}
|
||||
|
||||
[https://notashelf.github.io/nvf/options.html]: https://notashelf.github.io/nvf/options.html
|
||||
|
||||
The manpages provided by nvf contains an offline version of the option search
|
||||
normally available at [https://notashelf.github.io/nvf/options.html]. You may
|
||||
use the `man 5 nvf` command to view option documentation from the comfort of
|
||||
your terminal.
|
||||
|
||||
Note that this is only available for NixOS and Home-Manager module
|
||||
installations.
|
|
@ -13,6 +13,9 @@
|
|||
- Add [render-markdown.nvim] under
|
||||
`languages.markdown.extensions.render-markdown-nvim`
|
||||
|
||||
- Implement [](#opt-vim.git.gitsigns.setupOpts) for user-specified setup table
|
||||
in gitsigns configuration.
|
||||
|
||||
[amadaluzia](https://github.com/amadaluzia):
|
||||
|
||||
[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim
|
||||
|
@ -25,3 +28,9 @@
|
|||
|
||||
- Disable the built-in format-on-save feature of zls. Use `vim.lsp.formatOnSave`
|
||||
instead.
|
||||
|
||||
[horriblename](https://github.com/horriblename):
|
||||
|
||||
[aerial.nvim](https://github.com/stevearc/aerial.nvim)
|
||||
|
||||
- Add [aerial.nvim]
|
||||
|
|
17
flake.lock
17
flake.lock
|
@ -156,6 +156,22 @@
|
|||
"type": "sourcehut"
|
||||
}
|
||||
},
|
||||
"plugin-aerial-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736064692,
|
||||
"narHash": "sha256-7YQtkUTACTMfAGoqoFDPmRrqtw+ypxDbeLCTB3sy4Us=",
|
||||
"owner": "stevearc",
|
||||
"repo": "aerial.nvim",
|
||||
"rev": "b3ec25ca8c347fafa976484a6cace162239112e1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "stevearc",
|
||||
"repo": "aerial.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-alpha-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -2090,6 +2106,7 @@
|
|||
"nil": "nil",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nmd": "nmd",
|
||||
"plugin-aerial-nvim": "plugin-aerial-nvim",
|
||||
"plugin-alpha-nvim": "plugin-alpha-nvim",
|
||||
"plugin-base16": "plugin-base16",
|
||||
"plugin-bufdelete-nvim": "plugin-bufdelete-nvim",
|
||||
|
|
|
@ -730,5 +730,10 @@
|
|||
url = "github:mrcjkb/haskell-tools.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
plugin-aerial-nvim = {
|
||||
url = "github:stevearc/aerial.nvim";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.strings) optionalString;
|
||||
|
@ -11,8 +11,7 @@
|
|||
inherit (lib.nvim.binds) pushDownDefault;
|
||||
|
||||
cfg = config.vim.filetree.nvimTree;
|
||||
self = import ./nvimtree.nix {inherit pkgs lib;};
|
||||
inherit (self.options.vim.filetree.nvimTree) mappings;
|
||||
inherit (options.vim.filetree.nvimTree) mappings;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetExprBinding mkSetLuaBinding pushDownDefault;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.git.gitsigns;
|
||||
|
||||
|
@ -70,7 +71,7 @@ in {
|
|||
};
|
||||
|
||||
pluginRC.gitsigns = entryAnywhere ''
|
||||
require('gitsigns').setup{}
|
||||
require('gitsigns').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.modules) mkRenamedOptionModule;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
imports = [
|
||||
(mkRenamedOptionModule ["vim" "git" "gitsigns" "codeActions" "vim" "gitsigns" "codeActions"] ["vim" "git" "gitsigns" "codeActions" "enable"])
|
||||
|
@ -13,6 +14,7 @@ in {
|
|||
|
||||
options.vim.git.gitsigns = {
|
||||
enable = mkEnableOption "gitsigns" // {default = config.vim.git.enable;};
|
||||
setupOpts = mkPluginSetupOption "gitsigns" {};
|
||||
|
||||
codeActions.enable = mkEnableOption "gitsigns codeactions through null-ls";
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./outline
|
||||
./binds
|
||||
./ccc
|
||||
./gestures
|
||||
|
|
14
modules/plugins/utility/outline/aerial-nvim/aerial-nvim.nix
Normal file
14
modules/plugins/utility/outline/aerial-nvim/aerial-nvim.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
in {
|
||||
options.vim.utility.outline.aerial-nvim = {
|
||||
enable = mkEnableOption "Aerial.nvim";
|
||||
setupOpts = mkPluginSetupOption "aerial.nvim" {};
|
||||
|
||||
mappings = {
|
||||
toggle = mkMappingOption "Toggle aerial window" "gO";
|
||||
};
|
||||
};
|
||||
}
|
42
modules/plugins/utility/outline/aerial-nvim/config.nix
Normal file
42
modules/plugins/utility/outline/aerial-nvim/config.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.binds) mkKeymap;
|
||||
|
||||
cfg = config.vim.utility.outline.aerial-nvim;
|
||||
inherit (options.vim.utility.outline.aerial-nvim) mappings;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
lazy.plugins.aerial-nvim = {
|
||||
package = "aerial-nvim";
|
||||
|
||||
setupModule = "aerial";
|
||||
inherit (cfg) setupOpts;
|
||||
|
||||
cmd = [
|
||||
"AerialClose"
|
||||
"AerialCloseAll"
|
||||
"AerialGo"
|
||||
"AerialInfo"
|
||||
"AerialNavClose"
|
||||
"AerialNavOpen"
|
||||
"AerialNavToggle"
|
||||
"AerialNext"
|
||||
"AerialOpen"
|
||||
"AerialOpenAll"
|
||||
"AerialPrev"
|
||||
"AerialToggle"
|
||||
];
|
||||
|
||||
keys = [
|
||||
(mkKeymap "n" cfg.mappings.toggle ":AerialToggle<CR>" {desc = mappings.toggle.description;})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
modules/plugins/utility/outline/aerial-nvim/default.nix
Normal file
6
modules/plugins/utility/outline/aerial-nvim/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./aerial-nvim.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
5
modules/plugins/utility/outline/default.nix
Normal file
5
modules/plugins/utility/outline/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./aerial-nvim
|
||||
];
|
||||
}
|
|
@ -1,18 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.meta) getExe;
|
||||
|
||||
cfg = config.vim.utility.vim-wakatime;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [pkgs.vimPlugins.vim-wakatime];
|
||||
vim = {
|
||||
startPlugins = [pkgs.vimPlugins.vim-wakatime];
|
||||
|
||||
vim.pluginRC.vim-wakatime = mkIf (cfg.cli-package != null) ''
|
||||
vim.g.wakatime_CLIPath = "${cfg.cli-package}"
|
||||
'';
|
||||
# Wakatime configuration is stored as vim globals.
|
||||
globals = {
|
||||
"wakatime_CLIPath" = mkIf (cfg.cli-package != null) "${getExe cfg.cli-package}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./vim-wakatime.nix
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) nullOr package;
|
||||
in {
|
||||
options.vim.utility.vim-wakatime = {
|
||||
enable = mkEnableOption "vim-wakatime: live code statistics";
|
||||
enable = mkEnableOption ''
|
||||
automatic time tracking and metrics generated from your programming activity [vim-wakatime]
|
||||
'';
|
||||
|
||||
cli-package = mkOption {
|
||||
type = nullOr package;
|
||||
default = pkgs.wakatime;
|
||||
description = "The package that should be used for wakatime-cli. Set as null to use the default path in `$XDG_DATA_HOME`";
|
||||
default = pkgs.wakatime-cli;
|
||||
example = null;
|
||||
description = ''
|
||||
The package that should be used for wakatime-cli.
|
||||
Set as null to use the default path in {env}`$XDG_DATA_HOME`
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue