This commit is contained in:
Neeraj 2023-02-24 20:25:45 +05:30
parent 72364ad9ac
commit d708bfce70
8 changed files with 224 additions and 3 deletions

View file

@ -0,0 +1,10 @@
return {
'romgrk/barbar.nvim',
dependencies = 'nvim-tree/nvim-web-devicons',
config = function ()
vim.keymap.set('', 'J', '<Cmd>BufferPrevious<CR>')
vim.keymap.set('', 'K', '<Cmd>BufferNext<CR>')
vim.keymap.set('', 'X', '<Cmd>BufferClose<CR>')
end
}

View file

@ -0,0 +1,6 @@
return {
"rmehri01/onenord.nvim",
config = function ()
vim.cmd.colorscheme 'onenord'
end
}

View file

@ -0,0 +1,26 @@
return {
'onsails/lspkind.nvim',
config = function ()
local lspkind = require'lspkind'
-- nvim-cmp setup
local cmp = require 'cmp'
cmp.setup {
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
-- The function below will be called before any actual modifications from lspkind
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
before = function (entry, vim_item)
return vim_item
end
})
}
}
end
}

View file

@ -0,0 +1,41 @@
return {
'nvim-lualine/lualine.nvim',
opts = {
options = {
theme = 'onenord',
icons_enabled = true,
component_separators = {left = '', right = ''},
section_separators = {left = '', right = ''},
disabled_filetypes = {},
always_divide_middle = true
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
-- lualine_c = {'filename'},
lualine_c = {
{
'filename',
file_status = true, -- Displays file status (readonly status, modified status)
path = 1, -- 0: Just the filename
-- 1: Relative path
-- 2: Absolute path
shorting_target = 40 -- Shortens path to leave 40 spaces in the window
-- for other components. (terrible name, any suggestions?)
}
},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
},
}

View file

@ -0,0 +1,28 @@
return {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional, for file icons
},
config = function ()
local nvim_tree_events = require('nvim-tree.events')
local bufferline_api = require('bufferline.api')
local function get_tree_size()
return require'nvim-tree.view'.View.width
end
nvim_tree_events.subscribe('TreeOpen', function()
bufferline_api.set_offset(get_tree_size())
end)
nvim_tree_events.subscribe('Resize', function()
bufferline_api.set_offset(get_tree_size())
end)
nvim_tree_events.subscribe('TreeClose', function()
bufferline_api.set_offset(0)
end)
require("nvim-tree").setup()
end
}

View file

@ -0,0 +1,3 @@
return {
'mhinz/vim-startify'
}