replace some plugins for nvim

This commit is contained in:
Nachuan Tang
2023-02-04 19:16:54 -05:00
parent 58ce637e23
commit cd55da86b1
3 changed files with 55 additions and 20 deletions
+4 -2
View File
@@ -78,8 +78,8 @@
" Vim UI {
"
set tabpagemax=15 " Only show 15 tabs
set showmode " Display the current mode
" set tabpagemax=15 " Only show 15 tabs
" set showmode " Display the current mode
set cursorline " Highlight current line
set cmdheight=1 " get rid of the extra useless line at the bottom(not working, probably a plugin is changing the value)
@@ -91,6 +91,7 @@
set ruler " Show the ruler
set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) " A ruler on steroids
set showcmd " Show partial commands in status line and
endif
set backspace=indent,eol,start " Backspace for dummies
@@ -109,6 +110,7 @@
set scrolloff=5 " Minimum lines to keep above and below cursor
set sidescrolloff=5 " Minimum lines to keep at the left or right of the cursor
" }
" Formatting {
+7 -2
View File
@@ -229,8 +229,11 @@ endif
nnoremap <leader>e :NvimTreeFindFileToggle<CR>
nnoremap <leader>r :NvimTreeRefresh<CR>
" nnoremap <leader>e :NvimTreeFindFile<CR>
" Hide vim bottom statusline
" autocmd FileType NvimTree setlocal noshowmode noruler laststatus=0 noshowcmd
set noshowmode noruler laststatus=0 noshowcmd
" autocmd BufRead,BufNewFile NvimTree set laststatus=0 " This will work instead
endif
" }
@@ -239,6 +242,7 @@ endif
" }
"else
" vim-airline {
if g:vim_type == 'vim' && isdirectory(expand(plugin_dir . "/airline"))
" Set configuration options for the statusline plugin vim-airline.
" Use the powerline theme and optionally enable powerline symbols.
let g:airline_section_b = ''
@@ -276,6 +280,7 @@ endif
if isdirectory(expand(plugin_dir . "/vim-airline-themes/"))
"let g:airline_theme = 'solarized'
endif
endif
" }
"endif
@@ -386,7 +391,7 @@ endif
" Currently only support airline
function! SetAirlineTheme(theme)
if g:vim_type == 'nvim' && g:vim_version >= 0.5
execute('AirlineTheme ' . a:theme)
"execute('AirlineTheme ' . a:theme)
else
execute('AirlineTheme ' . a:theme)
endif
+44 -16
View File
@@ -11,6 +11,14 @@ require('nvim-treesitter.configs').setup {
}
require('lualine').setup {
options = {
theme = 'auto', -- lualine theme
disabled_filetypes = { -- Filetypes to disable lualine for.
statusline = {}, -- only ignores the ft for statusline.
winbar = {}, -- only ignores the ft for winbar.
'NvimTree'
},
},
sections = {
lualine_a = {'mode'},
lualine_b = {},
@@ -18,6 +26,14 @@ require('lualine').setup {
{
'buffers',
mode = 4,
filetype_names = {
TelescopePrompt = 'Telescope',
dashboard = 'Dashboard',
packer = 'Packer',
fzf = 'FZF',
alpha = 'Alpha',
NvimTree = 'NvimTree'
},
}
},
-- lualine_x = {'encoding', 'fileformat', 'filetype'},
@@ -60,23 +76,35 @@ 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" },
},
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" },
},
},
},
},
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = false,
},
})
--