Merge branch 'dev' of https://github.com/Donaldttt/dotfiles into dev
This commit is contained in:
+6
-3
@@ -76,10 +76,10 @@
|
|||||||
Plug 'scrooloose/nerdtree'
|
Plug 'scrooloose/nerdtree'
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
Plug 'vim-airline/vim-airline-themes'
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
|
" The bottom buffer display
|
||||||
|
Plug 'bling/vim-bufferline'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" The bottom buffer display
|
|
||||||
Plug 'bling/vim-bufferline'
|
|
||||||
" only work with nvim > 0.5
|
" only work with nvim > 0.5
|
||||||
" For other versions, just loading the plugin may
|
" For other versions, just loading the plugin may
|
||||||
" cause error
|
" cause error
|
||||||
@@ -101,6 +101,9 @@
|
|||||||
if g:vim_version >= 0.8
|
if g:vim_version >= 0.8
|
||||||
Plug 'nvim-tree/nvim-tree.lua'
|
Plug 'nvim-tree/nvim-tree.lua'
|
||||||
endif
|
endif
|
||||||
|
if g:vim_version < 0.8
|
||||||
|
Plug 'scrooloose/nerdtree'
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
@@ -205,7 +208,7 @@ endif
|
|||||||
" }
|
" }
|
||||||
|
|
||||||
" NerdTree {
|
" NerdTree {
|
||||||
if g:vim_type == 'vim' && isdirectory(expand(plugin_dir . "/nerdtree"))
|
if (g:vim_type == 'vim' || g:vim_version < 0.8) && isdirectory(expand(plugin_dir . "/nerdtree"))
|
||||||
let g:NERDShutUp=1
|
let g:NERDShutUp=1
|
||||||
|
|
||||||
" work around for nerdtree bug: https://github.com/preservim/nerdtree/issues/1321
|
" work around for nerdtree bug: https://github.com/preservim/nerdtree/issues/1321
|
||||||
|
|||||||
+115
-99
@@ -1,111 +1,127 @@
|
|||||||
|
vim_version = vim.version()
|
||||||
|
vim_version_minor = vim_version['minor']
|
||||||
|
|
||||||
require('nvim-treesitter.configs').setup {
|
-- debug
|
||||||
-- ensure_installed = { "c", "bash", "lua" },
|
-- print(vim.inspect(version))
|
||||||
sync_install = false,
|
|
||||||
auto_install = true,
|
|
||||||
-- ignore_install = { "javascript" },
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
additional_vim_regex_highlighting = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require('lualine').setup {
|
if vim_version_minor >= 7 then
|
||||||
options = {
|
|
||||||
theme = 'auto', -- lualine theme
|
require('nvim-treesitter.configs').setup {
|
||||||
disabled_filetypes = { -- Filetypes to disable lualine for.
|
-- ensure_installed = { "c", "bash", "lua" },
|
||||||
statusline = {}, -- only ignores the ft for statusline.
|
sync_install = false,
|
||||||
winbar = {}, -- only ignores the ft for winbar.
|
auto_install = true,
|
||||||
'NvimTree'
|
-- ignore_install = { "javascript" },
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
sections = {
|
|
||||||
lualine_a = {'mode'},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {
|
|
||||||
{
|
|
||||||
'buffers',
|
|
||||||
mode = 4,
|
|
||||||
filetype_names = {
|
|
||||||
TelescopePrompt = 'Telescope',
|
|
||||||
dashboard = 'Dashboard',
|
|
||||||
packer = 'Packer',
|
|
||||||
fzf = 'FZF',
|
|
||||||
alpha = 'Alpha',
|
|
||||||
NvimTree = 'NvimTree'
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
-- lualine_x = {'encoding', 'fileformat', 'filetype'},
|
|
||||||
lualine_x = {'encoding'},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {'location'}
|
|
||||||
},
|
|
||||||
-- tabline = {
|
|
||||||
-- lualine_a = {
|
|
||||||
-- {
|
|
||||||
-- 'buffers',
|
|
||||||
-- mode = 4,
|
|
||||||
-- }
|
|
||||||
-- },
|
|
||||||
-- lualine_b = {},
|
|
||||||
-- lualine_c = {},
|
|
||||||
-- lualine_x = {},
|
|
||||||
-- lualine_y = {},
|
|
||||||
-- lualine_z = {'tabs'}
|
|
||||||
-- },
|
|
||||||
-- winbar = {
|
|
||||||
-- lualine_a = {},
|
|
||||||
-- lualine_b = {},
|
|
||||||
-- lualine_c = {'filename'},
|
|
||||||
-- lualine_x = {},
|
|
||||||
-- lualine_y = {},
|
|
||||||
-- lualine_z = {}
|
|
||||||
-- },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- nvim-tree configuration
|
end
|
||||||
--
|
|
||||||
|
|
||||||
-- disable netrw at the very start of your init.lua (strongly advised)
|
if vim_version_minor >= 5 then
|
||||||
vim.g.loaded_netrw = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
|
|
||||||
-- set termguicolors to enable highlight groups
|
require('lualine').setup {
|
||||||
vim.opt.termguicolors = true
|
options = {
|
||||||
|
theme = 'auto', -- lualine theme
|
||||||
-- setup with some options
|
disabled_filetypes = { -- Filetypes to disable lualine for.
|
||||||
require("nvim-tree").setup({
|
statusline = {}, -- only ignores the ft for statusline.
|
||||||
sort_by = "case_sensitive",
|
winbar = {}, -- only ignores the ft for winbar.
|
||||||
view = {
|
'NvimTree'
|
||||||
width = 30,
|
|
||||||
mappings = {
|
|
||||||
list = {
|
|
||||||
{ key = "C-[", action = "dir_up" },
|
|
||||||
{ key = "C-]", action = "cd" },
|
|
||||||
{ key = "<C-k>", action = "toggle_file_info" },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
sections = {
|
||||||
renderer = {
|
lualine_a = {'mode'},
|
||||||
group_empty = true,
|
lualine_b = {},
|
||||||
},
|
lualine_c = {
|
||||||
filters = {
|
{
|
||||||
dotfiles = false,
|
'buffers',
|
||||||
},
|
mode = 4,
|
||||||
actions = {
|
filetype_names = {
|
||||||
open_file = {
|
TelescopePrompt = 'Telescope',
|
||||||
quit_on_open = true,
|
dashboard = 'Dashboard',
|
||||||
resize_window = true,
|
packer = 'Packer',
|
||||||
window_picker = {
|
fzf = 'FZF',
|
||||||
exclude = {
|
alpha = 'Alpha',
|
||||||
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
|
NvimTree = 'NvimTree'
|
||||||
buftype = { "nofile", "terminal", "help" },
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
-- lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||||
|
lualine_x = {'encoding'},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {'location'}
|
||||||
|
},
|
||||||
|
-- tabline = {
|
||||||
|
-- lualine_a = {
|
||||||
|
-- {
|
||||||
|
-- 'buffers',
|
||||||
|
-- mode = 4,
|
||||||
|
-- }
|
||||||
|
-- },
|
||||||
|
-- lualine_b = {},
|
||||||
|
-- lualine_c = {},
|
||||||
|
-- lualine_x = {},
|
||||||
|
-- lualine_y = {},
|
||||||
|
-- lualine_z = {'tabs'}
|
||||||
|
-- },
|
||||||
|
-- winbar = {
|
||||||
|
-- lualine_a = {},
|
||||||
|
-- lualine_b = {},
|
||||||
|
-- lualine_c = {'filename'},
|
||||||
|
-- lualine_x = {},
|
||||||
|
-- lualine_y = {},
|
||||||
|
-- lualine_z = {}
|
||||||
|
-- },
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
if vim_version_minor >= 8 then
|
||||||
|
-- nvim-tree configuration
|
||||||
|
--
|
||||||
|
|
||||||
|
-- disable netrw at the very start of your init.lua (strongly advised)
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
-- set termguicolors to enable highlight groups
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
-- setup with some options
|
||||||
|
require("nvim-tree").setup({
|
||||||
|
sort_by = "case_sensitive",
|
||||||
|
view = {
|
||||||
|
width = 30,
|
||||||
|
mappings = {
|
||||||
|
list = {
|
||||||
|
{ key = "C-[", action = "dir_up" },
|
||||||
|
{ key = "C-]", action = "cd" },
|
||||||
|
{ key = "<C-k>", action = "toggle_file_info" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
renderer = {
|
||||||
})
|
group_empty = true,
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = false,
|
||||||
|
},
|
||||||
|
actions = {
|
||||||
|
open_file = {
|
||||||
|
quit_on_open = true,
|
||||||
|
resize_window = true,
|
||||||
|
window_picker = {
|
||||||
|
exclude = {
|
||||||
|
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
|
||||||
|
buftype = { "nofile", "terminal", "help" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
--
|
--
|
||||||
-- nvim-tree configuration end
|
-- nvim-tree configuration end
|
||||||
|
--
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user