Compare commits

...

15 commits

Author SHA1 Message Date
raf
d3a0e7029a
Merge pull request #906 from Gerg-L/main
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
update mnw, fix noBuildPlug
2025-05-18 02:46:22 +03:00
raf
232824a863
Merge branch 'main' into main 2025-05-18 02:41:21 +03:00
raf
7a4f8132e4
Merge pull request #900 from ckoehler/fix-rustfmt
lannguages/rust: disable conform while LSP is enabled
2025-05-18 02:26:10 +03:00
raf
6922565279
Merge branch 'main' into main 2025-05-18 02:19:00 +03:00
raf
e3316b98df
Merge branch 'main' into fix-rustfmt 2025-05-18 02:18:26 +03:00
raf
b89097f1c0
Merge pull request #903 from haskex/imgclip
utility/img-clip: init
2025-05-18 02:17:45 +03:00
Christoph Koehler
37aac45396
fix: disable Conform for Rust if we have rust-analyzer enabled 2025-05-17 13:17:11 -06:00
Gerg-L
23e50a8eb7
fix: noBuildPlug naming 2025-05-17 12:41:46 -04:00
Gerg-L
eecebde413
flake: update mnw 2025-05-17 12:41:42 -04:00
haskex
23e40da9a4 remove temp file and add changelog 2025-05-17 12:08:24 -03:00
haskex
ab991a7e57 Merge branch 'main' into imgclip 2025-05-17 12:04:51 -03:00
haskex
1643b5262b Fixing conflits 2025-05-17 12:04:44 -03:00
Jhuan Nycolas
2f33732bed
Merge branch 'main' into imgclip 2025-05-16 19:52:37 -03:00
haskex
62cd4154a2 Tested and able to merge 2025-05-16 19:42:21 -03:00
haskex
32b9694840 utility/img-clip: init 2025-05-16 11:44:02 -03:00
11 changed files with 85 additions and 17 deletions

View file

@ -199,6 +199,7 @@ isMaximal: {
};
images = {
image-nvim.enable = false;
img-clip.enable = isMaximal;
};
};

View file

@ -347,6 +347,8 @@
- Fix default telescope ignore list entry for '.git/' to properly match
- Add [gitlinker.nvim] plugin to `vim.git.gitlinker-nvim`
- 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):
@ -399,3 +401,9 @@
[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
View file

@ -38,11 +38,11 @@
},
"mnw": {
"locked": {
"lastModified": 1746338991,
"narHash": "sha256-GbyoHjf14LOxZQc+0NFblI4xf/uwGrYo3W8lwE4HcwI=",
"lastModified": 1747499976,
"narHash": "sha256-YTiSI4WLbk0CleXeBheYmKZV6iqKyBpyoh1e+vcQzu4=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "c65407ee9387ef75985dad3e30f58c822c766ec1",
"rev": "72433a144c4ac16931e9148f78db4a0e4c147441",
"type": "github"
},
"original": {

View file

@ -7,7 +7,7 @@
inherit (builtins) attrNames;
inherit (lib.meta) getExe;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.options) mkOption mkEnableOption literalMD;
inherit (lib.strings) optionalString;
inherit (lib.trivial) boolToString;
inherit (lib.lists) isList;
@ -68,7 +68,14 @@ in {
};
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 {
description = "Rust formatter to use";

View file

@ -14,7 +14,7 @@ in {
startPlugins = ["hardtime-nvim"];
pluginRC.hardtime = entryAnywhere ''
require("hardtime").setup (${toLuaObject cfg.setupOpts})
require("hardtime").setup(${toLuaObject cfg.setupOpts})
'';
};
};

View file

@ -1,5 +1,6 @@
{
imports = [
./image-nvim
./img-clip
];
}

View 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})
'';
};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./img-clip.nix
];
}

View 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" {};
};
}

View file

@ -7,21 +7,18 @@
}: let
inherit (pkgs) vimPlugins;
inherit (lib.trivial) flip;
inherit (builtins) path filter isString;
inherit (builtins) filter isString;
getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name};
noBuildPlug = pname: let
pin = getPin 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
version = builtins.substring 0 8 pin.revision;
in
pin.outPath.overrideAttrs {
inherit pname version;
outPath = path {
name = "${pname}-0-unstable-${version}";
path = pin.outPath;
};
name = "${pname}-${version}";
passthru.vimPlugin = false;
};

View file

@ -705,6 +705,19 @@
"url": "https://github.com/3rd/image.nvim/archive/4c51d6202628b3b51e368152c053c3fb5c5f76f2.tar.gz",
"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": {
"type": "Git",
"repository": {
@ -869,6 +882,7 @@
"repo": "markview.nvim"
},
"branch": "main",
"submodules": false,
"revision": "6c92a6455e97c954a4a419265a032fedd69846f6",
"url": "https://github.com/OXY2DEV/markview.nvim/archive/6c92a6455e97c954a4a419265a032fedd69846f6.tar.gz",
"hash": "01sw4iscnciyifpba4cwjb6fs95wrkk60xvqq67b8d5j8yb5449a"