Skip to content

Commit

Permalink
WIP: nixCats-nix for neovim
Browse files Browse the repository at this point in the history
  • Loading branch information
adomixaszvers committed Jan 19, 2025
1 parent b13d559 commit c2946f1
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 7 deletions.
16 changes: 16 additions & 0 deletions flake.lock

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

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nixCats.url = "github:BirdeeHub/nixCats-nvim";
nixGL = {
url = "github:guibou/nixGL";
inputs = {
Expand Down
10 changes: 5 additions & 5 deletions profiles/cli/neovim/customRc.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# lua
''
dofile '${./nvim-treesitter.lua}'
dofile '${./lspconfig.lua}'
dofile '${./cmp.lua}'
dofile '${./playground.lua}'
dofile '${./init.lua}'
dofile '${./lua/nvim-treesitter.lua}'
dofile '${./lua/lspconfig.lua}'
dofile '${./lua/cmp.lua}'
dofile '${./lua/playground.lua}'
dofile '${./lua/init.lua}'
''
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
143 changes: 143 additions & 0 deletions profiles/cli/neovim/nixCats.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{ pkgs, inputs }:
{
categoryDefinitions =
{
pkgs,
# settings,
# categories,
# extra,
# name,
# mkNvimPlugin,
...
}@packageDef:
{
lspsAndRuntimeDeps = {
general = with pkgs; [
nixfmt
ripgrep
deadnix
statix
];
};
startupPlugins = {
general = with pkgs.vimPlugins; [
ale
commentary
direnv-vim
fugitive
gitsigns-nvim
neoformat
nvim-sops
nordic-nvim
playground
rainbow
repeat
solarized
vim-suda
surround
vim-polyglot
vim-sneak
vim-unimpaired
vinegar
which-key-nvim
yuck-vim
];
themer = with pkgs.vimPlugins; [
nordic-nvim
solarized
];
lsp = [ pkgs.vimPlugins.nvim-lspconfig ];
telescope = with pkgs.vimPlugins; [
plenary-nvim
telescope-nvim
telescope-fzf-native-nvim
];
cmp = with pkgs.vimPlugins; [
cmp-nvim-lsp
cmp-buffer
cmp-path
cmp-cmdline
nvim-cmp
vim-vsnip
];
treesitter-full = [ pkgs.vimPlugins.nvim-treesitter.withAllGrammars ];
treesitter-small = [
pkgs.vimPlugins.nvim-treesitter.withPlugins
(
p: with p; [
bash
c
lua
nix
vim
]
)
];
};
optionalPlugins = {
general = with pkgs.vimPlugins; [
lualine-nvim
fidget-nvim
nvim-web-devicons
];
};
# shared libraries to be added to LD_LIBRARY_PATH
# variable available to nvim runtime
sharedLibraries = {
general = with pkgs; [
# libgit2
];
};
environmentVariables = {
# test = {
# CATTESTVAR = "It worked!";
# };
};
extraWrapperArgs = {
# test = [
# ''--set CATTESTVAR2 "It worked again!"''
# ];
};
# lists of the functions you would have passed to
# python.withPackages or lua.withPackages

# get the path to this python environment
# in your lua config via
# vim.g.python3_host_prog
# or run from nvim terminal via :!<packagename>-python3
extraPython3Packages = {
test = _: [ ];
};
# populates $LUA_PATH and $LUA_CPATH
extraLuaPackages = {
test = [ (_: [ ]) ];
};
};
packageDefinitions = {
# the name here is the name of the package
# and also the default command name for it.
nixCats = { pkgs, ... }@misc: {
# these also recieve our pkgs variable
# see :help nixCats.flake.outputs.packageDefinitions
settings = {
aliases = [];

# explained below in the `regularCats` package's definition
# OR see :help nixCats.flake.outputs.settings for all of the settings available
wrapRc = true;
configDirName = "nixCats-nvim";
# neovim-unwrapped = inputs.neovim-nightly-overlay.packages.${pkgs.system}.neovim;
};
# enable the categories you want from categoryDefinitions
categories = {
general = true;
themer = true;
lsp = true;
cmp = true;
telescope = true;
treesitter-full = true;
treesitter-small = false;
};
};
};
}
4 changes: 2 additions & 2 deletions profiles/cli/neovim/nvim-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ let
configure = moduleConfigure;
luaRcContent = # lua
''
dofile '${./nvim-treesitter.lua}'
dofile '${./init.lua}'
dofile '${./lua/nvim-treesitter.lua}'
dofile '${./lua/init.lua}'
'';
};
extraWrapperArgs =
Expand Down

0 comments on commit c2946f1

Please sign in to comment.