add hot reloading of lua line when switching theme
This commit is contained in:
parent
4c830de928
commit
56e7410d61
3 changed files with 11 additions and 4 deletions
4
init.lua
4
init.lua
|
|
@ -25,7 +25,7 @@ require("config.keymaps")
|
|||
local default_theme = "base16-oceanicnext"
|
||||
|
||||
local function get_tinty_theme()
|
||||
local theme_name = vim.fn.system("cat ~/.local/share/tinted-theming/tinty/current_scheme")
|
||||
local theme_name = vim.fn.system("cat ~/.local/share/tinted-theming/tinty/current_scheme")
|
||||
|
||||
if vim.v.shell_error ~= 0 then
|
||||
return default_theme
|
||||
|
|
@ -40,7 +40,9 @@ local function handle_focus_gained()
|
|||
|
||||
if current_theme_name ~= new_theme_name then
|
||||
vim.cmd("colorscheme " .. new_theme_name)
|
||||
require("lualine").setup()
|
||||
end
|
||||
require("lualine").setup()
|
||||
end
|
||||
|
||||
local function main()
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "38499e0bda64bc0f3ec6e7f03f8e13dd11c0fa00" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "1a6d69206749a646ef28bfb39460610b14baff40" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "6620ae1c44dfa8623b22d0cbf873a9e8d073b849" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "97774019cb17697f35872b28bc020a72b4ca1b51" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "f059649bc39ab39d55f2a165db752c956897d4fd" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
||||
"tinted-vim": { "branch": "main", "commit": "19b03f63f58ffc63aa8e26159a370d6514735581" }
|
||||
|
|
|
|||
|
|
@ -43,11 +43,16 @@ return {
|
|||
},
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = { install_dir = vim.fn.stdpath("data") .. "/site" },
|
||||
lazy = false,
|
||||
build = ":TSUpdate",
|
||||
},
|
||||
{
|
||||
"nvimdev/lspsaga.nvim",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter", -- for syntax highlighting inside the popup
|
||||
"nvim-tree/nvim-web-devicons", -- for pretty icons
|
||||
},
|
||||
opts = {
|
||||
symbol_in_winbar = { enable = true },
|
||||
|
|
|
|||
Loading…
Reference in a new issue