mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 23:45:31 +00:00
Merge branch 'main' into feature/plugin-leetcode
This commit is contained in:
commit
914e2795ea
11 changed files with 88 additions and 7 deletions
3
.github/workflows/check-docs.yml
vendored
3
.github/workflows/check-docs.yml
vendored
|
|
@ -21,7 +21,6 @@ jobs:
|
|||
steps:
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
@ -42,13 +41,13 @@ jobs:
|
|||
with:
|
||||
name: "${{ matrix.package }}"
|
||||
path: result/share/doc/nvf
|
||||
|
||||
flake-docs-linkcheck:
|
||||
name: Validate hyperlinks in documentation sources
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
|
|||
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
|
|
@ -19,7 +19,6 @@ jobs:
|
|||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- name: Check Flake
|
||||
run: nix flake check
|
||||
|
|
@ -33,6 +32,5 @@ jobs:
|
|||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- run: nix run nixpkgs#alejandra -- -c .
|
||||
|
|
|
|||
1
.github/workflows/docs-preview.yml
vendored
1
.github/workflows/docs-preview.yml
vendored
|
|
@ -26,7 +26,6 @@ jobs:
|
|||
steps:
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
|
|
|||
1
.github/workflows/editorconfig.yml
vendored
1
.github/workflows/editorconfig.yml
vendored
|
|
@ -30,7 +30,6 @@ jobs:
|
|||
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
|
||||
- name: Checking EditorConfig
|
||||
shell: bash
|
||||
|
|
|
|||
1
.github/workflows/manual.yml
vendored
1
.github/workflows/manual.yml
vendored
|
|
@ -45,7 +45,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4.1.7
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- run: |
|
||||
nix build .#docs -Lv
|
||||
cp -r result/share/doc/nvf public
|
||||
|
|
|
|||
|
|
@ -166,3 +166,7 @@
|
|||
[Mr-Helpful](https://github.com/Mr-Helpful)
|
||||
|
||||
- Corrects pin names used for nvim themes
|
||||
|
||||
[Libadoxon](https://github.com/Libadoxon)
|
||||
|
||||
- Add [git-conflict](https://github.com/akinsho/git-conflict.nvim) plugin for resolving git conflicts
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ in {
|
|||
imports = [
|
||||
./gitsigns
|
||||
./vim-fugitive
|
||||
./git-conflict
|
||||
];
|
||||
|
||||
options.vim.git = {
|
||||
|
|
@ -13,6 +14,7 @@ in {
|
|||
Enabling this option will enable the following plugins:
|
||||
* gitsigns
|
||||
* vim-fugitive
|
||||
* git-conflict
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
40
modules/plugins/git/git-conflict/config.nix
Normal file
40
modules/plugins/git/git-conflict/config.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.git.git-conflict;
|
||||
|
||||
self = import ./git-conflict.nix {inherit lib config;};
|
||||
gcMappingDefinitions = self.options.vim.git.git-conflict.mappings;
|
||||
|
||||
gcMappings = addDescriptionsToMappings cfg.mappings gcMappingDefinitions;
|
||||
in {
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
vim = {
|
||||
startPlugins = ["git-conflict-nvim"];
|
||||
|
||||
maps = {
|
||||
normal = mkMerge [
|
||||
(mkSetBinding gcMappings.ours "<Plug>(git-conflict-ours)")
|
||||
(mkSetBinding gcMappings.theirs "<Plug>(git-conflict-theirs)")
|
||||
(mkSetBinding gcMappings.both "<Plug>(git-conflict-both)")
|
||||
(mkSetBinding gcMappings.none "<Plug>(git-conflict-none)")
|
||||
(mkSetBinding gcMappings.prevConflict "<Plug>(git-conflict-prev-conflict)")
|
||||
(mkSetBinding gcMappings.nextConflict "<Plug>(git-conflict-next-conflict)")
|
||||
];
|
||||
};
|
||||
|
||||
pluginRC.git-conflict = entryAnywhere ''
|
||||
require('git-conflict').setup(${toLuaObject ({default_mappings = false;} // cfg.setupOpts)})
|
||||
'';
|
||||
};
|
||||
}
|
||||
]);
|
||||
}
|
||||
6
modules/plugins/git/git-conflict/default.nix
Normal file
6
modules/plugins/git/git-conflict/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./git-conflict.nix
|
||||
];
|
||||
}
|
||||
23
modules/plugins/git/git-conflict/git-conflict.nix
Normal file
23
modules/plugins/git/git-conflict/git-conflict.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.git.git-conflict = {
|
||||
enable = mkEnableOption "git-conflict" // {default = config.vim.git.enable;};
|
||||
setupOpts = mkPluginSetupOption "git-conflict" {};
|
||||
|
||||
mappings = {
|
||||
ours = mkMappingOption "Choose Ours [Git-Conflict]" "co";
|
||||
theirs = mkMappingOption "Choose Theirs [Git-Conflict]" "ct";
|
||||
both = mkMappingOption "Choose Both [Git-Conflict]" "cb";
|
||||
none = mkMappingOption "Choose None [Git-Conflict]" "c0";
|
||||
prevConflict = mkMappingOption "Go to the previous Conflict [Git-Conflict]" "]x";
|
||||
nextConflict = mkMappingOption "Go to the next Conflict [Git-Conflict]" "[x";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -423,6 +423,18 @@
|
|||
"url": "https://github.com/notomo/gesture.nvim/archive/dbd839bda337cb73911aeef06897eb29cb99f76f.tar.gz",
|
||||
"hash": "1cqiahc52xh113l8lgpz3k852vvqkv2srj9shdkyya76a2v2sf9d"
|
||||
},
|
||||
"git-conflict-nvim": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "akinsho",
|
||||
"repo": "git-conflict.nvim"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "a1badcd070d176172940eb55d9d59029dad1c5a6",
|
||||
"url": "https://github.com/akinsho/git-conflict.nvim/archive/a1badcd070d176172940eb55d9d59029dad1c5a6.tar.gz",
|
||||
"hash": "05rnwhm1fmg3yb7j2xc9nmw262jc687qxhwabn97qarrk2da0r0a"
|
||||
},
|
||||
"gitsigns-nvim": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue