mirror of
https://github.com/kossLAN/nvim-flake.git
synced 2025-11-05 02:09:49 -05:00
nvim/base16: init
This commit is contained in:
parent
4ce90e54b1
commit
8da6a29bda
3 changed files with 48 additions and 9 deletions
|
|
@ -4,10 +4,9 @@ with final.pkgs.lib; let
|
||||||
pkgs = final;
|
pkgs = final;
|
||||||
|
|
||||||
# Use this to create a plugin from a flake input
|
# Use this to create a plugin from a flake input
|
||||||
mkNvimPlugin = src: pname:
|
mkNvimPlugin = pname: version: src:
|
||||||
pkgs.vimUtils.buildVimPlugin {
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
inherit pname src;
|
inherit pname version src;
|
||||||
version = src.lastModifiedDate;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Make sure we use the pinned nixpkgs instance for wrapNeovimUnstable,
|
# Make sure we use the pinned nixpkgs instance for wrapNeovimUnstable,
|
||||||
|
|
@ -82,8 +81,6 @@ with final.pkgs.lib; let
|
||||||
which-key-nvim
|
which-key-nvim
|
||||||
# Autoformatting
|
# Autoformatting
|
||||||
conform-nvim
|
conform-nvim
|
||||||
# Theme for neovim
|
|
||||||
catppuccin-nvim
|
|
||||||
# QOL Plugin for visuals mostly
|
# QOL Plugin for visuals mostly
|
||||||
mini-nvim # https://github.com/echasnovski/mini.nvim/
|
mini-nvim # https://github.com/echasnovski/mini.nvim/
|
||||||
# Debugging
|
# Debugging
|
||||||
|
|
@ -96,6 +93,7 @@ with final.pkgs.lib; let
|
||||||
fidget-nvim
|
fidget-nvim
|
||||||
# Color Highlights
|
# Color Highlights
|
||||||
nvim-highlight-colors
|
nvim-highlight-colors
|
||||||
|
base16-nvim
|
||||||
];
|
];
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -108,8 +108,8 @@ cmd.packadd('cfilter') -- Allows filtering the quickfix list with :cfdo
|
||||||
vim.g.sqlite_clib_path = require('luv').os_getenv('LIBSQLITE')
|
vim.g.sqlite_clib_path = require('luv').os_getenv('LIBSQLITE')
|
||||||
|
|
||||||
-- Vim Theme
|
-- Vim Theme
|
||||||
require('catppuccin').setup {
|
-- require('catppuccin').setup {
|
||||||
flavour = 'macchiato',
|
-- flavour = 'macchiato',
|
||||||
}
|
-- }
|
||||||
|
|
||||||
vim.cmd.colorscheme('catppuccin')
|
-- vim.cmd.colorscheme('lushwal')
|
||||||
|
|
|
||||||
41
nvim/plugin/base16.lua
Normal file
41
nvim/plugin/base16.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
local colors_file = io.open(os.getenv('HOME') .. '/.cache/mutagen/colors.json', 'r')
|
||||||
|
if not colors_file then
|
||||||
|
vim.notify('Mutagen colors file not found', vim.log.levels.ERROR)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local content = colors_file:read('*all')
|
||||||
|
colors_file:close()
|
||||||
|
|
||||||
|
local ok, colors_data = pcall(vim.fn.json_decode, content)
|
||||||
|
if not ok then
|
||||||
|
vim.notify('Failed to parse Mutagen colors JSON: ' .. tostring(colors_data), vim.log.levels.ERROR)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local colors = colors_data.colors
|
||||||
|
if not colors then
|
||||||
|
vim.notify('No colors found in Mutagen JSON', vim.log.levels.ERROR)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local base16_colors = {
|
||||||
|
base00 = colors.base00,
|
||||||
|
base01 = colors.base01,
|
||||||
|
base02 = colors.base02,
|
||||||
|
base03 = colors.base03,
|
||||||
|
base04 = colors.base04,
|
||||||
|
base05 = colors.base05,
|
||||||
|
base06 = colors.base06,
|
||||||
|
base07 = colors.base07,
|
||||||
|
base08 = colors.base08,
|
||||||
|
base09 = colors.base09,
|
||||||
|
base0A = colors.base0A,
|
||||||
|
base0B = colors.base0B,
|
||||||
|
base0C = colors.base0C,
|
||||||
|
base0D = colors.base0D,
|
||||||
|
base0E = colors.base0E,
|
||||||
|
base0F = colors.base0F,
|
||||||
|
}
|
||||||
|
|
||||||
|
require('base16-colorscheme').setup(base16_colors)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue