mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-05 18:01:32 +00:00
Merge pull request #1040 from imnotpoz/oil-git-status
utility/oil-nvim: add oil-git-status support
This commit is contained in:
commit
b88c7bcdc0
4 changed files with 49 additions and 5 deletions
|
@ -383,9 +383,12 @@
|
|||
[poz](https://poz.pet):
|
||||
|
||||
[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.
|
||||
- Add [everforest] theme support.
|
||||
- Add [oil-git-status] support to [oil] module.
|
||||
|
||||
[Haskex](https://github.com/haskex):
|
||||
|
||||
|
|
|
@ -3,18 +3,38 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.attrsets) optionalAttrs recursiveUpdate;
|
||||
inherit (lib.lists) optionals;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.dag) entryAfter entryAnywhere;
|
||||
|
||||
cfg = config.vim.utility.oil-nvim;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["oil-nvim"];
|
||||
pluginRC.oil-nvim = entryAnywhere ''
|
||||
require("oil").setup(${toLuaObject cfg.setupOpts});
|
||||
'';
|
||||
startPlugins = ["oil-nvim"] ++ (optionals cfg.gitStatus.enable ["oil-git-status.nvim"]);
|
||||
|
||||
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" {};
|
||||
|
||||
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",
|
||||
"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": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue