mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
Merge branch 'main' into avante
This commit is contained in:
commit
139c18f296
15 changed files with 121 additions and 27 deletions
|
@ -199,6 +199,7 @@ isMaximal: {
|
||||||
};
|
};
|
||||||
images = {
|
images = {
|
||||||
image-nvim.enable = false;
|
image-nvim.enable = false;
|
||||||
|
img-clip.enable = isMaximal;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ $ nix run github:notashelf/nvf#maximal
|
||||||
|
|
||||||
### Available Configurations {#sec-available-configs}
|
### Available Configurations {#sec-available-configs}
|
||||||
|
|
||||||
:::{.info}
|
::: {.info}
|
||||||
|
|
||||||
The below configurations are provided for demonstration purposes, and are
|
The below configurations are provided for demonstration purposes, and are
|
||||||
**not** designed to be installed as is. You may
|
**not** designed to be installed as is. You may
|
||||||
|
|
|
@ -308,6 +308,7 @@
|
||||||
`vim.diagnostics.nvim-lint.linters.*.required_files`.
|
`vim.diagnostics.nvim-lint.linters.*.required_files`.
|
||||||
- Add global function `nvf_lint` under
|
- Add global function `nvf_lint` under
|
||||||
`vim.diagnostics.nvim-lint.lint_function`.
|
`vim.diagnostics.nvim-lint.lint_function`.
|
||||||
|
- Deprecate `vim.scrollOffset` in favor of `vim.options.scrolloff`.
|
||||||
|
|
||||||
[Sc3l3t0n](https://github.com/Sc3l3t0n):
|
[Sc3l3t0n](https://github.com/Sc3l3t0n):
|
||||||
|
|
||||||
|
@ -346,6 +347,8 @@
|
||||||
- Fix default telescope ignore list entry for '.git/' to properly match
|
- Fix default telescope ignore list entry for '.git/' to properly match
|
||||||
- Add [gitlinker.nvim] plugin to `vim.git.gitlinker-nvim`
|
- Add [gitlinker.nvim] plugin to `vim.git.gitlinker-nvim`
|
||||||
- Add [nvim-treesitter-textobjects] plugin to `vim.treesitter.textobjects`
|
- Add [nvim-treesitter-textobjects] plugin to `vim.treesitter.textobjects`
|
||||||
|
- Default to disabling Conform for Rust if rust-analyzer is used
|
||||||
|
- To force using Conform, set `languages.rust.format.enable = true`.
|
||||||
|
|
||||||
[rrvsh](https://github.com/rrvsh):
|
[rrvsh](https://github.com/rrvsh):
|
||||||
|
|
||||||
|
@ -395,3 +398,15 @@
|
||||||
|
|
||||||
- Add `rubylsp` option in `vim.languages.ruby.lsp.server` to use shopify's
|
- Add `rubylsp` option in `vim.languages.ruby.lsp.server` to use shopify's
|
||||||
ruby-lsp language server
|
ruby-lsp language server
|
||||||
|
|
||||||
|
[Haskex](https://github.com/haskex):
|
||||||
|
|
||||||
|
[solarized-osaka.nvim]: https://github.com/craftzdog/solarized-osaka.nvim
|
||||||
|
|
||||||
|
- Add [solarized-osaka.nvim] theme
|
||||||
|
|
||||||
|
[img-clip.nvim]: https://github.com/hakonharnes/img-clip.nvim
|
||||||
|
|
||||||
|
- Add [img-clip.nvim] plugin in `vim.utility.images.img-clip` with `enable` and
|
||||||
|
`setupOpts`
|
||||||
|
- Add `vim.utility.images.img-clip.enable = isMaximal` in configuration.nix
|
||||||
|
|
6
flake.lock
generated
6
flake.lock
generated
|
@ -38,11 +38,11 @@
|
||||||
},
|
},
|
||||||
"mnw": {
|
"mnw": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746338991,
|
"lastModified": 1747499976,
|
||||||
"narHash": "sha256-GbyoHjf14LOxZQc+0NFblI4xf/uwGrYo3W8lwE4HcwI=",
|
"narHash": "sha256-YTiSI4WLbk0CleXeBheYmKZV6iqKyBpyoh1e+vcQzu4=",
|
||||||
"owner": "Gerg-L",
|
"owner": "Gerg-L",
|
||||||
"repo": "mnw",
|
"repo": "mnw",
|
||||||
"rev": "c65407ee9387ef75985dad3e30f58c822c766ec1",
|
"rev": "72433a144c4ac16931e9148f78db4a0e4c147441",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
showSignColumn = "signcolumn";
|
showSignColumn = "signcolumn";
|
||||||
|
|
||||||
# 2025-02-07
|
# 2025-02-07
|
||||||
scrollOff = "scrolloff";
|
scrollOffset = "scrolloff";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
imports = concatLists [
|
imports = concatLists [
|
||||||
|
|
|
@ -6,11 +6,10 @@
|
||||||
inherit (lib.options) mkOption mkEnableOption literalMD;
|
inherit (lib.options) mkOption mkEnableOption literalMD;
|
||||||
inherit (lib.strings) optionalString;
|
inherit (lib.strings) optionalString;
|
||||||
inherit (lib.attrsets) optionalAttrs;
|
inherit (lib.attrsets) optionalAttrs;
|
||||||
inherit (lib.types) enum bool str int either;
|
inherit (lib.types) enum bool str either;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
inherit (lib.nvim.dag) entryAfter;
|
inherit (lib.nvim.dag) entryAfter;
|
||||||
inherit (lib.nvim.binds) pushDownDefault;
|
inherit (lib.nvim.binds) pushDownDefault;
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
|
||||||
inherit (lib.nvim.types) luaInline;
|
inherit (lib.nvim.types) luaInline;
|
||||||
|
|
||||||
cfg = config.vim;
|
cfg = config.vim;
|
||||||
|
@ -22,12 +21,6 @@ in {
|
||||||
description = "Hide search highlight so it doesn't stay highlighted";
|
description = "Hide search highlight so it doesn't stay highlighted";
|
||||||
};
|
};
|
||||||
|
|
||||||
scrollOffset = mkOption {
|
|
||||||
type = int;
|
|
||||||
default = 8;
|
|
||||||
description = "Start scrolling this number of lines from the top or bottom of the page.";
|
|
||||||
};
|
|
||||||
|
|
||||||
syntaxHighlighting = mkOption {
|
syntaxHighlighting = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
default = !config.vim.treesitter.highlight.enable;
|
default = !config.vim.treesitter.highlight.enable;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
inherit (builtins) attrNames;
|
inherit (builtins) attrNames;
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
inherit (lib.options) mkOption mkEnableOption literalMD;
|
||||||
inherit (lib.strings) optionalString;
|
inherit (lib.strings) optionalString;
|
||||||
inherit (lib.trivial) boolToString;
|
inherit (lib.trivial) boolToString;
|
||||||
inherit (lib.lists) isList;
|
inherit (lib.lists) isList;
|
||||||
|
@ -68,7 +68,14 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
format = {
|
format = {
|
||||||
enable = mkEnableOption "Rust formatting" // {default = config.vim.languages.enableFormat;};
|
enable =
|
||||||
|
mkEnableOption "Rust formatting"
|
||||||
|
// {
|
||||||
|
default = !cfg.lsp.enable && config.vim.languages.enableFormat;
|
||||||
|
defaultText = literalMD ''
|
||||||
|
Disabled if Rust LSP is enabled, otherwise follows {option}`vim.languages.enableFormat`
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
type = mkOption {
|
type = mkOption {
|
||||||
description = "Rust formatter to use";
|
description = "Rust formatter to use";
|
||||||
|
|
|
@ -212,4 +212,17 @@ in {
|
||||||
'';
|
'';
|
||||||
styles = ["dark" "light" "dark_dimmed" "dark_default" "light_default" "dark_high_contrast" "light_high_contrast" "dark_colorblind" "light_colorblind" "dark_tritanopia" "light_tritanopia"];
|
styles = ["dark" "light" "dark_dimmed" "dark_default" "light_default" "dark_high_contrast" "light_high_contrast" "dark_colorblind" "light_colorblind" "dark_tritanopia" "light_tritanopia"];
|
||||||
};
|
};
|
||||||
|
solarized-osaka = {
|
||||||
|
setup = {transparent ? false, ...}: ''
|
||||||
|
require("solarized-osaka").setup({
|
||||||
|
transparent = ${boolToString transparent},
|
||||||
|
styles = {
|
||||||
|
comments = { italic = false },
|
||||||
|
keywords = { italic = false },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd.colorscheme("solarized-osaka")
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ in {
|
||||||
startPlugins = ["hardtime-nvim"];
|
startPlugins = ["hardtime-nvim"];
|
||||||
|
|
||||||
pluginRC.hardtime = entryAnywhere ''
|
pluginRC.hardtime = entryAnywhere ''
|
||||||
require("hardtime").setup (${toLuaObject cfg.setupOpts})
|
require("hardtime").setup(${toLuaObject cfg.setupOpts})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./image-nvim
|
./image-nvim
|
||||||
|
./img-clip
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
23
modules/plugins/utility/images/img-clip/config.nix
Normal file
23
modules/plugins/utility/images/img-clip/config.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
|
cfg = config.vim.utility.images.img-clip;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim = {
|
||||||
|
startPlugins = [
|
||||||
|
"img-clip"
|
||||||
|
];
|
||||||
|
|
||||||
|
pluginRC.image-nvim = entryAnywhere ''
|
||||||
|
require("img-clip").setup(${toLuaObject cfg.setupOpts})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/utility/images/img-clip/default.nix
Normal file
6
modules/plugins/utility/images/img-clip/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./img-clip.nix
|
||||||
|
];
|
||||||
|
}
|
11
modules/plugins/utility/images/img-clip/img-clip.nix
Normal file
11
modules/plugins/utility/images/img-clip/img-clip.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
options.vim.utility.images.img-clip = {
|
||||||
|
enable = mkEnableOption "img-clip to paste images into any markup language";
|
||||||
|
|
||||||
|
setupOpts = mkPluginSetupOption "img-clip" {};
|
||||||
|
};
|
||||||
|
}
|
|
@ -7,23 +7,20 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (pkgs) vimPlugins;
|
inherit (pkgs) vimPlugins;
|
||||||
inherit (lib.trivial) flip;
|
inherit (lib.trivial) flip;
|
||||||
inherit (builtins) path filter isString;
|
inherit (builtins) filter isString;
|
||||||
|
|
||||||
getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name};
|
getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name};
|
||||||
|
|
||||||
noBuildPlug = pname: let
|
noBuildPlug = pname: let
|
||||||
pin = getPin pname;
|
pin = getPin pname;
|
||||||
version = pin.revision or "dirty";
|
version = builtins.substring 0 8 pin.revision;
|
||||||
in {
|
in
|
||||||
# vim.lazy.plugins relies on pname, so we only set that here
|
pin.outPath.overrideAttrs {
|
||||||
# version isn't needed for anything, but inherit it anyway for correctness
|
inherit pname version;
|
||||||
inherit pname version;
|
name = "${pname}-${version}";
|
||||||
outPath = path {
|
|
||||||
name = "${pname}-0-unstable-${version}";
|
passthru.vimPlugin = false;
|
||||||
path = pin.outPath;
|
|
||||||
};
|
};
|
||||||
passthru.vimPlugin = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# build a vim plugin with the given name and arguments
|
# build a vim plugin with the given name and arguments
|
||||||
# if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug
|
# if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug
|
||||||
|
|
|
@ -718,6 +718,19 @@
|
||||||
"url": "https://github.com/3rd/image.nvim/archive/4c51d6202628b3b51e368152c053c3fb5c5f76f2.tar.gz",
|
"url": "https://github.com/3rd/image.nvim/archive/4c51d6202628b3b51e368152c053c3fb5c5f76f2.tar.gz",
|
||||||
"hash": "16s1wsy9k72qiqzvwij67j2jzwgi6ggl6lhx9p6lfw8dpps3ayxg"
|
"hash": "16s1wsy9k72qiqzvwij67j2jzwgi6ggl6lhx9p6lfw8dpps3ayxg"
|
||||||
},
|
},
|
||||||
|
"img-clip": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "hakonharnes",
|
||||||
|
"repo": "img-clip.nvim"
|
||||||
|
},
|
||||||
|
"branch": "main",
|
||||||
|
"submodules": false,
|
||||||
|
"revision": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d",
|
||||||
|
"url": "https://github.com/hakonharnes/img-clip.nvim/archive/08a02e14c8c0d42fa7a92c30a98fd04d6993b35d.tar.gz",
|
||||||
|
"hash": "0ani8z5pkvqmmalzcgyj27rfhqs76ivmpq79xn8rsdyy5a5fy979"
|
||||||
|
},
|
||||||
"indent-blankline-nvim": {
|
"indent-blankline-nvim": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -882,6 +895,7 @@
|
||||||
"repo": "markview.nvim"
|
"repo": "markview.nvim"
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
|
"submodules": false,
|
||||||
"revision": "6c92a6455e97c954a4a419265a032fedd69846f6",
|
"revision": "6c92a6455e97c954a4a419265a032fedd69846f6",
|
||||||
"url": "https://github.com/OXY2DEV/markview.nvim/archive/6c92a6455e97c954a4a419265a032fedd69846f6.tar.gz",
|
"url": "https://github.com/OXY2DEV/markview.nvim/archive/6c92a6455e97c954a4a419265a032fedd69846f6.tar.gz",
|
||||||
"hash": "01sw4iscnciyifpba4cwjb6fs95wrkk60xvqq67b8d5j8yb5449a"
|
"hash": "01sw4iscnciyifpba4cwjb6fs95wrkk60xvqq67b8d5j8yb5449a"
|
||||||
|
@ -2247,6 +2261,19 @@
|
||||||
"url": "https://api.github.com/repos/folke/snacks.nvim/tarball/v2.22.0",
|
"url": "https://api.github.com/repos/folke/snacks.nvim/tarball/v2.22.0",
|
||||||
"hash": "1hbm4fnw51qdp0nz83fcxbvnxjq2k57a37w6dp0wz6wkcx7cwxw9"
|
"hash": "1hbm4fnw51qdp0nz83fcxbvnxjq2k57a37w6dp0wz6wkcx7cwxw9"
|
||||||
},
|
},
|
||||||
|
"solarized-osaka": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "craftzdog",
|
||||||
|
"repo": "solarized-osaka.nvim"
|
||||||
|
},
|
||||||
|
"branch": "main",
|
||||||
|
"submodules": false,
|
||||||
|
"revision": "f796014c14b1910e08d42cc2077fef34f08e0295",
|
||||||
|
"url": "https://github.com/craftzdog/solarized-osaka.nvim/archive/f796014c14b1910e08d42cc2077fef34f08e0295.tar.gz",
|
||||||
|
"hash": "0jy2hk4fc210jih30ybvisr9pliya1s3nazw4d131vh5k4p1xqi6"
|
||||||
|
},
|
||||||
"sqls-nvim": {
|
"sqls-nvim": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue