From cd53e999f49fa6d57a8c11b96e3af29eccd59e42 Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Sat, 25 Jun 2022 11:57:54 -0400 Subject: [PATCH] Neovim Colors --- .../flavours/.config/flavours/config.toml | 8 ++++ .../templates/nvim/templates/config.yaml | 3 ++ .../templates/nvim/templates/default.mustache | 18 +++++++++ dotfiles/nvim/.config/nvim/init.vim | 2 - dotfiles/nvim/.config/nvim/lua/init.lua | 24 ++++++++++++ dotfiles/nvim/.config/nvim/lua/packages.lua | 1 + .../.config/nvim/plugin/packer_compiled.lua | 37 +++++++++++-------- 7 files changed, 75 insertions(+), 18 deletions(-) create mode 100644 dotfiles/flavours/.local/share/flavours/base16/templates/nvim/templates/config.yaml create mode 100644 dotfiles/flavours/.local/share/flavours/base16/templates/nvim/templates/default.mustache diff --git a/dotfiles/flavours/.config/flavours/config.toml b/dotfiles/flavours/.config/flavours/config.toml index 0b9c0dd..3220c30 100644 --- a/dotfiles/flavours/.config/flavours/config.toml +++ b/dotfiles/flavours/.config/flavours/config.toml @@ -48,3 +48,11 @@ hook = "pkill -USR1 -x sxhkd" # rewrite = true # hook = "" # # TODO: don't rewrite whole file probably + +[[items]] +file = "~/.config/nvim/lua/init.lua" +template = "nvim" +rewrite = false +start = "-- start flavours" +end = "-- end flavours" +hook = "echo 'loaded'" diff --git a/dotfiles/flavours/.local/share/flavours/base16/templates/nvim/templates/config.yaml b/dotfiles/flavours/.local/share/flavours/base16/templates/nvim/templates/config.yaml new file mode 100644 index 0000000..5efbdf0 --- /dev/null +++ b/dotfiles/flavours/.local/share/flavours/base16/templates/nvim/templates/config.yaml @@ -0,0 +1,3 @@ +default: + extension: .dunstrc + output: themes diff --git a/dotfiles/flavours/.local/share/flavours/base16/templates/nvim/templates/default.mustache b/dotfiles/flavours/.local/share/flavours/base16/templates/nvim/templates/default.mustache new file mode 100644 index 0000000..4d2e008 --- /dev/null +++ b/dotfiles/flavours/.local/share/flavours/base16/templates/nvim/templates/default.mustache @@ -0,0 +1,18 @@ +require('base16-colorscheme').setup({ + base00 = '#{{base01-hex}}', + base01 = '#{{base02-hex}}', + base02 = '#{{base03-hex}}', + base03 = '#{{base04-hex}}', + base04 = '#{{base05-hex}}', + base05 = '#{{base06-hex}}', + base06 = '#{{base07-hex}}', + base07 = '#{{base08-hex}}', + base08 = '#{{base09-hex}}', + base09 = '#{{base0A-hex}}', + base0A = '#{{base0B-hex}}', + base0B = '#{{base0C-hex}}', + base0C = '#{{base0D-hex}}', + base0D = '#{{base0E-hex}}', + base0E = '#{{base0F-hex}}', + base0F = '#{{base0G-hex}}' +}) diff --git a/dotfiles/nvim/.config/nvim/init.vim b/dotfiles/nvim/.config/nvim/init.vim index a1ea636..467a808 100644 --- a/dotfiles/nvim/.config/nvim/init.vim +++ b/dotfiles/nvim/.config/nvim/init.vim @@ -65,8 +65,6 @@ let g:bclose_no_plugin_maps=1 " }}} " appearance {{{ - let base16colorspace=256 - colorscheme base16-default-dark syntax on " Enable syntax set encoding=utf-8 " Keep utf-8 encoding set scrolloff=2 " Keep at least 3 lines above and below cursor diff --git a/dotfiles/nvim/.config/nvim/lua/init.lua b/dotfiles/nvim/.config/nvim/lua/init.lua index 162cb8f..55f4e7b 100644 --- a/dotfiles/nvim/.config/nvim/lua/init.lua +++ b/dotfiles/nvim/.config/nvim/lua/init.lua @@ -173,3 +173,27 @@ require("formatter").setup { -- note: this setting is global and should be set only once vim.o.updatetime = 250 vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] + + +-- Base16 colors + +-- start flavours +require('base16-colorscheme').setup({ + base00 = '#e7e6df', + base01 = '#929181', + base02 = '#878573', + base03 = '#6c6b5a', + base04 = '#5f5e4e', + base05 = '#302f27', + base06 = '#22221b', + base07 = '#ba6236', + base08 = '#ae7313', + base09 = '#a5980d', + base0A = '#7d9726', + base0B = '#5b9d48', + base0C = '#36a166', + base0D = '#5f9182', + base0E = '#9d6c7c', + base0F = '#{{base0G-hex}}' +}) +-- end flavours diff --git a/dotfiles/nvim/.config/nvim/lua/packages.lua b/dotfiles/nvim/.config/nvim/lua/packages.lua index 6954fd2..ffbc569 100644 --- a/dotfiles/nvim/.config/nvim/lua/packages.lua +++ b/dotfiles/nvim/.config/nvim/lua/packages.lua @@ -13,4 +13,5 @@ require('packer').startup(function() use 'saadparwaiz1/cmp_luasnip' use 'onsails/lspkind-nvim' use 'mhartington/formatter.nvim' + use 'RRethy/nvim-base16' end) diff --git a/dotfiles/nvim/.config/nvim/plugin/packer_compiled.lua b/dotfiles/nvim/.config/nvim/plugin/packer_compiled.lua index bbfb490..f9dfa28 100644 --- a/dotfiles/nvim/.config/nvim/plugin/packer_compiled.lua +++ b/dotfiles/nvim/.config/nvim/plugin/packer_compiled.lua @@ -44,8 +44,8 @@ local function save_profiles(threshold) end time([[Luarocks path setup]], true) -local package_path_str = "/Users/iankeane/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/iankeane/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/iankeane/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/iankeane/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/Users/iankeane/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +local package_path_str = "/home/green/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/green/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/green/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/green/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/green/.cache/nvim/packer_hererocks/2.0.5/lib/lua/5.1/?.so" if not string.find(package.path, package_path_str, 1, true) then package.path = package.path .. ';' .. package_path_str end @@ -71,72 +71,77 @@ time([[Defining packer_plugins]], true) _G.packer_plugins = { LuaSnip = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/LuaSnip", + path = "/home/green/.local/share/nvim/site/pack/packer/start/LuaSnip", url = "https://github.com/L3MON4D3/LuaSnip" }, ["cmp-buffer"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/cmp-buffer", + path = "/home/green/.local/share/nvim/site/pack/packer/start/cmp-buffer", url = "https://github.com/hrsh7th/cmp-buffer" }, ["cmp-cmdline"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/cmp-cmdline", + path = "/home/green/.local/share/nvim/site/pack/packer/start/cmp-cmdline", url = "https://github.com/hrsh7th/cmp-cmdline" }, ["cmp-nvim-lsp"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + path = "/home/green/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, ["cmp-path"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/cmp-path", + path = "/home/green/.local/share/nvim/site/pack/packer/start/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, cmp_luasnip = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + path = "/home/green/.local/share/nvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, ["formatter.nvim"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/formatter.nvim", + path = "/home/green/.local/share/nvim/site/pack/packer/start/formatter.nvim", url = "https://github.com/mhartington/formatter.nvim" }, ["friendly-snippets"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/friendly-snippets", + path = "/home/green/.local/share/nvim/site/pack/packer/start/friendly-snippets", url = "https://github.com/rafamadriz/friendly-snippets" }, ["lspkind-nvim"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/lspkind-nvim", + path = "/home/green/.local/share/nvim/site/pack/packer/start/lspkind-nvim", url = "https://github.com/onsails/lspkind-nvim" }, + ["nvim-base16"] = { + loaded = true, + path = "/home/green/.local/share/nvim/site/pack/packer/start/nvim-base16", + url = "https://github.com/RRethy/nvim-base16" + }, ["nvim-cmp"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/nvim-cmp", + path = "/home/green/.local/share/nvim/site/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, ["nvim-lsp-installer"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", + path = "/home/green/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", url = "https://github.com/williamboman/nvim-lsp-installer" }, ["nvim-lspconfig"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + path = "/home/green/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, ["nvim-treesitter"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + path = "/home/green/.local/share/nvim/site/pack/packer/start/nvim-treesitter", url = "https://github.com/nvim-treesitter/nvim-treesitter" }, ["packer.nvim"] = { loaded = true, - path = "/Users/iankeane/.local/share/nvim/site/pack/packer/start/packer.nvim", + path = "/home/green/.local/share/nvim/site/pack/packer/start/packer.nvim", url = "https://github.com/wbthomason/packer.nvim" } }