feat: customize bufferline and inlinc

This commit is contained in:
Victor Martinez 2024-01-03 17:46:47 +01:00
parent 2693207625
commit 4c8770ef38
6 changed files with 89 additions and 10 deletions

View file

@ -16,6 +16,7 @@
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
"headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
"incline.nvim": { "branch": "main", "commit": "fdd7e08a6e3d0dd8d9aa02428861fa30c37ba306" },
"indent-blankline.nvim": { "branch": "master", "commit": "3c8a185da4b8ab7aef487219f5e001b11d4b6aaf" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
@ -28,7 +29,6 @@
"mini.indentscope": { "branch": "main", "commit": "5a8369475cd7cd6f207a4d288406d03b0fc48bdb" },
"mini.pairs": { "branch": "main", "commit": "552062017ff207e1f35f7028bfb3f27c7421d22d" },
"mini.surround": { "branch": "main", "commit": "7bf8915ba15d7a4f3c2afe7868d3c15a858d73f1" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" },
"neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" },
"neodev.nvim": { "branch": "main", "commit": "2a8630847dbb93455936156c0689678e4eaee319" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
@ -50,7 +50,7 @@
"solarized-osaka.nvim": { "branch": "main", "commit": "d3272bc510deecd423833771e443ab0eaf8cd802" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "4bd5657b14b58e069287f5ac591a647bb860b2ed" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "master", "commit": "3466159b0fcc1876483f6f53587562628664d850" },
"telescope.nvim": { "branch": "master", "commit": "983460fb8cd864748311f4c7f0c8337091f24d59" },
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
"tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },

View file

@ -3,7 +3,8 @@
],
"news": {
"NEWS.md": "2123"
"NEWS.md": "2123",
"doc/news.txt": "13995"
},
"version": 2
}

View file

@ -9,7 +9,17 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
{
"LazyVim/LazyVim",
import = "lazyvim.plugins",
opts = {
colorscheme = "solarized-osaka",
news = {
lazyvim = true,
neovim = true,
},
},
},
-- import any extras modules here
{ import = "lazyvim.plugins.extras.linting.eslint" },
{ import = "lazyvim.plugins.extras.formatting.prettier" },

View file

@ -1,10 +1,4 @@
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "solarized-osaka",
},
},
-- Disable side files tree
{
"nvim-neo-tree/neo-tree.nvim",

View file

@ -0,0 +1,74 @@
return {
-- messages, cmdline and the popupmenu
{
"folke/noice.nvim",
opts = function(_, opts)
table.insert(opts.routes, {
filter = {
event = "notify",
find = "No information available",
},
opts = { skip = true },
})
opts.presets.lsp_doc_border = true
end,
},
{
"rcarriga/nvim-notify",
opts = {
timeout = 5000,
},
},
-- filename
{
"b0o/incline.nvim",
dependencies = { "craftzdog/solarized-osaka.nvim" },
event = "BufReadPre",
priority = 1200,
config = function()
local colors = require("solarized-osaka.colors").setup()
require("incline").setup({
highlight = {
groups = {
InclineNormal = { guibg = colors.magenta500, guifg = colors.base04 },
InclineNormalNC = { guifg = colors.violet500, guibg = colors.base03 },
},
},
window = { margin = { vertical = 0, horizontal = 1 } },
hide = {
cursorline = true,
},
render = function(props)
local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t")
if vim.bo[props.buf].modified then
filename = "[+] " .. filename
end
local icon, color = require("nvim-web-devicons").get_icon_color(filename)
return { { icon, guifg = color }, { " " }, { filename } }
end,
})
end,
},
-- buffer line
{
"akinsho/bufferline.nvim",
event = "VeryLazy",
keys = {
{ "<Tab>", "<Cmd>BufferLineCycleNext<CR>", desc = "Next tab" },
{ "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>", desc = "Prev tab" },
-- Disable pinning keymaps as they don't work on tab mode
{ "<leader>bp", false },
{ "<leader>bP", false },
},
opts = {
options = {
mode = "tabs",
-- separator_style = "slant",
show_buffer_close_icons = false,
show_close_icon = false,
},
},
},
}