mirror of
https://github.com/zoriya/flake.git
synced 2026-06-08 04:43:32 +00:00
Compile catppuccin
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
require("catppuccin").setup({
|
||||||
|
compile_path = vim.env.out .. "/lua/colors",
|
||||||
|
integrations = {
|
||||||
|
telescope = {
|
||||||
|
enabled = true,
|
||||||
|
style = "nvchad"
|
||||||
|
},
|
||||||
|
blink_cmp = true,
|
||||||
|
harpoon = true,
|
||||||
|
nvim_surround = true,
|
||||||
|
which_key = true,
|
||||||
|
navic = true,
|
||||||
|
leap = true,
|
||||||
|
noice = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
+78
-49
@@ -24,61 +24,90 @@ in
|
|||||||
|
|
||||||
config = ./.;
|
config = ./.;
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; {
|
plugins = let
|
||||||
start = [
|
catppuccin-nvim = let
|
||||||
(mkPlugin lz-nvim "lz-n")
|
neovim = pkgs.neovim.override {
|
||||||
# TODO: use catppuccin's compile feature. see: https://github.com/stasjok/dotfiles/blob/36037f523185ba1409dd953999fda0f0db0dbd4f/nvim/default.nix#L136C8-L148C12
|
configure.packages.catppuccin-nvim.start = [pkgs.vimPlugins.catppuccin-nvim];
|
||||||
catppuccin-nvim
|
};
|
||||||
nvim-treesitter.withAllGrammars
|
in
|
||||||
nvim-treesitter-textobjects
|
pkgs.runCommand "catppuccin-nvim" {} ''
|
||||||
vim-illuminate
|
mkdir -p $out
|
||||||
nvim-lspconfig
|
cp -r --no-preserve=mode,ownership ${pkgs.vimPlugins.catppuccin-nvim}/* $out
|
||||||
oil-nvim
|
rm -rf $out/doc $out/colors/*
|
||||||
nvim-surround
|
|
||||||
telescope-fzf-native-nvim
|
|
||||||
vim-sleuth
|
|
||||||
auto-save-nvim
|
|
||||||
|
|
||||||
gitsigns-nvim
|
${neovim}/bin/nvim -l ${./catppuccin.lua}
|
||||||
git-conflict-nvim
|
rm $out/lua/colors/cached
|
||||||
|
cd $out/lua/colors
|
||||||
|
for flavor in *; do
|
||||||
|
mv "$out/lua/colors/$flavor" "catppuccin-$flavor.lua"
|
||||||
|
cat <<-eof > $out/colors/catppuccin-''${flavor}.lua
|
||||||
|
if vim.g.colors_name == "catppuccin-$flavor" and vim.o.background ~= (vim.g.colors_name == "catppuccin-latte" and "light" or "dark") then
|
||||||
|
dofile("$out/lua/colors/catppuccin-" .. (vim.o.background == "light" and "latte" or "mocha") .. ".lua")
|
||||||
|
else
|
||||||
|
dofile("$out/lua/colors/catppuccin-$flavor.lua")
|
||||||
|
end
|
||||||
|
eof
|
||||||
|
done
|
||||||
|
|
||||||
mini-icons
|
cat <<-eof > $out/colors/catppuccin.lua
|
||||||
mini-operators
|
dofile("$out/lua/colors/catppuccin-" .. (vim.o.background == "light" and "latte" or "mocha") .. ".lua")
|
||||||
mini-splitjoin
|
eof
|
||||||
vim-wordmotion
|
'';
|
||||||
increment-activator
|
in
|
||||||
|
with pkgs.vimPlugins; {
|
||||||
|
start = [
|
||||||
|
(mkPlugin lz-nvim "lz-n")
|
||||||
|
catppuccin-nvim
|
||||||
|
nvim-treesitter.withAllGrammars
|
||||||
|
nvim-treesitter-textobjects
|
||||||
|
vim-illuminate
|
||||||
|
nvim-lspconfig
|
||||||
|
oil-nvim
|
||||||
|
nvim-surround
|
||||||
|
telescope-fzf-native-nvim
|
||||||
|
vim-sleuth
|
||||||
|
auto-save-nvim
|
||||||
|
|
||||||
leap-nvim
|
gitsigns-nvim
|
||||||
flit-nvim
|
git-conflict-nvim
|
||||||
|
|
||||||
noice-nvim
|
mini-icons
|
||||||
statuscol-nvim
|
mini-operators
|
||||||
|
mini-splitjoin
|
||||||
|
vim-wordmotion
|
||||||
|
increment-activator
|
||||||
|
|
||||||
which-key-nvim
|
leap-nvim
|
||||||
nvim-colorizer-lua
|
flit-nvim
|
||||||
nvim-pqf
|
|
||||||
lualine-nvim
|
|
||||||
nvim-navic
|
|
||||||
virt-column-nvim
|
|
||||||
indent-blankline-nvim
|
|
||||||
|
|
||||||
SchemaStore-nvim
|
noice-nvim
|
||||||
blink-cmp
|
statuscol-nvim
|
||||||
ts-comments-nvim
|
|
||||||
undotree
|
which-key-nvim
|
||||||
nvim-lint
|
nvim-colorizer-lua
|
||||||
(conform-nvim.overrideAttrs {
|
nvim-pqf
|
||||||
# clashes with oil
|
lualine-nvim
|
||||||
postPatch = "rm doc/recipes.md";
|
nvim-navic
|
||||||
})
|
virt-column-nvim
|
||||||
vim-helm
|
indent-blankline-nvim
|
||||||
(mkPlugin vim-lumen "vim-lumen")
|
|
||||||
];
|
SchemaStore-nvim
|
||||||
opt = [
|
blink-cmp
|
||||||
telescope-nvim
|
ts-comments-nvim
|
||||||
harpoon2
|
undotree
|
||||||
];
|
nvim-lint
|
||||||
};
|
(conform-nvim.overrideAttrs {
|
||||||
|
# clashes with oil
|
||||||
|
postPatch = "rm doc/recipes.md";
|
||||||
|
})
|
||||||
|
vim-helm
|
||||||
|
(mkPlugin vim-lumen "vim-lumen")
|
||||||
|
];
|
||||||
|
opt = [
|
||||||
|
telescope-nvim
|
||||||
|
harpoon2
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
# telescope helpers
|
# telescope helpers
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"catppuccin-nvim",
|
|
||||||
colorscheme = "catppuccin",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
load = function() end,
|
|
||||||
opt = {
|
|
||||||
integrations = {
|
|
||||||
telescope = {
|
|
||||||
enabled = true,
|
|
||||||
style = "nvchad"
|
|
||||||
},
|
|
||||||
blink_cmp = true,
|
|
||||||
harpoon = true,
|
|
||||||
nvim_surround = true,
|
|
||||||
which_key = true,
|
|
||||||
navic = true,
|
|
||||||
leap = true,
|
|
||||||
|
|
||||||
fidget = false,
|
|
||||||
noice = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
after = function(plug)
|
|
||||||
require("catppuccin").setup(plug.opt)
|
|
||||||
vim.cmd.colorscheme("catppuccin")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"virt-column.nvim",
|
|
||||||
lazy = false,
|
|
||||||
load = function() end,
|
|
||||||
opts = {
|
|
||||||
char = "▕",
|
|
||||||
},
|
|
||||||
after = function(plug)
|
|
||||||
require("virt-column").setup(plug.opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"indent-blankline.nvim",
|
|
||||||
lazy = false,
|
|
||||||
load = function() end,
|
|
||||||
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
|
|
||||||
opts = {
|
|
||||||
indent = {
|
|
||||||
char = "▏",
|
|
||||||
tab_char = "▏",
|
|
||||||
},
|
|
||||||
exclude = {
|
|
||||||
filetypes = {
|
|
||||||
"help",
|
|
||||||
"alpha",
|
|
||||||
"dashboard",
|
|
||||||
"neo-tree",
|
|
||||||
"Trouble",
|
|
||||||
"lazy",
|
|
||||||
"lspinfo",
|
|
||||||
"packer",
|
|
||||||
"checkhealth",
|
|
||||||
"help",
|
|
||||||
"man",
|
|
||||||
"",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
scope = { show_start = false, show_end = false, },
|
|
||||||
},
|
|
||||||
after = function(plug)
|
|
||||||
require("ibl").setup(plug.opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -58,4 +58,49 @@ return {
|
|||||||
require("pqf").setup()
|
require("pqf").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"virt-column.nvim",
|
||||||
|
lazy = false,
|
||||||
|
load = function() end,
|
||||||
|
opts = {
|
||||||
|
char = "▕",
|
||||||
|
},
|
||||||
|
after = function(plug)
|
||||||
|
require("virt-column").setup(plug.opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"indent-blankline.nvim",
|
||||||
|
lazy = false,
|
||||||
|
load = function() end,
|
||||||
|
event = { "BufReadPost", "BufWritePost", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
indent = {
|
||||||
|
char = "▏",
|
||||||
|
tab_char = "▏",
|
||||||
|
},
|
||||||
|
exclude = {
|
||||||
|
filetypes = {
|
||||||
|
"help",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"neo-tree",
|
||||||
|
"Trouble",
|
||||||
|
"lazy",
|
||||||
|
"lspinfo",
|
||||||
|
"packer",
|
||||||
|
"checkhealth",
|
||||||
|
"help",
|
||||||
|
"man",
|
||||||
|
"",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scope = { show_start = false, show_end = false, },
|
||||||
|
},
|
||||||
|
after = function(plug)
|
||||||
|
require("ibl").setup(plug.opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ vim.opt.listchars = {
|
|||||||
precedes = "◢",
|
precedes = "◢",
|
||||||
nbsp = "○",
|
nbsp = "○",
|
||||||
}
|
}
|
||||||
|
vim.opt.completeopt = { "menuone", "popup", "noinsert", "fuzzy" }
|
||||||
|
vim.opt.pumheight = 15
|
||||||
|
|
||||||
-- for all modes except terminal
|
-- for all modes except terminal
|
||||||
vim.keymap.set({ "i", "n", "o", "x", "v", "s", "l", "c" }, "<C-c>", "<esc>")
|
vim.keymap.set({ "i", "n", "o", "x", "v", "s", "l", "c" }, "<C-c>", "<esc>")
|
||||||
@@ -101,4 +103,6 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.cmd.colorscheme("catppuccin")
|
||||||
|
|
||||||
require("./lsp")
|
require("./lsp")
|
||||||
|
|||||||
Reference in New Issue
Block a user