Merge remote-tracking branch 'origin'
This commit is contained in:
@@ -17,6 +17,36 @@ autocmd({ "BufReadPost" }, {
|
||||
end,
|
||||
})
|
||||
|
||||
autocmd('FileType', {
|
||||
callback = function(tbl)
|
||||
local set_offset = require('bufferline.api').set_offset
|
||||
|
||||
local bufwinid
|
||||
local last_width
|
||||
local _autocmd = vim.api.nvim_create_autocmd('WinScrolled', {
|
||||
callback = function()
|
||||
bufwinid = bufwinid or vim.fn.bufwinid(tbl.buf)
|
||||
|
||||
local width = vim.api.nvim_win_get_width(bufwinid)
|
||||
if width ~= last_width then
|
||||
set_offset(width, '')
|
||||
last_width = width
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('BufWipeout', {
|
||||
buffer = tbl.buf,
|
||||
callback = function()
|
||||
vim.api.nvim_del_autocmd(_autocmd)
|
||||
set_offset(0)
|
||||
end,
|
||||
once = true,
|
||||
})
|
||||
end,
|
||||
pattern = 'neo-tree', -- or any other filetree's `ft`
|
||||
})
|
||||
|
||||
local save_fold = augroup("Persistent Folds", { clear = true })
|
||||
autocmd({ "BufWinLeave" }, {
|
||||
pattern = "*.*",
|
||||
|
@@ -37,6 +37,21 @@ map("n", "<Leader>wq", ":wqall!<CR>", opts)
|
||||
map("n", "<Leader>li", ":LspInfo<CR>", opts)
|
||||
map("n", "<Leader>lr", ":LspRestart<CR>", opts)
|
||||
|
||||
-- barbar.nvim
|
||||
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
|
||||
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
|
||||
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
|
||||
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
|
||||
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
|
||||
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
|
||||
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
|
||||
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
|
||||
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
|
||||
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
|
||||
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
|
||||
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
|
||||
map('n', '<A-w>', '<Cmd>BufferClose<CR>', opts)
|
||||
|
||||
-- This is my [i]nspect section,
|
||||
map("n", "<Leader>is", ":SymbolsOutline<cr>", opts) -- [i]nspect [s]ymbols
|
||||
map("n", "<Leader>ic", ":ColorizerToggle<CR>", opts) -- [i]nspect [c]olors
|
||||
|
@@ -98,6 +98,29 @@ local plugins = {
|
||||
lsp_doc_border = true
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<S-Enter>", function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" },
|
||||
{ "<leader>snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" },
|
||||
{ "<leader>snh", function() require("noice").cmd("history") end, desc = "Noice History" },
|
||||
{ "<leader>sna", function() require("noice").cmd("all") end, desc = "Noice All" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("bufferline").setup({
|
||||
auto_hide = true,
|
||||
icon_separator_active = '|',
|
||||
icon_separator_inactive = '|',
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/dressing.nvim",
|
||||
enabled = false,
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
@@ -247,7 +270,7 @@ local plugins = {
|
||||
decrement = '-'
|
||||
},
|
||||
additions = {
|
||||
{ "const", "let", "var" },
|
||||
{ "const", "let", "var" },
|
||||
{ "absolute", "relative", "fixed", "sticky" }
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user