Skip to content

Commit

Permalink
Merge branch 'main' into npins-plugin-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf authored Feb 12, 2025
2 parents 1ea0ed5 + 6e7e91f commit ad6b042
Show file tree
Hide file tree
Showing 19 changed files with 90 additions and 68 deletions.
4 changes: 2 additions & 2 deletions docs/manual/hacking/additional-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Use:

Then run:

`npins --name <plugin name> github <owner> <repo> -b <branch>`
`npins add --name <plugin name> github <owner> <repo> -b <branch>`

Be sure to replace any non-alphanumeric characters with `-` for `--name`

For example

`npins --name lazydev-nvim github folke laztdev.nvim -b main`
`npins add --name lazydev-nvim github folke lazydev.nvim -b main`

You can now reference this plugin as a **string**.

Expand Down
13 changes: 13 additions & 0 deletions docs/release-notes/rl-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,16 @@
[nezia1](https://github.com/nezia1)

- Add support for [nixd](https://github.com/nix-community/nixd) language server.

[folospior](https://github.com/folospior)

- Fix plugin name for lsp/lspkind.

[iynaix](https://github.com/iynaix)

- Add lsp options support for [nixd](https://github.com/nix-community/nixd)
language server.

[Mr-Helpful](https://github.com/Mr-Helpful)

- Corrects pin names used for nvim themes
17 changes: 0 additions & 17 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,5 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};

blink-cmp = {
url = "github:saghen/blink.cmp";
flake = false;
};
};
}
23 changes: 17 additions & 6 deletions flake/legacyPackages.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{inputs, ...}: {
{
inputs,
self,
...
}: {
perSystem = {
system,
inputs',
Expand All @@ -9,14 +13,21 @@
overlays = [
inputs.self.overlays.default

(final: _: {
(final: prev: {
# Build nil from source to get most recent
# features as they are added.
nil = inputs'.nil.packages.default;
blink-cmp = final.callPackage ./legacyPackages/blink-cmp.nix {
src = inputs.blink-cmp;
version = inputs.blink-cmp.shortRev or inputs.blink-cmp.shortDirtyRev or "dirty";
};
blink-cmp = let
pin = self.pins.blink-cmp;
in
final.callPackage ./legacyPackages/blink-cmp.nix {
inherit (pin) version;
src = prev.fetchFromGitHub {
inherit (pin.repository) owner repo;
rev = pin.revision;
sha256 = pin.hash;
};
};
})
];
};
Expand Down
8 changes: 4 additions & 4 deletions flake/legacyPackages/blink-cmp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
pname = "blink-fuzzy-lib";
inherit version src;

env = {
# TODO: remove this if plugin stops using nightly rust
RUSTC_BOOTSTRAP = true;
};
# TODO: remove this if plugin stops using nightly rust
env.RUSTC_BOOTSTRAP = true;

nativeBuildInputs = [git];
cargoLock = {
lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true;
};
};

libExt =
if hostPlatform.isDarwin
then "dylib"
Expand Down
18 changes: 10 additions & 8 deletions modules/plugins/assistant/chatgpt/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,19 @@
in {
config = mkIf cfg.enable {
vim = {
startPlugins = [
"chatgpt"
];
startPlugins = ["chatgpt-nvim"];

pluginRC.chagpt = entryAnywhere ''
require("chatgpt").setup(${toLuaObject cfg.setupOpts})
'';
maps.normal = mkMerge [
(mkSetBinding mappings.chatGpt "<cmd>ChatGPT<CR>")
maps
];
maps.visual = maps;

maps = {
visual = maps;
normal = mkMerge [
(mkSetBinding mappings.chatGpt "<cmd>ChatGPT<CR>")
maps
];
};
};
};
}
4 changes: 2 additions & 2 deletions modules/plugins/languages/csharp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
};

extraServerPlugins = {
omnisharp = ["omnisharp-extended"];
csharp_ls = ["csharpls-extended"];
omnisharp = ["omnisharp-extended-lsp-nvim"];
csharp_ls = ["csharpls-extended-lsp-nvim"];
};

cfg = config.vim.languages.csharp;
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/languages/dart.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ in {
vim.startPlugins =
if ftcfg.enableNoResolvePatch
then ["flutter-tools-patched"]
else ["flutter-tools"];
else ["flutter-tools-nvim"];

vim.pluginRC.flutter-tools = entryAnywhere ''
require('flutter-tools').setup {
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/languages/elixir.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ in {
})

(mkIf cfg.elixir-tools.enable {
vim.startPlugins = ["elixir-tools"];
vim.startPlugins = ["elixir-tools-nvim"];
vim.pluginRC.elixir-tools = entryAnywhere ''
local elixir = require("elixir")
local elixirls = require("elixir.elixirls")
Expand Down
11 changes: 9 additions & 2 deletions modules/plugins/languages/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.strings) optionalString;
inherit (lib.types) enum either listOf package str;
inherit (lib.types) anything attrsOf enum either listOf nullOr package str;
inherit (lib.nvim.types) mkGrammarOption diagnostics;
inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.lua) expToLua toLuaObject;
inherit (lib.nvim.languages) diagnosticsToLua;

cfg = config.vim.languages.nix;
Expand Down Expand Up @@ -87,6 +87,7 @@
command = {"${cfg.format.package}/bin/nixfmt"},
},
''}
options = ${toLuaObject cfg.lsp.options},
},
},
''}
Expand Down Expand Up @@ -173,6 +174,12 @@ in {
type = either package (listOf str);
default = servers.${cfg.lsp.server}.package;
};

options = mkOption {
type = nullOr (attrsOf anything);
default = null;
description = "Options to pass to nixd LSP server";
};
};

