mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-16 07:27:47 +00:00
Compare commits
26 commits
91a3f67a9e
...
cafa0a1661
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cafa0a1661 | ||
|
|
a1c0e2459b |
||
|
e42bcbe1ec |
|||
|
|
ae26ece143 |
||
|
|
14ca70e490 |
||
|
|
72ae20dc3d |
||
|
|
0644475408 |
||
|
4196be3ac8 |
|||
|
|
a86df770c1 |
||
|
|
e49228d642 |
||
|
|
b58ae672e7 |
||
|
|
9b20083128 |
||
|
|
63c032cf87 |
||
|
|
ede09771f5 |
||
|
|
6e7e91fc11 |
||
|
fe60999d1e |
|||
|
b9968f13bd |
|||
|
80a4ab903c |
|||
|
c96f5f0d8c |
|||
|
033a47a7d6 |
|||
|
678598167c |
|||
|
d221c4b49a |
|||
|
6538fadb65 |
|||
|
f62de17141 |
|||
|
dad18b3226 |
|||
|
fd8e97a2ff |
34 changed files with 305 additions and 72 deletions
3
.github/workflows/check-docs.yml
vendored
3
.github/workflows/check-docs.yml
vendored
|
|
@ -21,7 +21,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -42,13 +41,13 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: "${{ matrix.package }}"
|
name: "${{ matrix.package }}"
|
||||||
path: result/share/doc/nvf
|
path: result/share/doc/nvf
|
||||||
|
|
||||||
flake-docs-linkcheck:
|
flake-docs-linkcheck:
|
||||||
name: Validate hyperlinks in documentation sources
|
name: Validate hyperlinks in documentation sources
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
||||||
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
|
|
@ -19,7 +19,6 @@ jobs:
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
|
|
||||||
- name: Check Flake
|
- name: Check Flake
|
||||||
run: nix flake check
|
run: nix flake check
|
||||||
|
|
@ -33,6 +32,5 @@ jobs:
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
|
|
||||||
- run: nix run nixpkgs#alejandra -- -c .
|
- 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:
|
steps:
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
||||||
1
.github/workflows/editorconfig.yml
vendored
1
.github/workflows/editorconfig.yml
vendored
|
|
@ -30,7 +30,6 @@ jobs:
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: DeterminateSystems/nix-installer-action@main
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
|
|
||||||
- name: Checking EditorConfig
|
- name: Checking EditorConfig
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
1
.github/workflows/manual.yml
vendored
1
.github/workflows/manual.yml
vendored
|
|
@ -45,7 +45,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.7
|
- uses: actions/checkout@v4.1.7
|
||||||
- uses: DeterminateSystems/nix-installer-action@main
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
|
||||||
- run: |
|
- run: |
|
||||||
nix build .#docs -Lv
|
nix build .#docs -Lv
|
||||||
cp -r result/share/doc/nvf public
|
cp -r result/share/doc/nvf public
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,7 @@ isMaximal: {
|
||||||
surround.enable = isMaximal;
|
surround.enable = isMaximal;
|
||||||
diffview-nvim.enable = true;
|
diffview-nvim.enable = true;
|
||||||
yanky-nvim.enable = false;
|
yanky-nvim.enable = false;
|
||||||
|
leetcode-nvim.enable = isMaximal;
|
||||||
motion = {
|
motion = {
|
||||||
hop.enable = true;
|
hop.enable = true;
|
||||||
leap.enable = true;
|
leap.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -143,8 +143,12 @@
|
||||||
|
|
||||||
[ARCIII](https://github.com/ArmandoCIII):
|
[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
|
- Add `vim.languages.zig.dap` support through pkgs.lldb dap adapter. Code
|
||||||
Inspiration from `vim.languages.clang.dap` implementation.
|
Inspiration from `vim.languages.clang.dap` implementation.
|
||||||
|
- Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`.
|
||||||
|
|
||||||
|
|
||||||
[nezia1](https://github.com/nezia1)
|
[nezia1](https://github.com/nezia1)
|
||||||
|
|
||||||
|
|
@ -162,3 +166,7 @@
|
||||||
[Mr-Helpful](https://github.com/Mr-Helpful)
|
[Mr-Helpful](https://github.com/Mr-Helpful)
|
||||||
|
|
||||||
- Corrects pin names used for nvim themes
|
- 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
|
||||||
|
|
|
||||||
17
flake.lock
generated
17
flake.lock
generated
|
|
@ -1,21 +1,5 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"blink-cmp": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1739129359,
|
|
||||||
"narHash": "sha256-nUrXXiJ7NRxS21H53U323lwEKdo08Y011l8XskXC/vw=",
|
|
||||||
"owner": "saghen",
|
|
||||||
"repo": "blink.cmp",
|
|
||||||
"rev": "b2485c76cb7877de6fe9c8670af59ba3d72fd74d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "saghen",
|
|
||||||
"repo": "blink.cmp",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
|
@ -137,7 +121,6 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blink-cmp": "blink-cmp",
|
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"mnw": "mnw",
|
"mnw": "mnw",
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
homeManagerModules = {
|
homeManagerModules = {
|
||||||
nvf = import ./flake/modules/home-manager.nix {inherit lib self;};
|
nvf = import ./flake/modules/home-manager.nix {inherit lib inputs;};
|
||||||
default = self.homeManagerModules.nvf;
|
default = self.homeManagerModules.nvf;
|
||||||
neovim-flake =
|
neovim-flake =
|
||||||
lib.warn ''
|
lib.warn ''
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
nvf = import ./flake/modules/nixos.nix {inherit lib self;};
|
nvf = import ./flake/modules/nixos.nix {inherit lib inputs;};
|
||||||
default = self.nixosModules.nvf;
|
default = self.nixosModules.nvf;
|
||||||
neovim-flake =
|
neovim-flake =
|
||||||
lib.warn ''
|
lib.warn ''
|
||||||
|
|
@ -98,10 +98,5 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
blink-cmp = {
|
|
||||||
url = "github:saghen/blink.cmp";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{inputs, ...}: {
|
{
|
||||||
|
inputs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
perSystem = {
|
perSystem = {
|
||||||
system,
|
system,
|
||||||
inputs',
|
inputs',
|
||||||
|
|
@ -9,14 +13,21 @@
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.self.overlays.default
|
inputs.self.overlays.default
|
||||||
|
|
||||||
(final: _: {
|
(final: prev: {
|
||||||
# Build nil from source to get most recent
|
# Build nil from source to get most recent
|
||||||
# features as they are added.
|
# features as they are added.
|
||||||
nil = inputs'.nil.packages.default;
|
nil = inputs'.nil.packages.default;
|
||||||
blink-cmp = final.callPackage ./legacyPackages/blink-cmp.nix {
|
blink-cmp = let
|
||||||
src = inputs.blink-cmp;
|
pin = self.pins.blink-cmp;
|
||||||
version = inputs.blink-cmp.shortRev or inputs.blink-cmp.shortDirtyRev or "dirty";
|
in
|
||||||
};
|
final.callPackage ./legacyPackages/blink-cmp.nix {
|
||||||
|
inherit (pin) version;
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
inherit (pin.repository) owner repo;
|
||||||
|
rev = pin.revision;
|
||||||
|
sha256 = pin.hash;
|
||||||
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,16 @@
|
||||||
pname = "blink-fuzzy-lib";
|
pname = "blink-fuzzy-lib";
|
||||||
inherit version src;
|
inherit version src;
|
||||||
|
|
||||||
env = {
|
# TODO: remove this if plugin stops using nightly rust
|
||||||
# TODO: remove this if plugin stops using nightly rust
|
env.RUSTC_BOOTSTRAP = true;
|
||||||
RUSTC_BOOTSTRAP = true;
|
|
||||||
};
|
|
||||||
nativeBuildInputs = [git];
|
nativeBuildInputs = [git];
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = "${src}/Cargo.lock";
|
lockFile = "${src}/Cargo.lock";
|
||||||
allowBuiltinFetchGit = true;
|
allowBuiltinFetchGit = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
libExt =
|
libExt =
|
||||||
if hostPlatform.isDarwin
|
if hostPlatform.isDarwin
|
||||||
then "dylib"
|
then "dylib"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
# Home Manager module
|
# Home Manager module
|
||||||
{
|
{
|
||||||
self,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
}: {
|
}: {
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (self) packages inputs;
|
inherit (inputs.self) packages;
|
||||||
inherit (lib) maintainers;
|
inherit (lib) maintainers;
|
||||||
inherit (lib.modules) mkIf mkAliasOptionModule;
|
inherit (lib.modules) mkIf mkAliasOptionModule;
|
||||||
inherit (lib.lists) optional;
|
inherit (lib.lists) optional;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
# NixOS module
|
# NixOS module
|
||||||
{
|
{
|
||||||
self,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
}: {
|
}: {
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (self) inputs packages;
|
inherit (inputs.self) packages;
|
||||||
inherit (lib) maintainers;
|
inherit (lib) maintainers;
|
||||||
inherit (lib.modules) mkIf mkOverride mkAliasOptionModule;
|
inherit (lib.modules) mkIf mkOverride mkAliasOptionModule;
|
||||||
inherit (lib.lists) optional;
|
inherit (lib.lists) optional;
|
||||||
|
|
|
||||||
|
|
@ -30,17 +30,19 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = [
|
startPlugins = ["chatgpt-nvim"];
|
||||||
"chatgpt"
|
|
||||||
];
|
|
||||||
pluginRC.chagpt = entryAnywhere ''
|
pluginRC.chagpt = entryAnywhere ''
|
||||||
require("chatgpt").setup(${toLuaObject cfg.setupOpts})
|
require("chatgpt").setup(${toLuaObject cfg.setupOpts})
|
||||||
'';
|
'';
|
||||||
maps.normal = mkMerge [
|
|
||||||
(mkSetBinding mappings.chatGpt "<cmd>ChatGPT<CR>")
|
maps = {
|
||||||
maps
|
visual = maps;
|
||||||
];
|
normal = mkMerge [
|
||||||
maps.visual = maps;
|
(mkSetBinding mappings.chatGpt "<cmd>ChatGPT<CR>")
|
||||||
|
maps
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
./gitsigns
|
./gitsigns
|
||||||
./vim-fugitive
|
./vim-fugitive
|
||||||
|
./git-conflict
|
||||||
];
|
];
|
||||||
|
|
||||||
options.vim.git = {
|
options.vim.git = {
|
||||||
|
|
@ -13,6 +14,7 @@ in {
|
||||||
Enabling this option will enable the following plugins:
|
Enabling this option will enable the following plugins:
|
||||||
* gitsigns
|
* gitsigns
|
||||||
* vim-fugitive
|
* 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -75,8 +75,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
extraServerPlugins = {
|
extraServerPlugins = {
|
||||||
omnisharp = ["omnisharp-extended"];
|
omnisharp = ["omnisharp-extended-lsp-nvim"];
|
||||||
csharp_ls = ["csharpls-extended"];
|
csharp_ls = ["csharpls-extended-lsp-nvim"];
|
||||||
};
|
};
|
||||||
|
|
||||||
cfg = config.vim.languages.csharp;
|
cfg = config.vim.languages.csharp;
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ in {
|
||||||
vim.startPlugins =
|
vim.startPlugins =
|
||||||
if ftcfg.enableNoResolvePatch
|
if ftcfg.enableNoResolvePatch
|
||||||
then ["flutter-tools-patched"]
|
then ["flutter-tools-patched"]
|
||||||
else ["flutter-tools"];
|
else ["flutter-tools-nvim"];
|
||||||
|
|
||||||
vim.pluginRC.flutter-tools = entryAnywhere ''
|
vim.pluginRC.flutter-tools = entryAnywhere ''
|
||||||
require('flutter-tools').setup {
|
require('flutter-tools').setup {
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ in {
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.elixir-tools.enable {
|
(mkIf cfg.elixir-tools.enable {
|
||||||
vim.startPlugins = ["elixir-tools"];
|
vim.startPlugins = ["elixir-tools-nvim"];
|
||||||
vim.pluginRC.elixir-tools = entryAnywhere ''
|
vim.pluginRC.elixir-tools = entryAnywhere ''
|
||||||
local elixir = require("elixir")
|
local elixir = require("elixir")
|
||||||
local elixirls = require("elixir.elixirls")
|
local elixirls = require("elixir.elixirls")
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ in {
|
||||||
|
|
||||||
# Extensions
|
# Extensions
|
||||||
(mkIf cfg.extensions."ts-error-translator".enable {
|
(mkIf cfg.extensions."ts-error-translator".enable {
|
||||||
vim.startPlugins = ["ts-error-translator"];
|
vim.startPlugins = ["ts-error-translator-nvim"];
|
||||||
vim.pluginRC.ts-error-translator = entryAnywhere ''
|
vim.pluginRC.ts-error-translator = entryAnywhere ''
|
||||||
require("ts-error-translator").setup(${toLuaObject cfg.extensions.ts-error-translator.setupOpts})
|
require("ts-error-translator").setup(${toLuaObject cfg.extensions.ts-error-translator.setupOpts})
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable && cfg.lspsaga.enable) {
|
config = mkIf (cfg.enable && cfg.lspsaga.enable) {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = ["lspsaga"];
|
startPlugins = ["lspsaga-nvim"];
|
||||||
|
|
||||||
maps = {
|
maps = {
|
||||||
visual = mkSetLuaBinding mappings.codeAction "require('lspsaga.codeaction').range_code_action";
|
visual = mkSetLuaBinding mappings.codeAction "require('lspsaga.codeaction').range_code_action";
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,7 @@ in {
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
{
|
{
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = [
|
startPlugins = ["orgmode"];
|
||||||
"orgmode-nvim"
|
|
||||||
];
|
|
||||||
|
|
||||||
binds.whichKey.register = pushDownDefault {
|
binds.whichKey.register = pushDownDefault {
|
||||||
"<leader>o" = "+Notes";
|
"<leader>o" = "+Notes";
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ in {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins =
|
startPlugins =
|
||||||
[
|
[
|
||||||
"nvim-session-manager"
|
"neovim-session-manager"
|
||||||
"plenary-nvim"
|
"plenary-nvim"
|
||||||
]
|
]
|
||||||
++ optionals cfg.usePicker ["dressing-nvim"];
|
++ optionals cfg.usePicker ["dressing-nvim"];
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,6 @@
|
||||||
./telescope
|
./telescope
|
||||||
./wakatime
|
./wakatime
|
||||||
./yanky-nvim
|
./yanky-nvim
|
||||||
|
./leetcode-nvim
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
26
modules/plugins/utility/leetcode-nvim/config.nix
Normal file
26
modules/plugins/utility/leetcode-nvim/config.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
modules/plugins/utility/leetcode-nvim/default.nix
Normal file
6
modules/plugins/utility/leetcode-nvim/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./leetcode-nvim.nix
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
74
modules/plugins/utility/leetcode-nvim/leetcode-nvim.nix
Normal file
74
modules/plugins/utility/leetcode-nvim/leetcode-nvim.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
{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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -38,7 +38,7 @@ in {
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
nvim-surround: add/change/delete surrounding delimiter pairs with ease.
|
nvim-surround: add/change/delete surrounding delimiter pairs with ease.
|
||||||
Note that the default mappings deviate from upstreeam to avoid conflicts
|
Note that the default mappings deviate from upstream to avoid conflicts
|
||||||
with nvim-leap.
|
with nvim-leap.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = ["cellular-automaton"];
|
startPlugins = ["cellular-automaton-nvim"];
|
||||||
|
|
||||||
maps.normal = mkBinding cfg.mappings.makeItRain "<cmd>CellularAutomaton make_it_rain<CR>" "Make it rain";
|
maps.normal = mkBinding cfg.mappings.makeItRain "<cmd>CellularAutomaton make_it_rain<CR>" "Make it rain";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = ["tiny-devicons-auto-colors" "nvim-web-devicons"];
|
startPlugins = ["tiny-devicons-auto-colors-nvim" "nvim-web-devicons"];
|
||||||
|
|
||||||
pluginRC.tiny-devicons-auto-colors = entryAnywhere ''
|
pluginRC.tiny-devicons-auto-colors = entryAnywhere ''
|
||||||
require("tiny-devicons-auto-colors").setup(${toLuaObject cfg.setupOpts})
|
require("tiny-devicons-auto-colors").setup(${toLuaObject cfg.setupOpts})
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
"flutter-tools.dev_tools"
|
"flutter-tools.dev_tools"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
inherit (pkgs) blink-cmp;
|
inherit (inputs.self.legacyPackages.${pkgs.stdenv.system}) blink-cmp;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildConfigPlugins = plugins:
|
buildConfigPlugins = plugins:
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,21 @@
|
||||||
"url": "https://github.com/rrethy/base16-nvim/archive/6ac181b5733518040a33017dde654059cd771b7c.tar.gz",
|
"url": "https://github.com/rrethy/base16-nvim/archive/6ac181b5733518040a33017dde654059cd771b7c.tar.gz",
|
||||||
"hash": "0q47jbh6abn2hql9ghi9ayx3l8pdrdcdrnf4qfk7cp0v1bl7y48r"
|
"hash": "0q47jbh6abn2hql9ghi9ayx3l8pdrdcdrnf4qfk7cp0v1bl7y48r"
|
||||||
},
|
},
|
||||||
|
"blink-cmp": {
|
||||||
|
"type": "GitRelease",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "saghen",
|
||||||
|
"repo": "blink.cmp"
|
||||||
|
},
|
||||||
|
"pre_releases": false,
|
||||||
|
"version_upper_bound": null,
|
||||||
|
"release_prefix": null,
|
||||||
|
"version": "v0.11.0",
|
||||||
|
"revision": "7a70199efe4e333a3693ba3e56ddbec3b9c9c330",
|
||||||
|
"url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.11.0",
|
||||||
|
"hash": "1j3sj03i72iw5npwwksc7w7axv8z0nbgi11adkfng9ak73kn1gdq"
|
||||||
|
},
|
||||||
"blink-compat": {
|
"blink-compat": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -216,6 +231,18 @@
|
||||||
"url": "https://github.com/numToStr/Comment.nvim/archive/e30b7f2008e52442154b66f7c519bfd2f1e32acb.tar.gz",
|
"url": "https://github.com/numToStr/Comment.nvim/archive/e30b7f2008e52442154b66f7c519bfd2f1e32acb.tar.gz",
|
||||||
"hash": "0dyz78j0kj3j99y5g8wncl7794g6z2qs05gfg9ddxaa4xswhyjc7"
|
"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": {
|
"copilot-cmp": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -396,6 +423,18 @@
|
||||||
"url": "https://github.com/notomo/gesture.nvim/archive/dbd839bda337cb73911aeef06897eb29cb99f76f.tar.gz",
|
"url": "https://github.com/notomo/gesture.nvim/archive/dbd839bda337cb73911aeef06897eb29cb99f76f.tar.gz",
|
||||||
"hash": "1cqiahc52xh113l8lgpz3k852vvqkv2srj9shdkyya76a2v2sf9d"
|
"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": {
|
"gitsigns-nvim": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -528,6 +567,18 @@
|
||||||
"url": "https://github.com/ggandor/leap.nvim/archive/c6bfb191f1161fbabace1f36f578a20ac6c7642c.tar.gz",
|
"url": "https://github.com/ggandor/leap.nvim/archive/c6bfb191f1161fbabace1f36f578a20ac6c7642c.tar.gz",
|
||||||
"hash": "1dmy45czi3irjd5qb74yamjam4d1lvqsgfxgh4vaj740b19gyl1w"
|
"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": {
|
"lsp-lines": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -1215,13 +1266,13 @@
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "GitHub",
|
"type": "GitHub",
|
||||||
"owner": "otavioschwanck",
|
"owner": "isaacST08",
|
||||||
"repo": "new-file-template.nvim"
|
"repo": "new-file-template.nvim"
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "master",
|
||||||
"revision": "6ac66669dbf2dc5cdee184a4fe76d22465ca67e8",
|
"revision": "dc3a58b1f490c86075c96670b9eb81370c2f2ca1",
|
||||||
"url": "https://github.com/otavioschwanck/new-file-template.nvim/archive/6ac66669dbf2dc5cdee184a4fe76d22465ca67e8.tar.gz",
|
"url": "https://github.com/isaacST08/new-file-template.nvim/archive/dc3a58b1f490c86075c96670b9eb81370c2f2ca1.tar.gz",
|
||||||
"hash": "0c7378c3w6bniclp666rq15c28akb0sjy58ayva0wpyin4k26hl3"
|
"hash": "0y6ip3k6bjaf32x1y1p6mmkwwdi71yvwr6klr26m252jrg8352pf"
|
||||||
},
|
},
|
||||||
"noice-nvim": {
|
"noice-nvim": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
|
@ -1391,6 +1442,18 @@
|
||||||
"url": "https://github.com/kosayoda/nvim-lightbulb/archive/3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea.tar.gz",
|
"url": "https://github.com/kosayoda/nvim-lightbulb/archive/3ac0791be37ba9cc7939f1ad90ebc5e75abf4eea.tar.gz",
|
||||||
"hash": "0qc1rl45ykh9552dx5fmhdg0ncfsk2vpcmj5i7hrmdzgkd2f0avg"
|
"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": {
|
"nvim-lspconfig": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue