mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-02-27 21:41:29 +00:00
Compare commits
9 commits
41e5633550
...
6b4803878b
Author | SHA1 | Date | |
---|---|---|---|
6b4803878b | |||
aa7b55fa49 | |||
2728e65a5e | |||
a1bac1d356 | |||
![]() |
de02e2fa57 | ||
![]() |
c071f2caa2 | ||
![]() |
92e38fbfae | ||
![]() |
ee4c072ba3 | ||
9888a277ad |
18 changed files with 319 additions and 22 deletions
28
.github/README.md
vendored
28
.github/README.md
vendored
|
@ -210,12 +210,16 @@ features.
|
|||
|
||||
Alongside myself, nvf is developed by those talented folk:
|
||||
|
||||
- [**@horriblename**](https://github.com/horriblename) - For actively
|
||||
implementing planned features and quality of life updates.
|
||||
- [**@horriblename**](https://github.com/horriblename)
|
||||
([Liberapay](https://liberapay.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.
|
||||
|
||||
Please do remember to extend your thanks (financially or otherwise) if this
|
||||
project has been helpful to you.
|
||||
|
||||
### Contributors
|
||||
|
||||
[mnw]: https://github.com/gerg-l/mnw
|
||||
|
@ -245,17 +249,17 @@ This configuration borrows from and is based on a few other configurations,
|
|||
including:
|
||||
|
||||
- [@jordanisaacs's](https://github.com/jordanisaacs)
|
||||
[neovim-flake](https://github.com/jordanisaacs/neovim-flake) that this flake
|
||||
is originally based on.
|
||||
- [@sioodmy's](https://github.com/sioodmy)
|
||||
[dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design
|
||||
choices for UI and plugin defaults.
|
||||
[**neovim-flake**](https://github.com/jordanisaacs/neovim-flake) that this
|
||||
flake is originally based on.
|
||||
- [@wiltaylor's](https://github.com/wiltaylor)
|
||||
[neovim-flake](https://github.com/wiltaylor/neovim-flake) for plugin and
|
||||
design ideas.
|
||||
- [@gvolpe's](https://github.com/gvolpe)
|
||||
[neovim-flake](https://github.com/gvolpe/neovim-flake) for plugin, design and
|
||||
nix concepts.
|
||||
- [@sioodmy's](https://github.com/sioodmy)
|
||||
[dotfiles](https://github.com/sioodmy/dotfiles) that inspired the design
|
||||
choices for UI and plugin defaults.
|
||||
|
||||
I am grateful for their previous work and inspiration, and I wholeheartedly
|
||||
recommend checking their work out.
|
||||
|
@ -263,12 +267,12 @@ recommend checking their work out.
|
|||
|
||||
## License
|
||||
|
||||
Following the license of the
|
||||
[original neovim-flake](https://github.com/jordanisaacs/neovim-flake), nvf has
|
||||
been made available under the [**MIT License**](LICENSE). However, all assets
|
||||
and documentation are published under the
|
||||
Following the license of
|
||||
[the original neovim-flake](https://github.com/jordanisaacs/neovim-flake), nvf
|
||||
has been made available under the [**MIT License**](LICENSE). However, all
|
||||
assets and documentation are published under the
|
||||
[**CC BY License**](https://github.com/NotAShelf/nvf/blob/main/.github/assets/LICENSE)
|
||||
under explicit permission by the artist.
|
||||
under explicit permission by the author or authors.
|
||||
|
||||
<h6 align="center">Yes, this includes the logo work too. Stop taking artwork that is not yours!</h6>
|
||||
|
||||
|
|
|
@ -10,12 +10,18 @@ To use it, we first add the input flake.
|
|||
```nix
|
||||
{
|
||||
inputs = {
|
||||
# Optional, if you intend to follow nvf's obsidian-nvim input
|
||||
# you must also add it as a flake input.
|
||||
obsidian-nvim.url = "github:epwalsh/obsidian.nvim";
|
||||
|
||||
# Required, nvf works best and only directly supports flakes
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
# you can override input nixpkgs
|
||||
# You can override the input nixpkgs to follow your system's
|
||||
# instance of nixpkgs. This is safe to do as nvf does not depend
|
||||
# on a binary cache.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
# you can also override individual plugins
|
||||
# Optionally, you can also override individual plugins
|
||||
# for example:
|
||||
inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs
|
||||
};
|
||||
|
@ -27,8 +33,8 @@ Followed by importing the home-manager module somewhere in your configuration.
|
|||
|
||||
```nix
|
||||
{
|
||||
# assuming nvf is in your inputs and inputs is in the argset
|
||||
# see example below
|
||||
# Assuming "nvf" is in your inputs and inputs is in the argument set.
|
||||
# See example installation below
|
||||
imports = [ inputs.nvf.homeManagerModules.default ];
|
||||
}
|
||||
```
|
||||
|
|
|
@ -10,12 +10,18 @@ To use it, we first add the input flake.
|
|||
```nix
|
||||
{
|
||||
inputs = {
|
||||
# Optional, if you intend to follow nvf's obsidian-nvim input
|
||||
# you must also add it as a flake input.
|
||||
obsidian-nvim.url = "github:epwalsh/obsidian.nvim";
|
||||
|
||||
# Required, nvf works best and only directly supports flakes
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
# you can override input nixpkgs
|
||||
# You can override the input nixpkgs to follow your system's
|
||||
# instance of nixpkgs. This is safe to do as nvf does not depend
|
||||
# on a binary cache.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
# you can also override individual plugins
|
||||
# Optionally, you can also override individual plugins
|
||||
# for example:
|
||||
inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- this will use the obsidian-nvim from your inputs
|
||||
};
|
||||
|
|
|
@ -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]
|
||||
|
|
34
flake.lock
generated
34
flake.lock
generated
|
@ -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": {
|
||||
|
@ -572,6 +588,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-feline-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731467236,
|
||||
"narHash": "sha256-/TqgHJo2ej/V5bubTdTlf5S+EZmSpU5F2Mdi0SHCD30=",
|
||||
"owner": "freddiehaddad",
|
||||
"repo": "feline.nvim",
|
||||
"rev": "9f1313f61a75ec5ebe805fedd46bdc130c420963",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "freddiehaddad",
|
||||
"repo": "feline.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-fidget-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -2090,6 +2122,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",
|
||||
|
@ -2116,6 +2149,7 @@
|
|||
"plugin-dressing-nvim": "plugin-dressing-nvim",
|
||||
"plugin-elixir-tools": "plugin-elixir-tools",
|
||||
"plugin-fastaction-nvim": "plugin-fastaction-nvim",
|
||||
"plugin-feline-nvim": "plugin-feline-nvim",
|
||||
"plugin-fidget-nvim": "plugin-fidget-nvim",
|
||||
"plugin-flutter-tools": "plugin-flutter-tools",
|
||||
"plugin-friendly-snippets": "plugin-friendly-snippets",
|
||||
|
|
11
flake.nix
11
flake.nix
|
@ -288,6 +288,12 @@
|
|||
flake = false;
|
||||
};
|
||||
|
||||
plugin-feline-nvim = {
|
||||
url = "github:freddiehaddad/feline.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Completion
|
||||
plugin-nvim-cmp = {
|
||||
url = "github:hrsh7th/nvim-cmp";
|
||||
flake = false;
|
||||
|
@ -730,5 +736,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 = [
|
||||
./feline
|
||||
./lualine
|
||||
];
|
||||
}
|
||||
|
|
21
modules/plugins/statusline/feline/config.nix
Normal file
21
modules/plugins/statusline/feline/config.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.vim.statusline.feline-nvim;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
lazy.plugins.feline-nvim = {
|
||||
event = "UIEnter";
|
||||
|
||||
package = "feline-nvim";
|
||||
setupModule = "feline";
|
||||
inherit (cfg) setupOpts;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
modules/plugins/statusline/feline/default.nix
Normal file
6
modules/plugins/statusline/feline/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./feline.nix
|
||||
];
|
||||
}
|
129
modules/plugins/statusline/feline/feline.nix
Normal file
129
modules/plugins/statusline/feline/feline.nix
Normal file
|
@ -0,0 +1,129 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) elem;
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.types) str listOf attrsOf anything either submodule;
|
||||
inherit (lib.lists) optional;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
|
||||
conditionalRenderers = {
|
||||
options = {
|
||||
filetypes = mkOption {
|
||||
type = listOf str;
|
||||
default = [
|
||||
"^NvimTree$"
|
||||
"^neo-tree$"
|
||||
"^startify$"
|
||||
"^fugitive$"
|
||||
"^fugitiveblame$"
|
||||
"^qf$"
|
||||
"^help$"
|
||||
];
|
||||
|
||||
description = "Filetypes in which to force render inactive statusline";
|
||||
};
|
||||
|
||||
buftypes = mkOption {
|
||||
type = listOf str;
|
||||
default = ["^terminal$"];
|
||||
description = "Buffer types in which to force render inactive statusline";
|
||||
};
|
||||
|
||||
bufnames = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "Buffer names in which to force render inactive statusline";
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.statusline.feline-nvim = {
|
||||
enable = mkEnableOption "minimal, stylish and customizable statusline, statuscolumn, and winbar [feline.nvim]";
|
||||
setupOpts = mkPluginSetupOption "feline-nvim" {
|
||||
custom_providers = mkOption {
|
||||
type = attrsOf anything;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
window_number = mkLuaInline ''''
|
||||
function()
|
||||
return tostring(vim.api.nvim_win_get_number(0))
|
||||
end
|
||||
'''';
|
||||
}
|
||||
'';
|
||||
|
||||
description = "User-defined feline provider functions";
|
||||
};
|
||||
|
||||
theme = mkOption {
|
||||
type = either str (attrsOf str);
|
||||
default = {};
|
||||
example = {
|
||||
fg = "#fff";
|
||||
bg = "#111";
|
||||
};
|
||||
description = ''
|
||||
Either a string containing the color theme name or an attribute set of
|
||||
strings, containing the colors.
|
||||
|
||||
The theme’s `fg` and `bg` values also represent the default foreground
|
||||
and background colors, respectively.
|
||||
'';
|
||||
};
|
||||
|
||||
separators = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
example = ["slant_right_2"];
|
||||
description = ''
|
||||
A table containing custom Feline separator prests.
|
||||
|
||||
:::{.warning}
|
||||
This option is not type-checked! Before setting this option, please take
|
||||
a look at {command}`:help feline-separator-preset` for a list of
|
||||
available separator presets.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
force_inactive = mkOption {
|
||||
default = {};
|
||||
type = attrsOf (submodule conditionalRenderers);
|
||||
description = ''
|
||||
A table that determines which buffers should always have the inactive
|
||||
statusline, even when they are active.
|
||||
'';
|
||||
};
|
||||
|
||||
disable = mkOption {
|
||||
default = {};
|
||||
type = attrsOf (submodule conditionalRenderers);
|
||||
description = ''
|
||||
A table that determines which buffers should always have the statusline
|
||||
disabled, even when they are active.
|
||||
'';
|
||||
};
|
||||
|
||||
vi_mode_colors = mkOption {
|
||||
type = attrsOf str;
|
||||
default = {};
|
||||
description = ''
|
||||
Attribute set containing colors associated with specific Vi modes.
|
||||
|
||||
It can later be used to get the color associated with the current Vim
|
||||
mode using `require('feline.providers.vi_mode').get_mode_color()`.
|
||||
|
||||
See `:help feline-vi-mode` for more details on vi mode.
|
||||
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
];
|
||||
}
|
Loading…
Add table
Reference in a new issue