format = {
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/languages/ts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ in {

# Extensions
(mkIf cfg.extensions."ts-error-translator".enable {
vim.startPlugins = ["ts-error-translator"];
vim.startPlugins = ["ts-error-translator-nvim"];
vim.pluginRC.ts-error-translator = entryAnywhere ''
require("ts-error-translator").setup(${toLuaObject cfg.extensions.ts-error-translator.setupOpts})
'';
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/lsp/lspkind/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ in {
];

vim = {
startPlugins = ["lspkind"];
startPlugins = ["lspkind-nvim"];

lsp.lspkind.setupOpts.before = config.vim.autocomplete.nvim-cmp.format;
autocomplete = {
Expand Down
4 changes: 1 addition & 3 deletions modules/plugins/notes/orgmode/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ in {
config = mkIf cfg.enable (mkMerge [
{
vim = {
startPlugins = [
"orgmode-nvim"
];
startPlugins = ["orgmode"];

binds.whichKey.register = pushDownDefault {
"<leader>o" = "+Notes";
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/session/nvim-session-manager/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ in {
vim = {
startPlugins =
[
"nvim-session-manager"
"neovim-session-manager"
"plenary-nvim"
]
++ optionals cfg.usePicker ["dressing-nvim"];
Expand Down
4 changes: 1 addition & 3 deletions modules/plugins/utility/ccc/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
cfg = config.vim.utility.ccc;
in {
config = mkIf cfg.enable {
vim.startPlugins = [
"ccc"
];
vim.startPlugins = ["ccc-nvim"];

vim.pluginRC.ccc = entryAnywhere ''
local ccc = require("ccc")
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/visuals/cellular-automaton/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["cellular-automaton"];
startPlugins = ["cellular-automaton-nvim"];

maps.normal = mkBinding cfg.mappings.makeItRain "<cmd>CellularAutomaton make_it_rain<CR>" "Make it rain";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["tiny-devicons-auto-colors" "nvim-web-devicons"];
startPlugins = ["tiny-devicons-auto-colors-nvim" "nvim-web-devicons"];

pluginRC.tiny-devicons-auto-colors = entryAnywhere ''
require("tiny-devicons-auto-colors").setup(${toLuaObject cfg.setupOpts})
Expand Down
33 changes: 24 additions & 9 deletions npins/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/goolord/alpha-nvim/archive/de72250e054e5e691b9736ee30db72c65d560771.tar.gz",
"hash": "0c1jkhxamfn2md7m1r5b2wpxa26y90b98yzjwf68m3fymalvkn5h"
},
"base16-nvim": {
"base16": {
"type": "Git",
"repository": {
"type": "GitHub",
Expand All @@ -36,6 +36,21 @@
"url": "https://github.com/rrethy/base16-nvim/archive/6ac181b5733518040a33017dde654059cd771b7c.tar.gz",
"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": {
"type": "Git",
"repository": {
Expand Down Expand Up @@ -300,7 +315,7 @@
"url": "https://github.com/sindrets/diffview.nvim/archive/4516612fe98ff56ae0415a259ff6361a89419b0a.tar.gz",
"hash": "0brabpd02596hg98bml118bx6z2sly98kf1cr2p0xzybiinb4zs9"
},
"dracula-nvim": {
"dracula": {
"type": "Git",
"repository": {
"type": "GitHub",
Expand Down Expand Up @@ -432,7 +447,7 @@
"url": "https://github.com/ellisonleao/glow.nvim/archive/238070a686c1da3bccccf1079700eb4b5e19aea4.tar.gz",
"hash": "1j63y3hb03n5m4jig8576sxnb3jixxlr66m9xcs8vgfm5h0mrhqs"
},
"gruvbox-nvim": {
"gruvbox": {
"type": "Git",
"repository": {
"type": "GitHub",
Expand Down Expand Up @@ -1259,7 +1274,7 @@
"url": "https://github.com/nvimtools/none-ls.nvim/archive/bb680d752cec37949faca7a1f509e2fe67ab418a.tar.gz",
"hash": "11zgc86cjkv1vi183mplx3bsqa2x7ardk7ybyrp702xx5hmd882l"
},
"nord-nvim": {
"nord": {
"type": "Git",
"repository": {
"type": "GitHub",
Expand Down Expand Up @@ -1607,7 +1622,7 @@
"url": "https://github.com/Hoffs/omnisharp-extended-lsp.nvim/archive/4916fa12e5b28d21a1f031f0bdd10aa15a75d85d.tar.gz",
"hash": "0w2zbiz2sxblnmhnqp6f6n7d9g9cm40ksk66anl3s7qnqffvc3cl"
},
"onedark-nvim": {
"onedark": {
"type": "Git",
"repository": {
"type": "GitHub",
Expand Down Expand Up @@ -1643,7 +1658,7 @@
"url": "https://github.com/jmbuhr/otter.nvim/archive/e8c662e1aefa8b483cfba6e00729a39a363dcecc.tar.gz",
"hash": "0csl3ddm8782fw836adj4fp4h3fg2ygv7ik632llk55mp1q4dw1l"
},
"oxocarbon-nvim": {
"oxocarbon": {
"type": "Git",
"repository": {
"type": "GitHub",
Expand Down Expand Up @@ -1883,7 +1898,7 @@
"url": "https://github.com/akinsho/toggleterm.nvim/archive/344fc1810292785b3d962ddac2de57669e1a7ff9.tar.gz",
"hash": "0awj2kj3lam2j48bgld5wyb4m1v09gpxmzww35rgysq7wipliqx1"
},
"tokyonight-nvim": {
"tokyonight": {
"type": "Git",
"repository": {
"type": "GitHub",
Expand Down Expand Up @@ -2015,7 +2030,7 @@
"url": "https://github.com/folke/which-key.nvim/archive/8ab96b38a2530eacba5be717f52e04601eb59326.tar.gz",
"hash": "12wkl04apgag0p5njw8mczzlbxqf5h08k61qciwy10n4q1harzvz"
},
"yanky.nvim": {
"yanky-nvim": {
"type": "Git",
"repository": {
"type": "GitHub",
Expand All @@ -2029,4 +2044,4 @@
}
},
"version": 3
}
}

0 comments on commit ad6b042

Please sign in to comment.