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:
parent
fbceea242d
commit
cf153808a2
3 changed files with 40 additions and 43 deletions
|
@ -7,7 +7,8 @@
|
||||||
-- by RRethy (https://github.com/RRethy/nvim-base16)
|
-- by RRethy (https://github.com/RRethy/nvim-base16)
|
||||||
-- {{scheme-name}} scheme by {{scheme-author}}
|
-- {{scheme-name}} scheme by {{scheme-author}}
|
||||||
|
|
||||||
require('base16-colorscheme').setup({
|
require('mini.base16').setup({
|
||||||
|
palette = {
|
||||||
base00 = '#{{base00-hex}}',
|
base00 = '#{{base00-hex}}',
|
||||||
base01 = '#{{base01-hex}}',
|
base01 = '#{{base01-hex}}',
|
||||||
base02 = '#{{base02-hex}}',
|
base02 = '#{{base02-hex}}',
|
||||||
|
@ -24,6 +25,8 @@ require('base16-colorscheme').setup({
|
||||||
base0D = '#{{base0D-hex}}',
|
base0D = '#{{base0D-hex}}',
|
||||||
base0E = '#{{base0E-hex}}',
|
base0E = '#{{base0E-hex}}',
|
||||||
base0F = '#{{base0F-hex}}'
|
base0F = '#{{base0F-hex}}'
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
require('lualine').setup()
|
||||||
|
|
||||||
-- vim: filetype=lua
|
-- vim: filetype=lua
|
||||||
|
|
|
@ -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.ai").setup()
|
||||||
require("mini.comment").setup({
|
require("mini.comment").setup({
|
||||||
hooks = {
|
hooks = {
|
||||||
|
@ -8,11 +25,13 @@ require("mini.comment").setup({
|
||||||
})
|
})
|
||||||
require("mini.cursorword").setup({ delay = 500 })
|
require("mini.cursorword").setup({ delay = 500 })
|
||||||
require("mini.fuzzy").setup()
|
require("mini.fuzzy").setup()
|
||||||
|
|
||||||
require("mini.indentscope").setup({
|
require("mini.indentscope").setup({
|
||||||
symbol = "│",
|
symbol = "│",
|
||||||
draw = { animation = require("mini.indentscope").gen_animation.none() },
|
draw = { animation = require("mini.indentscope").gen_animation.none() },
|
||||||
options = { indent_at_cursor = false },
|
options = { indent_at_cursor = false },
|
||||||
})
|
})
|
||||||
|
|
||||||
require("mini.map").setup()
|
require("mini.map").setup()
|
||||||
require("mini.move").setup() -- has not hit stable yet
|
require("mini.move").setup() -- has not hit stable yet
|
||||||
require("mini.pairs").setup()
|
require("mini.pairs").setup()
|
||||||
|
|
|
@ -57,6 +57,7 @@ return {
|
||||||
{
|
{
|
||||||
"echasnovski/mini.nvim",
|
"echasnovski/mini.nvim",
|
||||||
version = "*",
|
version = "*",
|
||||||
|
dependencies = { "rktjmp/fwatch.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.config.mini")
|
require("plugins.config.mini")
|
||||||
end,
|
end,
|
||||||
|
@ -86,32 +87,6 @@ return {
|
||||||
{ "<leader>sP", ":Pythonterm!<cr>" },
|
{ "<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, ..
|
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
|
||||||
{ "stevearc/stickybuf.nvim", config = true },
|
{ "stevearc/stickybuf.nvim", config = true },
|
||||||
-- make it a little less painful to open really big (>2mb) files by disabling features
|
-- make it a little less painful to open really big (>2mb) files by disabling features
|
||||||
|
|
Loading…
Reference in a new issue