mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
utility/oil-nvim: add oil-git-status support
This commit is contained in:
parent
69659e078b
commit
de1f36b4be
4 changed files with 49 additions and 5 deletions
|
@ -383,9 +383,12 @@
|
||||||
[poz](https://poz.pet):
|
[poz](https://poz.pet):
|
||||||
|
|
||||||
[everforest]: https://github.com/sainnhe/everforest
|
[everforest]: https://github.com/sainnhe/everforest
|
||||||
|
[oil]: https://github.com/stevearc/oil.nvim
|
||||||
|
[oil-git-status]: https://github.com/refractalize/oil-git-status.nvim
|
||||||
|
|
||||||
- Fix gitsigns null-ls issue.
|
- Fix gitsigns null-ls issue.
|
||||||
- Add [everforest] theme support.
|
- Add [everforest] theme support.
|
||||||
|
- Add [oil-git-status] support to [oil] module.
|
||||||
|
|
||||||
[Haskex](https://github.com/haskex):
|
[Haskex](https://github.com/haskex):
|
||||||
|
|
||||||
|
|
|
@ -3,18 +3,38 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (lib.attrsets) optionalAttrs recursiveUpdate;
|
||||||
|
inherit (lib.lists) optionals;
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
inherit (lib.nvim.dag) entryAfter entryAnywhere;
|
||||||
|
|
||||||
cfg = config.vim.utility.oil-nvim;
|
cfg = config.vim.utility.oil-nvim;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = ["oil-nvim"];
|
startPlugins = ["oil-nvim"] ++ (optionals cfg.gitStatus.enable ["oil-git-status.nvim"]);
|
||||||
pluginRC.oil-nvim = entryAnywhere ''
|
|
||||||
require("oil").setup(${toLuaObject cfg.setupOpts});
|
pluginRC.oil-nvim = let
|
||||||
|
gitStatusDefaultOpts = {
|
||||||
|
# https://github.com/refractalize/oil-git-status.nvim?tab=readme-ov-file#configuration
|
||||||
|
win_options = {
|
||||||
|
signcolumn = "yes:2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
setupOpts =
|
||||||
|
recursiveUpdate
|
||||||
|
(optionalAttrs cfg.gitStatus.enable gitStatusDefaultOpts)
|
||||||
|
cfg.setupOpts;
|
||||||
|
in
|
||||||
|
entryAnywhere ''
|
||||||
|
require("oil").setup(${toLuaObject setupOpts});
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pluginRC.oil-git-status-nvim = mkIf cfg.gitStatus.enable (entryAfter ["oil-nvim"] ''
|
||||||
|
require("oil-git-status").setup(${toLuaObject cfg.gitStatus.setupOpts})
|
||||||
|
'');
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,13 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupOpts = mkPluginSetupOption "oil-nvim" {};
|
setupOpts = mkPluginSetupOption "oil-nvim" {};
|
||||||
|
|
||||||
|
gitStatus = {
|
||||||
|
enable = mkEnableOption ''
|
||||||
|
Git status on [oil-nvim] directory listings
|
||||||
|
'';
|
||||||
|
|
||||||
|
setupOpts = mkPluginSetupOption "oil-git-status-nvim" {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2030,6 +2030,19 @@
|
||||||
"url": "https://github.com/epwalsh/obsidian.nvim/archive/14e0427bef6c55da0d63f9a313fd9941be3a2479.tar.gz",
|
"url": "https://github.com/epwalsh/obsidian.nvim/archive/14e0427bef6c55da0d63f9a313fd9941be3a2479.tar.gz",
|
||||||
"hash": "15ycmhn48ryaqzch6w3w6llq2qgmjx8xwkb9dn0075z60dybpflr"
|
"hash": "15ycmhn48ryaqzch6w3w6llq2qgmjx8xwkb9dn0075z60dybpflr"
|
||||||
},
|
},
|
||||||
|
"oil-git-status.nvim": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "refractalize",
|
||||||
|
"repo": "oil-git-status.nvim"
|
||||||
|
},
|
||||||
|
"branch": "main",
|
||||||
|
"submodules": false,
|
||||||
|
"revision": "4b5cf53842c17a09420919e655a6a559da3112d7",
|
||||||
|
"url": "https://github.com/refractalize/oil-git-status.nvim/archive/4b5cf53842c17a09420919e655a6a559da3112d7.tar.gz",
|
||||||
|
"hash": "1jzw6lkvi9xxzqy8xz056xlb45byr1arklh87zmyf0nj9plm2nsp"
|
||||||
|
},
|
||||||
"oil-nvim": {
|
"oil-nvim": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue