From 5e301285492d3e4611accc2cde9b9850c567bf2e Mon Sep 17 00:00:00 2001 From: servostar Date: Tue, 21 May 2024 23:32:07 +0200 Subject: [PATCH] added toggleterm --- lua/plugins/lualine.lua | 70 ++++++++++++++++++++++++++++++----------- lua/plugins/term.lua | 15 +++++++++ 2 files changed, 66 insertions(+), 19 deletions(-) create mode 100644 lua/plugins/term.lua diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index cfccf16..fd8e3f4 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -43,6 +43,39 @@ return { }, }, lualine_c = { + { + function() + return '  ' + end, + padding = 0, + on_click = function() + vim.defer_fn(function() + vim.cmd("ToggleTerm direction=horizontal") + end, 100) + end + }, + { + function() + return ' 󰒲 ' + end, + padding = 0, + on_click = function() + vim.defer_fn(function() + vim.cmd("Lazy") + end, 100) + end + }, + { + function() + return '  ' + end, + padding = 0, + on_click = function() + vim.defer_fn(function() + vim.cmd("Mason") + end, 100) + end + }, { "branch", icon = "󰊤", @@ -65,6 +98,24 @@ return { end, 100) end, }, + { + "diagnostics", + symbols = { + error = options.lsp.icons.Error, + warn = options.lsp.icons.Warn, + info = options.lsp.icons.Info, + hint = options.lsp.icons.Hint, + }, + sources = { + "nvim_diagnostic", + }, + update_in_insert = true, + on_click = function() + vim.defer_fn(function() + vim.cmd("TroubleToggle") + end, 100) + end, + } }, lualine_x = { { @@ -79,25 +130,6 @@ return { end, color = "lualine_c_inactive", }, - { - "diagnostics", - symbols = { - error = options.lsp.icons.Error, - warn = options.lsp.icons.Warn, - info = options.lsp.icons.Info, - hint = options.lsp.icons.Hint, - }, - sources = { - "nvim_diagnostic", - }, - always_visible = true, - update_in_insert = true, - on_click = function() - vim.defer_fn(function() - vim.cmd("TroubleToggle") - end, 100) - end, - }, { "filetype", colored = true, diff --git a/lua/plugins/term.lua b/lua/plugins/term.lua new file mode 100644 index 0000000..e3beb3a --- /dev/null +++ b/lua/plugins/term.lua @@ -0,0 +1,15 @@ +return { + { + "akinsho/toggleterm.nvim", + version = "*", + opts = { + hide_numbers = true, + shade_terminals = true, + float_opts = { + border = "single", + winblend = 0 + }, + start_in_insert = true, + } + } +}