nvim/lua/plugins/ui.lua

97 lines
2.0 KiB
Lua

local default_theme = "base16-oceanicnext"
local function get_tinty_theme()
local theme_name = vim.fn.system("tinty -d /home/lucy/.local/share/tinted-theming/tinty/ current &> /dev/null && tinty -d /home/lucy/.local/share/tinted-theming/tinty/ current")
if vim.v.shell_error ~= 0 then
return default_theme
else
return vim.trim(theme_name)
end
end
local function handle_focus_gained()
local new_theme_name = get_tinty_theme()
local current_theme_name = vim.g.colors_name
if current_theme_name ~= new_theme_name then
vim.cmd("colorscheme " .. new_theme_name)
end
end
local function main()
vim.o.termguicolors = true
vim.g.tinted_colorspace = 256
local current_theme_name = get_tinty_theme()
vim.cmd("colorscheme " .. current_theme_name)
vim.api.nvim_create_autocmd("FocusGained", {
callback = handle_focus_gained,
})
end
return {
{
"nvim-tree/nvim-tree.lua",
version = "*",
lazy = false,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
opts = {},
},
{
"RRethy/base16-nvim",
lazy = false,
init = function()
main()
end,
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons", "RRethy/base16-nvim" },
opts = {
options = {
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
},
sections = {
lualine_a = { "mode" },
lualine_b = { "diagnostics" },
lualine_c = { "filename", "branch", "navic" },
lualine_x = { "lsp_status", "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
},
},
{
"nvimdev/lspsaga.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter", -- for syntax highlighting inside the popup
"nvim-tree/nvim-web-devicons", -- for pretty icons
},
opts = {
ui = {
border = "rounded",
},
symbol_in_winbar = { enable = true },
lightbulb = {
enable = true,
sign = false,
},
hover = {
max_width = 0.6,
open_link = "gx",
open_browser = "!google-chrome",
},
},
},
{
"akinsho/bufferline.nvim",
opts = {},
},
}