mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33: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
|
|
@ -25,24 +25,24 @@ return {
|
|||
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||
},
|
||||
{ import = "plugins.mod.hover-nvim" },
|
||||
{
|
||||
"kdheepak/lazygit.nvim",
|
||||
lazy = true,
|
||||
cmd = {
|
||||
"LazyGit",
|
||||
"LazyGitConfig",
|
||||
"LazyGitCurrentFile",
|
||||
"LazyGitFilter",
|
||||
"LazyGitFilterCurrentFile",
|
||||
},
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||
-- order to load the plugin when the command is run for the first time
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "kdheepak/lazygit.nvim",
|
||||
-- lazy = true,
|
||||
-- cmd = {
|
||||
-- "LazyGit",
|
||||
-- "LazyGitConfig",
|
||||
-- "LazyGitCurrentFile",
|
||||
-- "LazyGitFilter",
|
||||
-- "LazyGitFilterCurrentFile",
|
||||
-- },
|
||||
-- -- optional for floating window border decoration
|
||||
-- dependencies = {
|
||||
-- "nvim-lua/plenary.nvim",
|
||||
-- },
|
||||
-- -- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||
-- -- order to load the plugin when the command is run for the first time
|
||||
-- keys = {
|
||||
-- { "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,6 @@
|
|||
return {
|
||||
{ "wakatime/vim-wakatime", lazy = false },
|
||||
{
|
||||
"voldikss/vim-floaterm",
|
||||
keys = {
|
||||
{ "<leader>!", ":FloatermToggle<CR>", desc = "Toggle Terminal" },
|
||||
{ "<leader>tt", ":FloatermToggle<CR>", desc = "Toggle Terminal" },
|
||||
{ "<leader>fT", ":FloatermNew<CR>", desc = "Spawn a float terminal" },
|
||||
},
|
||||
cmd = {
|
||||
"FloatermToggle",
|
||||
"FloatermNew",
|
||||
},
|
||||
},
|
||||
{ "wakatime/vim-wakatime", lazy = false },
|
||||
{ import = "plugins.mod.toggleterm" },
|
||||
{
|
||||
"CRAG666/code_runner.nvim",
|
||||
config = true,
|
||||
|
|
|
|||
|
|
@ -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