redo some code

This commit is contained in:
slezakIT 2024-04-12 21:37:12 +02:00
parent d827e7bd83
commit 491ba00fd2
6 changed files with 166 additions and 15 deletions

View file

@ -7,6 +7,11 @@ return {
},
init = function()
vim.g.barbar_auto_setup = false
-- Barbar Plugin
vim.keymap.set('n', '<leader>tn', '<Cmd>BufferNext<CR>', { desc = '[N]ext Tab' })
vim.keymap.set('n', '<leader>tp', '<Cmd>BufferPrevious<CR>', { desc = '[P]revious Tab' })
vim.keymap.set('n', '<C-q>', '<Cmd>BufferClose<CR>')
vim.keymap.set('n', '<C-p>', '<Cmd>BufferPick<CR>')
end,
opts = {
-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:

View file

@ -6,6 +6,11 @@ return {
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
},
init = function()
-- Neotree:
vim.keymap.set('n', '<leader>nt', '<Cmd>Neotree toggle<CR>', { desc = '[N]eo[t]ree toggle' })
vim.keymap.set('n', '<leader>ntr', '<Cmd>Neotree reveal<CR>', { desc = 'N[E]eo[t]ree toggle cu[r]rent' })
end,
config = function()
require('neo-tree').setup {
filesystem = {

View file

@ -1,5 +1,149 @@
return {
'petertriho/nvim-scrollbar',
version = '*',
config = true,
config = {
show = true,
show_in_active_only = false,
set_highlights = true,
folds = 1000, -- handle folds, set to number to disable folds if no. of lines in buffer exceeds this
max_lines = false, -- disables if no. of lines in buffer exceeds this
hide_if_all_visible = true, -- Hides everything if all lines are visible
throttle_ms = 100,
handle = {
text = ' ',
blend = 30, -- Integer between 0 and 100. 0 for fully opaque and 100 to full transparent. Defaults to 30.
color = nil,
color_nr = nil, -- cterm
highlight = 'CursorColumn',
hide_if_all_visible = true, -- Hides handle if all lines are visible
},
marks = {
Cursor = {
text = '',
priority = 0,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'Normal',
},
Search = {
text = { '-', '=' },
priority = 1,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'Search',
},
Error = {
text = { '-', '=' },
priority = 2,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'DiagnosticVirtualTextError',
},
Warn = {
text = { '-', '=' },
priority = 3,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'DiagnosticVirtualTextWarn',
},
Info = {
text = { '-', '=' },
priority = 4,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'DiagnosticVirtualTextInfo',
},
Hint = {
text = { '-', '=' },
priority = 5,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'DiagnosticVirtualTextHint',
},
Misc = {
text = { '-', '=' },
priority = 6,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'Normal',
},
GitAdd = {
text = '',
priority = 7,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'GitSignsAdd',
},
GitChange = {
text = '',
priority = 7,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'GitSignsChange',
},
GitDelete = {
text = '',
priority = 7,
gui = nil,
color = nil,
cterm = nil,
color_nr = nil, -- cterm
highlight = 'GitSignsDelete',
},
},
excluded_buftypes = {
'terminal',
},
excluded_filetypes = {
'cmp_docs',
'cmp_menu',
'noice',
'prompt',
'TelescopePrompt',
},
autocmd = {
render = {
'BufWinEnter',
'TabEnter',
'TermEnter',
'WinEnter',
'CmdwinLeave',
'TextChanged',
'VimResized',
'WinScrolled',
},
clear = {
'BufWinLeave',
'TabLeave',
'TermLeave',
'WinLeave',
},
},
handlers = {
cursor = false,
diagnostic = true,
gitsigns = false, -- Requires gitsigns
handle = true,
search = false, -- Requires hlslens
ale = false, -- Requires ALE
},
},
}

View file

@ -1 +1,11 @@
return { 'akinsho/toggleterm.nvim', version = '*', config = true }
return {
'akinsho/toggleterm.nvim',
version = '*',
init = function()
-- Toggleterm Plugin
vim.keymap.set('n', '<leader>t', '<Cmd>1ToggleTerm name="floater" direction="float"<CR>', { desc = '[T]oggle [T]erminal' })
vim.keymap.set('n', '<leader>tt', '<Cmd>2ToggleTerm name="horizont" direction="horizontal"<CR>', { desc = '[T]oggle [T]erminal' })
vim.keymap.set('n', '<leader>tl', '<Cmd>TermSelect<CR>', { desc = '[T]oggle [T]erminal' })
end,
config = true,
}