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
|
|
@ -25,24 +25,24 @@ return {
|
||||||
dependencies = { "nvim-telescope/telescope.nvim" },
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
},
|
},
|
||||||
{ import = "plugins.mod.hover-nvim" },
|
{ import = "plugins.mod.hover-nvim" },
|
||||||
{
|
-- {
|
||||||
"kdheepak/lazygit.nvim",
|
-- "kdheepak/lazygit.nvim",
|
||||||
lazy = true,
|
-- lazy = true,
|
||||||
cmd = {
|
-- cmd = {
|
||||||
"LazyGit",
|
-- "LazyGit",
|
||||||
"LazyGitConfig",
|
-- "LazyGitConfig",
|
||||||
"LazyGitCurrentFile",
|
-- "LazyGitCurrentFile",
|
||||||
"LazyGitFilter",
|
-- "LazyGitFilter",
|
||||||
"LazyGitFilterCurrentFile",
|
-- "LazyGitFilterCurrentFile",
|
||||||
},
|
-- },
|
||||||
-- optional for floating window border decoration
|
-- -- optional for floating window border decoration
|
||||||
dependencies = {
|
-- dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
-- "nvim-lua/plenary.nvim",
|
||||||
},
|
-- },
|
||||||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
-- -- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||||
-- order to load the plugin when the command is run for the first time
|
-- -- order to load the plugin when the command is run for the first time
|
||||||
keys = {
|
-- keys = {
|
||||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
-- { "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{ "wakatime/vim-wakatime", lazy = false },
|
{ "wakatime/vim-wakatime", lazy = false },
|
||||||
{
|
{ import = "plugins.mod.toggleterm" },
|
||||||
"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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"CRAG666/code_runner.nvim",
|
"CRAG666/code_runner.nvim",
|
||||||
config = true,
|
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 {
|
return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
dependencies = "nvim-tree/nvim-web-devicons", -- 图标支持
|
dependencies = "nvim-tree/nvim-web-devicons", -- 图标支持
|
||||||
|
|
@ -42,6 +50,6 @@ return {
|
||||||
},
|
},
|
||||||
separator_style = "thin",
|
separator_style = "thin",
|
||||||
},
|
},
|
||||||
highlights = require("catppuccin.groups.integrations.bufferline").get(),
|
highlights = get_highlight(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ local config = {
|
||||||
-- Disable sections and component separators
|
-- Disable sections and component separators
|
||||||
component_separators = { left = "", right = "" },
|
component_separators = { left = "", right = "" },
|
||||||
section_separators = { left = "", right = "" },
|
section_separators = { left = "", right = "" },
|
||||||
theme = "catppuccin",
|
-- theme = "catppuccin",
|
||||||
|
theme = vim.g.colors_name,
|
||||||
-- IDE-like Global Status
|
-- IDE-like Global Status
|
||||||
globalstaus = true,
|
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