feat: update nvim package
All checks were successful
check-flake / build (push) Successful in 17m41s

This commit is contained in:
2024-11-14 19:53:26 +02:00
parent e24df7ff1f
commit aef12de964
7 changed files with 156 additions and 79 deletions

View File

@@ -1,4 +1,4 @@
{pkgs}:
{ pkgs }:
pkgs.stdenv.mkDerivation {
name = "nvim-config";
src = ./src;

View File

@@ -34,7 +34,9 @@ require("lazy").setup({
{ import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.ui.mini-indentscope" },
{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
{ import = "plugins.tokyonight" },
{ import = "plugins.catppuccin" },
-- { import = "plugins.tokyonight" },
-- { import = "plugins.lang.nix" },
{ import = "plugins.lang.shell" },
{ import = "plugins.misc.tmux-navigator" },
},
@@ -51,7 +53,7 @@ require("lazy").setup({
lazyvim = false,
neovim = false,
},
install = { colorscheme = { "tokyonight", "habamax" } },
install = { colorscheme = { "catppuccin-macchiato" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {

View File

@@ -0,0 +1,62 @@
return {
"catppuccin/nvim",
lazy = true,
name = "catppuccin",
opts = {
flavour = "macchiato",
transparent_background = false,
integrations = {
aerial = true,
alpha = true,
cmp = true,
dashboard = true,
flash = true,
grug_far = true,
gitsigns = true,
headlines = true,
illuminate = true,
indent_blankline = { enabled = true },
leap = true,
lsp_trouble = true,
mason = true,
markdown = true,
mini = true,
native_lsp = {
enabled = true,
underlines = {
errors = { "undercurl" },
hints = { "undercurl" },
warnings = { "undercurl" },
information = { "undercurl" },
},
},
navic = { enabled = true, custom_bg = "lualine" },
neotest = true,
neotree = true,
noice = true,
notify = true,
semantic_tokens = true,
telescope = true,
treesitter = true,
treesitter_context = true,
which_key = true,
},
},
specs = {
{
"akinsho/bufferline.nvim",
optional = true,
opts = function(_, opts)
if (vim.g.colors_name or ""):find("catppuccin") then
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
end
end,
},
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "catppuccin-macchiato",
},
},
}

View File

@@ -1,10 +1,10 @@
return {
"folke/tokyonight.nvim",
opts = {
transparent = true,
styles = {
sidebars = "transparent",
floats = "transparent",
},
},
"folke/tokyonight.nvim",
opts = {
transparent = true,
styles = {
sidebars = "transparent",
floats = "transparent",
},
},
}

View File

@@ -12,42 +12,48 @@
nixConfig = {
trusted-substituters = [
"https://nix-community.cachix.org"
"https://palkx.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"palkx.cachix.org-1:qaQoL5CXpGzUbqsIvxUEL7wUhoIrjV0Q8M4HbJ8/8S4="
];
};
outputs = inputs @ {
nixpkgs,
flake-utils,
neovim-nightly-overlay,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
overlayFlakeInputs = prev: final: {
neovim = neovim-nightly-overlay.packages.${system}.default.overrideAttrs (oa: {
nativeBuildInputs = oa.nativeBuildInputs ++ [final.libtermkey];
});
};
overlayLazyVim = prev: final: {
lazyVim = import ./packages/lazyVim.nix {
pkgs = final;
outputs =
inputs@{
nixpkgs,
flake-utils,
neovim-nightly-overlay,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlayFlakeInputs = prev: final: {
neovim = neovim-nightly-overlay.packages.${system}.default.overrideAttrs (oa: {
nativeBuildInputs = oa.nativeBuildInputs ++ [ final.libtermkey ];
});
};
};
pkgs = import nixpkgs {
inherit system;
overlays = [overlayFlakeInputs overlayLazyVim];
};
in rec {
packages.lazyVim = pkgs.lazyVim;
apps.lazyVim = {
type = "app";
program = "${packages.default}/bin/nvim";
};
packages.default = packages.lazyVim;
apps.default = apps.lazyVim;
});
overlayLazyVim = prev: final: { lazyVim = import ./packages/lazyVim.nix { pkgs = final; }; };
pkgs = import nixpkgs {
inherit system;
overlays = [
overlayFlakeInputs
overlayLazyVim
];
};
in
rec {
packages.lazyVim = pkgs.lazyVim;
apps.lazyVim = {
type = "app";
program = "${packages.default}/bin/nvim";
};
packages.default = packages.lazyVim;
apps.default = apps.lazyVim;
}
);
}

View File

@@ -1,12 +1,13 @@
{pkgs}: let
config = import ../config {inherit pkgs;};
runtimeDeps = import ../runtimeDeps.nix {inherit pkgs;};
{ pkgs }:
let
config = import ../config { inherit pkgs; };
runtimeDeps = import ../runtimeDeps.nix { inherit pkgs; };
in
pkgs.wrapNeovim pkgs.neovim {
viAlias = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = false;
extraMakeWrapperArgs = ''--prefix PATH : "${pkgs.lib.makeBinPath runtimeDeps.dependencies}" --set XDG_CONFIG_HOME "${config}"'';
}
pkgs.wrapNeovim pkgs.neovim {
viAlias = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = false;
extraMakeWrapperArgs = ''--prefix PATH : "${pkgs.lib.makeBinPath runtimeDeps.dependencies}" --set XDG_CONFIG_HOME "${config}"'';
}

View File

@@ -1,28 +1,34 @@
{pkgs}: {
dependencies = with pkgs; [
nixd # nix lsp
alejandra # nix formatter
statix # linter for nix
ripgrep
fd
git
curl # needed to fetch titles from urls
wget
cargo
php82
php82Packages.composer
go
ruby
luarocks
zulu #java11
fish
fzf
perl536
perl536Packages.CPAN
unzip
tree-sitter
gcc
gnumake
lazygit
];
{ pkgs }:
{
dependencies =
with pkgs;
[
nixfmt-rfc-style # nix formatter
(terraform.overrideAttrs (oldAttrs: {
meta.license = lib.licenses.mpl20;
})) # terraform fmt
ripgrep
fd
git
curl # needed to fetch titles from urls
wget
cargo
php82
php82Packages.composer
go
ruby
luarocks
zulu # java11
fish
fzf
perl536
perl536Packages.CPAN
unzip
tree-sitter
gnumake
lazygit
python312
python312Packages.pip
]
++ (if pkgs.stdenv.hostPlatform.isDarwin then [ ] else [ gcc ]);
}