Compare commits

..

No commits in common. "7a5c75b8652caa4a61700b6d2dcc641fdfed8ba1" and "a07e113f3a3cc572e1ccfddae44b37003290158d" have entirely different histories.

4 changed files with 19 additions and 38 deletions

View file

@ -21,7 +21,6 @@
./flake/legacyPackages.nix
./flake/overlays.nix
./flake/packages.nix
./flake/develop.nix
];
flake = {
@ -57,7 +56,20 @@
};
};
perSystem = {pkgs, ...}: {
perSystem = {
self',
config,
pkgs,
...
}: {
devShells = {
default = self'.devShells.lsp;
nvim-nix = pkgs.mkShell {packages = [config.packages.nix];};
lsp = pkgs.mkShell {
packages = with pkgs; [nil statix deadnix alejandra];
};
};
# Provide the default formatter. `nix fmt` in project root
# will format available files with the correct formatter.
# P.S: Please do not format with nixfmt! It messes with many

View file

@ -1,30 +0,0 @@
{lib, ...}: {
perSystem = {
pkgs,
config,
self',
...
}: {
devShells = {
default = self'.devShells.lsp;
nvim-nix = pkgs.mkShellNoCC {packages = [config.packages.nix];};
lsp = pkgs.mkShellNoCC {
packages = with pkgs; [nil statix deadnix alejandra];
};
};
# This package exists to make development easier by providing the place and
# boilerplate to build a test nvf configuration. Feel free to use this for
# testing, but make sure to discard the changes before creating a pull
# request.
packages.dev = let
configuration = {};
customNeovim = lib.nvim.neovimConfiguration {
inherit pkgs;
modules = [configuration];
};
in
customNeovim.neovim;
};
}

View file

@ -10,8 +10,6 @@
inherit (lib.nvim.attrsets) mapListToAttrs;
inherit (builtins) attrNames typeOf tryEval concatStringsSep;
borders = config.vim.ui.borders.plugins.nvim-cmp;
cfg = config.vim.autocomplete.nvim-cmp;
luasnipEnable = config.vim.snippets.luasnip.enable;
getPluginName = plugin:
@ -83,9 +81,10 @@ in {
setupOpts = {
sources = map (s: {name = s;}) (attrNames cfg.sources);
window = mkIf borders.enable {
completion.border = borders.style;
documentation.border = borders.style;
# TODO: try to get nvim-cmp to follow global border style
window = mkIf config.vim.ui.borders.enable {
completion = mkLuaInline "cmp.config.window.bordered()";
documentation = mkLuaInline "cmp.config.window.bordered()";
};
formatting.format = cfg.format;

View file

@ -72,7 +72,7 @@ in {
};
format = mkOption {
type = nullOr luaInline;
type = luaInline;
default = mkLuaInline ''
function(entry, vim_item)
vim_item.menu = (${toLuaObject cfg.sources})[entry.source.name]