Compare commits

..

No commits in common. "10a06b3fa052dc6be68493020c3bd40c6789f07a" and "91deec0986d34dc21936524e3bd072d63e108733" have entirely different histories.

20 changed files with 128 additions and 213 deletions

55
.github/labels.yml vendored
View file

@ -1,55 +0,0 @@
# This file is used by .github/workflows/labels.yml
"topic: plugins":
- any:
- changed-files:
- any-glob-to-any-file:
- modules/plugins/**/*
"topic: modules":
- any:
- changed-files:
- any-glob-to-any-file:
- modules/**/*
"topic: dependencies":
- any:
- changed-files:
- any-glob-to-any-file:
- npins
- flake.lock
"topic: CI":
- any:
- changed-files:
- any-glob-to-any-file:
- .github/workflows/*.yml
- .github/typos.toml
. .github/dependabot.yml
"topic: meta":
- any:
- changed-files:
- any-glob-to-any-file:
- .github/CODEOWNERS
- LICENSE
- .github/README.md
- .github/funding.yml
- .github/assets
- .github/*_TEMPLATE
- .gitignore
- .editorconfig
- release.json
"topic: documentation":
- any:
- changed-files:
- any-glob-to-any-file:
- docs/**/*
- .github/CONTRIBUTING.md
- .github/README.md
"topic: packaging":
- any:
- changed-files:
- any-glob-to-any-file:
- flake.nix
- flake/packages.nix

View file

@ -1,33 +0,0 @@
name: Backport PR on Label
on:
pull_request_target:
types:
- labeled
# Permissions needed for the korthout/backport-action to create branches and PRs
permissions:
contents: write
pull-requests: write
jobs:
backport:
name: Create Backport PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true && startsWith(github.event.label.name, 'backport-')
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ steps.app-token.outputs.token }}
- name: Backport Action
uses: korthout/backport-action@v3
with:
# Regex pattern for labels that should trigger a backport AND extracts the target branch
# from the name (e.g. v0.x or v0.x.y; we use zerover). This action will ONLY proceed if
# the label that triggered the workflow fully matches this pattern.
# Example matching labels: "backport-v0.1", "backport-v0.10.1"
# Example non-matching labels: "backport-foo", "backport-v1.0"
label_pattern: '^backport-(v0\.\d+(\.\d+)?)$'

View file

@ -1,21 +0,0 @@
name: "Label PR"
on:
pull_request_target:
types: [edited, opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
labels:
name: "Label PR"
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.title, '[skip ci]')"
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labels.yml
sync-labels: true

View file

