mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(nvim): Use toggleterm instead of floaterm
* Light scheme to rose-pine
This commit is contained in:
parent
59cd198cfc
commit
5684ceaf0c
5 changed files with 66 additions and 35 deletions
|
|
@ -1,3 +1,11 @@
|
|||
local function get_highlight()
|
||||
if vim.g.colors_name == "catppuccin" then
|
||||
return require("catppuccin.groups.integrations.bufferline").get()
|
||||
elseif vim.g.colors_name == "rose-pine" then
|
||||
return require("rose-pine.plugins.bufferline")
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons", -- 图标支持
|
||||
|
|
@ -42,6 +50,6 @@ return {
|
|||
},
|
||||
separator_style = "thin",
|
||||
},
|
||||
highlights = require("catppuccin.groups.integrations.bufferline").get(),
|
||||
highlights = get_highlight(),
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ local config = {
|
|||
-- Disable sections and component separators
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
theme = "catppuccin",
|
||||
-- theme = "catppuccin",
|
||||
theme = vim.g.colors_name,
|
||||
-- IDE-like Global Status
|
||||
globalstaus = true,
|
||||
},
|
||||
|
|
|
|||
33
tools/nvim/lua/plugins/mod/toggleterm.lua
Normal file
33
tools/nvim/lua/plugins/mod/toggleterm.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
local function get_highlight()
|
||||
if vim.g.colors_name == "catppuccin" then
|
||||
-- NOTE: This won't work since no integration is available
|
||||
return require("catppuccin.groups.integrations.bufferline").get()
|
||||
-- return require("rose-pine.plugins.toggleterm")
|
||||
elseif vim.g.colors_name == "rose-pine" then
|
||||
return require("rose-pine.plugins.toggleterm")
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
"akinsho/toggleterm.nvim",
|
||||
keys = {
|
||||
{ "<leader>!", "<cmd>ToggleTerm direction=float<CR>", desc = "Toggle Terminal" },
|
||||
{ "<leader>tf", "<cmd>ToggleTerm direction=float<CR>", desc = "Toggle Terminal" },
|
||||
{ "<leader>tt", "<cmd>ToggleTerm<CR>", desc = "Spawn a float terminal" },
|
||||
-- TODO: Implement lazygit
|
||||
-- {
|
||||
-- "<leader>gg",
|
||||
-- "<cmd>lua _lazygit_toggle()<CR>",
|
||||
-- -- require("toggleterm.terminal").Terminal:new({ cmd = "lazygit", hidden = true }),
|
||||
-- desc = "Toggle LazyGit",
|
||||
-- },
|
||||
},
|
||||
event = "ColorScheme",
|
||||
opts = {
|
||||
highlights = get_highlight(),
|
||||
},
|
||||
cmd = {
|
||||
"ToggleTerm",
|
||||
"LazyGit",
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue