neovim: add bufferline and nvim-tree plugins

This commit is contained in:
FollieHiyuki 2021-07-06 14:26:25 +03:00
parent 9e2fc5d4bd
commit c447ef8282
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
6 changed files with 51 additions and 5 deletions

View File

@ -39,7 +39,7 @@ M.colors = {
} }
function M.highlight() function M.highlight()
hi('ModeMsg', M.colors.blue, '', '', '') hi('ModeMsg', M.colors.green, '', '', '')
end end
return M return M

View File

@ -40,7 +40,7 @@ M.colors = {
} }
function M.highlight() function M.highlight()
hi('ModeMsg', M.colors.blue, '', '', '') hi('ModeMsg', M.colors.green, '', '', '')
end end
return M return M

View File

@ -0,0 +1,14 @@
return require('bufferline').setup {
options = {
mappings = true,
max_name_length = 18,
max_prefix_length = 16,
tab_size = 18,
diagnostics = 'nvim_lsp',
show_tab_indicators = true,
enforce_regular_tabs = false,
show_buffer_close_icons = true,
always_show_bufferline = true,
separator_style = 'thin'
}
}

View File

@ -0,0 +1,15 @@
local function tree_options()
vim.g.nvim_tree_width = 35
vim.g.nvim_tree_ignore = { '.git', '.hg', '.svn', 'node_modules' }
vim.g.nvim_tree_auto_open = 1
vim.g.nvim_tree_auto_close = 1
vim.g.nvim_tree_auto_ignore_ft = { 'dashboard' }
vim.g.nvim_tree_follow = 1
vim.g.nvim_tree_indent_markers = 1
vim.g.nvim_tree_git_hl = 1
vim.g.nvim_tree_auto_resize = 0
-- vim.g.nvim_tree_add_trailing = 1
vim.g.nvim_tree_lsp_diagnostics = 1
end
tree_options()

View File

@ -8,7 +8,7 @@ local function load_options()
-- General settings -- General settings
opt.termguicolors = true opt.termguicolors = true
-- opt.background = 'dark' -- opt.background = 'dark'
opt.mouse = 'nv' opt.mouse = 'a'
opt.errorbells = false opt.errorbells = false
opt.visualbell = false opt.visualbell = false
opt.hidden = true opt.hidden = true
@ -36,6 +36,7 @@ local function load_options()
-- opt.cursorline = true -- opt.cursorline = true
-- opt.backspace = 'indent,eol,start' -- opt.backspace = 'indent,eol,start'
opt.showcmd = false opt.showcmd = false
opt.inccommand = 'nosplit'
-- opt.cmdheight = 2 -- opt.cmdheight = 2
-- opt.cmdwinheight = 6 -- opt.cmdwinheight = 6
opt.showtabline = 2 opt.showtabline = 2
@ -92,7 +93,6 @@ local function load_options()
-- Window rules -- Window rules
opt.splitbelow = true opt.splitbelow = true
opt.splitright = true opt.splitright = true
opt.inccommand = 'nosplit'
opt.switchbuf = 'useopen' opt.switchbuf = 'useopen'
opt.winwidth = 30 opt.winwidth = 30
opt.winminwidth = 10 opt.winminwidth = 10

View File

@ -13,7 +13,7 @@ return packer.startup(
function(use) function(use)
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
-- Appearance/UI -- UI elements
use { use {
'glepnir/dashboard-nvim', 'glepnir/dashboard-nvim',
setup = function() setup = function()
@ -28,6 +28,21 @@ return packer.startup(
require('modules.statusline') require('modules.statusline')
end end
} }
use {
'akinsho/nvim-bufferline.lua',
config = function()
require('modules.bufferline')
end
}
use {
'kyazdani42/nvim-tree.lua',
cmd = 'NvimTreeToggle',
setup = function()
require('modules.tree')
end
}
-- Editing
use { use {
'norcalli/nvim-colorizer.lua', 'norcalli/nvim-colorizer.lua',
event = 'BufRead', event = 'BufRead',
@ -36,5 +51,7 @@ return packer.startup(
vim.cmd('ColorizerReloadAllBuffers') vim.cmd('ColorizerReloadAllBuffers')
end end
} }
-- LSP
end end
) )