@ -12,7 +12,6 @@
inherit inherit
( (
(lib.evalModules { (lib.evalModules {
specialArgs = {inherit inputs;};
modules = modules =
import ../modules/modules.nix { import ../modules/modules.nix {
inherit lib pkgs; inherit lib pkgs;

View file

@ -362,11 +362,3 @@
[Hardtime.nvim]: https://github.com/m4xshen/hardtime.nvim [Hardtime.nvim]: https://github.com/m4xshen/hardtime.nvim
- Add Plugin [Hardtime.nvim] under `vim.binds.hardtime-nvim` with `enable` and `setupOpts` options - Add Plugin [Hardtime.nvim] under `vim.binds.hardtime-nvim` with `enable` and `setupOpts` options
[taylrfnt](https://github.com/taylrfnt):
[nvim-tree](https://github.com/nvim-tree/nvim-tree.lua):
- Add missing `right_align` option for existing `renderer.icons` options.
- Add missing `render.icons` options (`hidden_placement`,
`diagnostics_placement`, and `bookmarks_placement`).

View file

@ -18,7 +18,10 @@
systems = import inputs.systems; systems = import inputs.systems;
imports = [ imports = [
./flake/templates ./flake/templates
./flake/apps.nix ./flake/apps.nix
./flake/legacyPackages.nix
./flake/overlays.nix
./flake/packages.nix ./flake/packages.nix
./flake/develop.nix ./flake/develop.nix
]; ];

View file

@ -1,31 +0,0 @@
{
rustPlatform,
fetchFromGitHub,
writeShellScriptBin,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "blink-cmp";
version = "1.2.0";
src = fetchFromGitHub {
owner = "Saghen";
repo = "blink.cmp";
tag = "v${finalAttrs.version}";
hash = "sha256-bKe8SSg1HPWE7b4iRQJwiOVCrvvgttuHCOIa4U/38AY=";
};
postInstall = ''
cp -r {lua,plugin} "$out"
mkdir -p "$out/target"
mv "$out/lib" "$out/target/release"
'';
cargoHash = "sha256-IDoDugtNWQovfSstbVMkKHLBXKa06lxRWmywu4zyS3M=";
useFetchCargoVendor = true;
nativeBuildInputs = [
(writeShellScriptBin "git" "exit 1")
];
env.RUSTC_BOOTSTRAP = true;
})

View file

@ -3,14 +3,13 @@
pkgs, pkgs,
config, config,
self', self',
inputs',
... ...
}: { }: {
devShells = { devShells = {
default = self'.devShells.lsp; default = self'.devShells.lsp;
nvim-nix = pkgs.mkShellNoCC {packages = [config.packages.nix];}; nvim-nix = pkgs.mkShellNoCC {packages = [config.packages.nix];};
lsp = pkgs.mkShellNoCC { lsp = pkgs.mkShellNoCC {
packages = with pkgs; [inputs'.nil.packages.default statix deadnix alejandra npins]; packages = with pkgs; [nil statix deadnix alejandra npins];
}; };
}; };

35
flake/legacyPackages.nix Normal file
View file

@ -0,0 +1,35 @@
{
inputs,
self,
...
}: {
perSystem = {
system,
inputs',
...
}: {
legacyPackages = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.self.overlays.default
(final: prev: {
# Build nil from source to get most recent
# features as they are added.
nil = inputs'.nil.packages.default;
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;
};
};
})
];
};
};
}

View file

@ -0,0 +1,37 @@
{
stdenv,
rustPlatform,
vimUtils,
gitMinimal,
src,
version,
}: let
blink-fuzzy-lib = rustPlatform.buildRustPackage {
pname = "blink-fuzzy-lib";
inherit version src;
# TODO: remove this if plugin stops using nightly rust
env.RUSTC_BOOTSTRAP = true;
useFetchCargoVendor = true;
cargoHash = "sha256-IDoDugtNWQovfSstbVMkKHLBXKa06lxRWmywu4zyS3M=";
nativeBuildInputs = [gitMinimal];
};
in
vimUtils.buildVimPlugin {
pname = "blink-cmp";
inherit version src;
# blink references a repro.lua which is placed outside the lua/ directory
doCheck = false;
preInstall = let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in ''
mkdir -p target/release
ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy${ext} target/release/libblink_cmp_fuzzy${ext}
'';
# Module for reproducing issues
nvimSkipModules = ["repro"];
}

19
flake/overlays.nix Normal file
View file

@ -0,0 +1,19 @@
{
pkgs,
lib,
...
}: let
inherit (lib.nvim) neovimConfiguration;
buildPkg = pkgs: modules: (neovimConfiguration {inherit pkgs modules;}).neovim;
nixConfig = import ../configuration.nix false;
maximalConfig = import ../configuration.nix true;
in {
flake.overlays.default = final: _prev: {
inherit neovimConfiguration;
neovim-nix = buildPkg final [nixConfig];
neovim-maximal = buildPkg final [maximalConfig];
devPkg = buildPkg pkgs [nixConfig {config.vim.languages.html.enable = pkgs.lib.mkForce true;}];
};
}

View file

@ -1,4 +1,4 @@
{inputs, ...} @ args: { {inputs, ...}: {
perSystem = { perSystem = {
config, config,
pkgs, pkgs,
@ -6,15 +6,8 @@
... ...
}: let }: let
docs = import ../docs {inherit pkgs inputs lib;}; docs = import ../docs {inherit pkgs inputs lib;};
buildPkg = maximal:
(args.config.flake.lib.nvim.neovimConfiguration {
inherit pkgs;
modules = [(import ../configuration.nix maximal)];
}).neovim;
in { in {
packages = { packages = {
blink-cmp = pkgs.callPackage ./blink {};
inherit (docs.manual) htmlOpenTool; inherit (docs.manual) htmlOpenTool;
# Documentation # Documentation
docs = docs.manual.html; docs = docs.manual.html;
@ -68,9 +61,9 @@
''; '';
# Exposed neovim configurations # Exposed neovim configurations
nix = buildPkg false; nix = config.legacyPackages.neovim-nix;
maximal = buildPkg true; maximal = config.legacyPackages.neovim-maximal;
default = config.packages.nix; default = config.legacyPackages.neovim-nix;
}; };
}; };
} }

View file

@ -4,7 +4,7 @@
lib, lib,
... ...
}: { }: {
types = import ./types {inherit lib self;}; types = import ./types {inherit lib;};
config = import ./config.nix {inherit lib;}; config = import ./config.nix {inherit lib;};
binds = import ./binds.nix {inherit lib;}; binds = import ./binds.nix {inherit lib;};
dag = import ./dag.nix {inherit lib;}; dag = import ./dag.nix {inherit lib;};

View file

@ -1,9 +1,6 @@
{ {lib}: let
lib,
self,
}: let
typesDag = import ./dag.nix {inherit lib;}; typesDag = import ./dag.nix {inherit lib;};
typesPlugin = import ./plugins.nix {inherit lib self;}; typesPlugin = import ./plugins.nix {inherit lib;};
typesLanguage = import ./languages.nix {inherit lib;}; typesLanguage = import ./languages.nix {inherit lib;};
customTypes = import ./custom.nix {inherit lib;}; customTypes = import ./custom.nix {inherit lib;};
in { in {

View file

@ -1,7 +1,4 @@
{ {lib}: let
lib,
self,
}: let
inherit (lib.options) mkOption; inherit (lib.options) mkOption;
inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair; inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair;
inherit (lib.strings) hasPrefix removePrefix; inherit (lib.strings) hasPrefix removePrefix;
@ -15,7 +12,7 @@
mapAttrs' (n: v: nameValuePair (removePrefix prefix n) {src = v;}) (filterAttrs (n: _: hasPrefix prefix n) inputs); mapAttrs' (n: v: nameValuePair (removePrefix prefix n) {src = v;}) (filterAttrs (n: _: hasPrefix prefix n) inputs);
# Get the names of all npins # Get the names of all npins
pluginInputNames = ["blink-cmp"] ++ attrNames self.pins; pluginInputNames = attrNames (lib.importJSON ../../npins/sources.json).pins;
# You can either use the name of the plugin or a package. # You can either use the name of the plugin or a package.
pluginType = nullOr ( pluginType = nullOr (

View file

@ -683,48 +683,15 @@ in {
}; };
git_placement = mkOption { git_placement = mkOption {
type = enum ["before" "after" "signcolumn" "right_align"]; type = enum ["before" "after" "signcolumn"];
description = "Place where the git icons will be rendered. `signcolumn` requires `view.signcolumn` to be enabled.";
default = "before"; default = "before";
description = ''
Place where the git icons will be rendered.
`signcolumn` requires `view.signcolumn` to be enabled.
'';
}; };
modified_placement = mkOption { modified_placement = mkOption {
type = enum ["before" "after" "signcolumn" "right_align"]; type = enum ["before" "after" "signcolumn"];
description = "Place where the modified icons will be rendered. `signcolumn` requires `view.signcolumn` to be enabled.";
default = "after"; default = "after";
description = ''
Place where the modified icons will be rendered.
`signcolumn` requires `view.signcolumn` to be enabled.
'';
};
hidden_placement = mkOption {
type = enum ["before" "after" "signcolumn" "right_align"];
default = "after";
description = ''
Place where the hidden icons will be rendered.
`signcolumn` requires `view.signcolumn` to be enabled.
'';
};
diagnostics_placement = mkOption {
type = enum ["before" "after" "signcolumn" "right_align"];
default = "after";
description = ''
Place where the diagnostics icons will be rendered.
`signcolumn` requires `view.signcolumn` to be enabled.
'';
};
bookmarks_placement = mkOption {
type = enum ["before" "after" "signcolumn" "right_align"];
default = "after";
description = ''
Place where the bookmark icons will be rendered.
`signcolumn` requires `view.signcolumn` to be enabled.
'';
}; };
padding = mkOption { padding = mkOption {

View file

@ -143,6 +143,8 @@ in {
}) })
(mkIf ftcfg.enable { (mkIf ftcfg.enable {
lsp.enable = true;
startPlugins = [ startPlugins = [
( (
if ftcfg.enableNoResolvePatch if ftcfg.enableNoResolvePatch

View file

@ -2,7 +2,6 @@
config, config,
pkgs, pkgs,
lib, lib,
inputs,
... ...
}: let }: let
inherit (builtins) attrNames; inherit (builtins) attrNames;
@ -28,7 +27,7 @@
else ''{"${package}/bin/${defaultCmd}"}''; else ''{"${package}/bin/${defaultCmd}"}'';
servers = { servers = {
nil = { nil = {
package = inputs.nil.packages.${pkgs.stdenv.system}.nil; package = pkgs.nil;
internalFormatter = true; internalFormatter = true;
lspConfig = '' lspConfig = ''
lspconfig.nil_ls.setup{ lspconfig.nil_ls.setup{

View file

@ -51,7 +51,7 @@
doCheck = false; doCheck = false;
}; };
inherit (inputs.self.packages.${pkgs.stdenv.system}) blink-cmp; inherit (inputs.self.legacyPackages.${pkgs.stdenv.system}) blink-cmp;
}; };
buildConfigPlugins = plugins: buildConfigPlugins = plugins:

View file

@ -39,6 +39,22 @@
"url": "https://github.com/rrethy/base16-nvim/archive/965160025d0facbe9caa863e5beef2a7a488e9d1.tar.gz", "url": "https://github.com/rrethy/base16-nvim/archive/965160025d0facbe9caa863e5beef2a7a488e9d1.tar.gz",
"hash": "02w1mn15gydma9canvqrlwf4l5z76s1vs01zanipwwflvwclsb8f" "hash": "02w1mn15gydma9canvqrlwf4l5z76s1vs01zanipwwflvwclsb8f"
}, },
"blink-cmp": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "saghen",
"repo": "blink.cmp"
},
"pre_releases": false,
"version_upper_bound": null,
"release_prefix": null,
"submodules": false,
"version": "v1.2.0",
"revision": "d72a826e1961e14f91d8867d10a27a89c5cfe748",
"url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v1.2.0",
"hash": "01phyx7y26p2123xpdp0zfp45rc8f014a8myxn2ga71m514vr9vc"
},
"blink-cmp-spell": { "blink-cmp-spell": {
"type": "Git", "type": "Git",
"repository": { "repository": {