nvim: Switch to mini base16 plugin

Since we already have the mini library installed in our setup, we don't
need to make use of external base16 plugins. It provides the same exact
functionality, and seems slim and bug-free. Nothing changes for the
user, but we have 1 plugin less to take care of (and it was
mis-behaving in new versions anyway).

Also set lualine to be reloaded on theme switch so it takes on the
colorscheme as well.
This commit is contained in:
Marty Oehme 2024-02-10 13:27:37 +01:00
parent fbceea242d
commit cf153808a2
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
3 changed files with 40 additions and 43 deletions

View file

@ -7,23 +7,26 @@
-- by RRethy (https://github.com/RRethy/nvim-base16)
-- {{scheme-name}} scheme by {{scheme-author}}
require('base16-colorscheme').setup({
base00 = '#{{base00-hex}}',
base01 = '#{{base01-hex}}',
base02 = '#{{base02-hex}}',
base03 = '#{{base03-hex}}',
base04 = '#{{base04-hex}}',
base05 = '#{{base05-hex}}',
base06 = '#{{base06-hex}}',
base07 = '#{{base07-hex}}',
base08 = '#{{base08-hex}}',
base09 = '#{{base09-hex}}',
base0A = '#{{base0A-hex}}',
base0B = '#{{base0B-hex}}',
base0C = '#{{base0C-hex}}',
base0D = '#{{base0D-hex}}',
base0E = '#{{base0E-hex}}',
base0F = '#{{base0F-hex}}'
require('mini.base16').setup({
palette = {
base00 = '#{{base00-hex}}',
base01 = '#{{base01-hex}}',
base02 = '#{{base02-hex}}',
base03 = '#{{base03-hex}}',
base04 = '#{{base04-hex}}',
base05 = '#{{base05-hex}}',
base06 = '#{{base06-hex}}',
base07 = '#{{base07-hex}}',
base08 = '#{{base08-hex}}',
base09 = '#{{base09-hex}}',
base0A = '#{{base0A-hex}}',
base0B = '#{{base0B-hex}}',
base0C = '#{{base0C-hex}}',
base0D = '#{{base0D-hex}}',
base0E = '#{{base0E-hex}}',
base0F = '#{{base0F-hex}}'
},
})
require('lualine').setup()
-- vim: filetype=lua

View file

@ -1,3 +1,20 @@
local colorsfile = vim.fn.stdpath("state") .. "/colorscheme.lua"
local function source_colors()
if vim.fn.filereadable(colorsfile) == 1 then
vim.cmd("source " .. colorsfile)
end
end
-- set on startup
source_colors()
-- continuously watch colors file for changes
local fwatch = require("fwatch")
fwatch.watch(colorsfile, {
on_event = vim.schedule_wrap(function()
source_colors()
end),
})
require("mini.ai").setup()
require("mini.comment").setup({
hooks = {
@ -8,11 +25,13 @@ require("mini.comment").setup({
})
require("mini.cursorword").setup({ delay = 500 })
require("mini.fuzzy").setup()
require("mini.indentscope").setup({
symbol = "",
draw = { animation = require("mini.indentscope").gen_animation.none() },
options = { indent_at_cursor = false },
})
require("mini.map").setup()
require("mini.move").setup() -- has not hit stable yet
require("mini.pairs").setup()

View file

@ -57,6 +57,7 @@ return {
{
"echasnovski/mini.nvim",
version = "*",
dependencies = { "rktjmp/fwatch.nvim" },
config = function()
require("plugins.config.mini")
end,
@ -86,32 +87,6 @@ return {
{ "<leader>sP", ":Pythonterm!<cr>" },
},
},
-- colorschemes
{
"RRethy/nvim-base16",
lazy = false,
commit = "96e3089",
priority = 1000,
dependencies = { "rktjmp/fwatch.nvim" },
config = function()
local colorsfile = vim.fn.stdpath("state") .. "/colorscheme.lua"
local function source_colors()
if vim.fn.filereadable(colorsfile) == 1 then
vim.cmd("source " .. colorsfile)
end
end
-- set on startup
source_colors()
-- continuously watch colors file for changes
local fwatch = require("fwatch")
fwatch.watch(colorsfile, {
on_event = vim.schedule_wrap(function()
source_colors()
end),
})
end,
},
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
{ "stevearc/stickybuf.nvim", config = true },
-- make it a little less painful to open really big (>2mb) files by disabling features