Compare commits

..

No commits in common. "e42bcbe1ecb3392ecd8a7638edf991b9628f4d55" and "6e7e91fc111218917d67b9ee44f718633bddac33" have entirely different histories.

22 changed files with 17 additions and 246 deletions

View file

@ -21,6 +21,7 @@ jobs:
steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Checkout
uses: actions/checkout@v4
@ -41,13 +42,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

View file

@ -19,6 +19,7 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check Flake
run: nix flake check
@ -32,5 +33,6 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix run nixpkgs#alejandra -- -c .

View file

@ -26,6 +26,7 @@ jobs:
steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Checkout
uses: actions/checkout@v4

View file

@ -30,6 +30,7 @@ jobs:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Checking EditorConfig
shell: bash

View file

@ -45,6 +45,7 @@ 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

View file

@ -177,7 +177,6 @@ isMaximal: {
surround.enable = isMaximal;
diffview-nvim.enable = true;
yanky-nvim.enable = false;
leetcode-nvim.enable = isMaximal;
motion = {
hop.enable = true;
leap.enable = true;

View file

@ -143,12 +143,8 @@
[ARCIII](https://github.com/ArmandoCIII):
[leetcode.nvim]: https://github.com/kawre/leetcode.nvim
- Add `vim.languages.zig.dap` support through pkgs.lldb dap adapter. Code
Inspiration from `vim.languages.clang.dap` implementation.
- Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`.
[nezia1](https://github.com/nezia1)
@ -166,7 +162,3 @@
[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

View file

@ -33,7 +33,7 @@
};
homeManagerModules = {
nvf = import ./flake/modules/home-manager.nix {inherit lib inputs;};
nvf = import ./flake/modules/home-manager.nix {inherit lib self;};
default = self.homeManagerModules.nvf;
neovim-flake =
lib.warn ''
@ -44,7 +44,7 @@
};
nixosModules = {
nvf = import ./flake/modules/nixos.nix {inherit lib inputs;};
nvf = import ./flake/modules/nixos.nix {inherit lib self;};
default = self.nixosModules.nvf;
neovim-flake =
lib.warn ''

View file

@ -1,13 +1,13 @@
# Home Manager module
{
inputs,
self,
lib,
}: {
config,
pkgs,
...
}: let
inherit (inputs.self) packages;
inherit (self) packages inputs;
inherit (lib) maintainers;
inherit (lib.modules) mkIf mkAliasOptionModule;
inherit (lib.lists) optional;

View file

@ -1,13 +1,13 @@
# NixOS module
{
inputs,
self,
lib,
}: {
config,
pkgs,
...
}: let
inherit (inputs.self) packages;
inherit (self) inputs packages;
inherit (lib) maintainers;
inherit (lib.modules) mkIf mkOverride mkAliasOptionModule;
inherit (lib.lists) optional;

View file

@ -4,7 +4,6 @@ in {
imports = [
./gitsigns
./vim-fugitive
./git-conflict
];
options.vim.git = {
@ -14,7 +13,6 @@ in {
Enabling this option will enable the following plugins:
* gitsigns
* vim-fugitive
* git-conflict
'';
};
}

View file

@ -1,40 +0,0 @@
{
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)})
'';
};
}
]);
}

View file

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

View file

@ -1,23 +0,0 @@
{
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";
};
};
}

View file

@ -16,7 +16,7 @@
in {
config = mkIf (cfg.enable && cfg.lspsaga.enable) {
vim = {
startPlugins = ["lspsaga-nvim"];
startPlugins = ["lspsaga"];
maps = {
visual = mkSetLuaBinding mappings.codeAction "require('lspsaga.codeaction').range_code_action";

View file

@ -15,6 +15,5 @@
./telescope
./wakatime
./yanky-nvim
./leetcode-nvim
];
}

View file

@ -1,26 +0,0 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.utility.leetcode-nvim;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = [
"leetcode-nvim"
"plenary-nvim"
"fzf-lua"
"nui-nvim"
];
lazy.plugins.leetcode-nvim = {
package = "leetcode-nvim";
setupModule = "leetcode";
inherit (cfg) setupOpts;
};
};
};
}

View file

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

View file

@ -1,74 +0,0 @@
{lib, ...}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) enum str bool;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
in {
options.vim.utility = {
leetcode-nvim = {
enable = mkEnableOption "complementary neovim plugin for leetcode.nvim";
setupOpts = mkPluginSetupOption "leetcode-nvim" {
logging = mkEnableOption "logging for leetcode.nvim status notifications." // {default = true;};
image_support = mkEnableOption "question description images using image.nvim (image-nvim must be enabled).";
lang = mkOption {
type = enum [
"cpp"
"java"
"python"
"python3"
"c"
"csharp"
"javascript"
"typescript"
"php"
"swift"
"kotlin"
"dart"
"golang"
"ruby"
"scala"
"rust"
"racket"
"erlang"
"elixir"
"bash"
];
default = "python3";
description = "Language to start your session with";
};
arg = mkOption {
type = str;
default = "leetcode.nvim";
description = "Argument for Neovim";
};
cn = {
enabled = mkEnableOption "leetcode.cn instead of leetcode.com";
translator = mkEnableOption "translator" // {default = true;};
translate_problems = mkEnableOption "translation for problem questions" // {default = true;};
};
storage = {
home = mkOption {
type = luaInline;
default = mkLuaInline "vim.fn.stdpath(\"data\") .. \"/leetcode\"";
description = "Home storage directory";
};
cache = mkOption {
type = luaInline;
default = mkLuaInline "vim.fn.stdpath(\"cache\") .. \"/leetcode\"";
description = "Cache storage directory";
};
};
plugins = {
non_standalone = mkEnableOption "leetcode.nvim in a non-standalone mode";
};
};
};
};
}

View file

@ -38,7 +38,7 @@ in {
default = false;
description = ''
nvim-surround: add/change/delete surrounding delimiter pairs with ease.
Note that the default mappings deviate from upstream to avoid conflicts
Note that the default mappings deviate from upstreeam to avoid conflicts
with nvim-leap.
'';
};

View file

@ -59,7 +59,7 @@
"flutter-tools.dev_tools"
];
};
inherit (inputs.self.legacyPackages.${pkgs.stdenv.system}) blink-cmp;
inherit (pkgs) blink-cmp;
};
buildConfigPlugins = plugins:

View file

@ -231,18 +231,6 @@
"url": "https://github.com/numToStr/Comment.nvim/archive/e30b7f2008e52442154b66f7c519bfd2f1e32acb.tar.gz",
"hash": "0dyz78j0kj3j99y5g8wncl7794g6z2qs05gfg9ddxaa4xswhyjc7"
},
"conform-nvim": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "stevearc",
"repo": "conform.nvim"
},
"branch": "master",
"revision": "363243c03102a531a8203311d4f2ae704c620d9b",
"url": "https://github.com/stevearc/conform.nvim/archive/363243c03102a531a8203311d4f2ae704c620d9b.tar.gz",
"hash": "1lf7a5b30g37ys9f4z9gq68ymzfzsw7bwzqp1bb91cx9df1bdyck"
},
"copilot-cmp": {
"type": "Git",
"repository": {
@ -423,18 +411,6 @@
"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": {
@ -567,18 +543,6 @@
"url": "https://github.com/ggandor/leap.nvim/archive/c6bfb191f1161fbabace1f36f578a20ac6c7642c.tar.gz",
"hash": "1dmy45czi3irjd5qb74yamjam4d1lvqsgfxgh4vaj740b19gyl1w"
},
"leetcode-nvim": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "kawre",
"repo": "leetcode.nvim"
},
"branch": "master",
"revision": "db7e1cd6b9191b34b4c1f2f96e4e3949cde9f951",
"url": "https://github.com/kawre/leetcode.nvim/archive/db7e1cd6b9191b34b4c1f2f96e4e3949cde9f951.tar.gz",
"hash": "1d3lb7625b2qdzqm74mzrac66rxqc0qgjd3mb37l4v8wqyiyv6pp"
},
"lsp-lines": {
"type": "Git",
"repository": {
@ -1442,18 +1406,6 @@
"url": "https://github.com/kosayoda/nvim-lightbulb/archive/3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea.tar.gz",
"hash": "0qc1rl45ykh9552dx5fmhdg0ncfsk2vpcmj5i7hrmdzgkd2f0avg"
},
"nvim-lint": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "mfussenegger",
"repo": "nvim-lint"
},
"branch": "master",
"revision": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8",
"url": "https://github.com/mfussenegger/nvim-lint/archive/6e9dd545a1af204c4022a8fcd99727ea41ffdcc8.tar.gz",
"hash": "0b318dahzf9kd043mjsa41rj44zfbs7k8i4bz0rqhcqipr19rwhk"
},
"nvim-lspconfig": {
"type": "Git",
"repository": {
@ -2068,4 +2020,4 @@
}
},
"version": 3
}
}