change things to use tinty theme
This commit is contained in:
parent
9873905af2
commit
db5afcc9d9
8 changed files with 120 additions and 37 deletions
43
init.lua
43
init.lua
|
|
@ -1,4 +1,45 @@
|
|||
local opt = vim.opt
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
opt.cursorline = true
|
||||
opt.termguicolors = true
|
||||
opt.winborder = "single"
|
||||
opt.signcolumn = "yes"
|
||||
vim.lsp.inlay_hint.enable = true
|
||||
opt.tabstop = 8
|
||||
vim.opt.expandtab = true
|
||||
|
||||
opt.shiftwidth = 8
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
spacing = 2,
|
||||
source = true,
|
||||
},
|
||||
})
|
||||
require("config.options")
|
||||
require("config.lazy")
|
||||
require("config.keymaps")
|
||||
vim.cmd.colorscheme("base16-catppuccin-mocha")
|
||||
local theme_script_path = vim.fn.expand("~/.local/share/tinted-theming/tinty/base16-vim-colors-file.vim")
|
||||
|
||||
local function file_exists(file_path)
|
||||
return vim.fn.filereadable(file_path) == 1 and true or false
|
||||
end
|
||||
|
||||
local function handle_focus_gained()
|
||||
if file_exists(theme_script_path) then
|
||||
vim.cmd("source " .. theme_script_path)
|
||||
end
|
||||
end
|
||||
|
||||
if file_exists(theme_script_path) then
|
||||
vim.o.termguicolors = true
|
||||
vim.g.tinted_colorspace = 256
|
||||
|
||||
vim.cmd("source " .. theme_script_path)
|
||||
|
||||
vim.api.nvim_create_autocmd("FocusGained", {
|
||||
callback = handle_focus_gained,
|
||||
})
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue