mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 23:20:08 +02:00
added barbar
This commit is contained in:
parent
ab0eb1b423
commit
e49f1c6a28
6 changed files with 125 additions and 17 deletions
6
init.vim
6
init.vim
|
@ -47,7 +47,8 @@ else
|
||||||
source $HOME/.config/nvim/plug-config/closetags.vim
|
source $HOME/.config/nvim/plug-config/closetags.vim
|
||||||
source $HOME/.config/nvim/plug-config/floaterm.vim
|
source $HOME/.config/nvim/plug-config/floaterm.vim
|
||||||
" source $HOME/.config/nvim/plug-config/vista.vim
|
" source $HOME/.config/nvim/plug-config/vista.vim
|
||||||
source $HOME/.config/nvim/plug-config/xtabline.vim
|
" source $HOME/.config/nvim/plug-config/xtabline.vim
|
||||||
|
source $HOME/.config/nvim/plug-config/barbar.vim
|
||||||
source $HOME/.config/nvim/plug-config/far.vim
|
source $HOME/.config/nvim/plug-config/far.vim
|
||||||
source $HOME/.config/nvim/plug-config/tagalong.vim
|
source $HOME/.config/nvim/plug-config/tagalong.vim
|
||||||
" source $HOME/.config/nvim/plug-config/illuminate.vim
|
" source $HOME/.config/nvim/plug-config/illuminate.vim
|
||||||
|
@ -68,3 +69,6 @@ endif
|
||||||
" Better nav for omnicomplete TODO figure out why this is being overridden
|
" Better nav for omnicomplete TODO figure out why this is being overridden
|
||||||
inoremap <expr> <c-j> ("\<C-n>")
|
inoremap <expr> <c-j> ("\<C-n>")
|
||||||
inoremap <expr> <c-k> ("\<C-p>")
|
inoremap <expr> <c-k> ("\<C-p>")
|
||||||
|
|
||||||
|
" set foldmethod=expr
|
||||||
|
" set foldexpr=nvim_treesitter#foldexpr()
|
||||||
|
|
|
@ -58,7 +58,7 @@ let g:which_key_map.a = {
|
||||||
\ 'm' : [':MarkdownPreview' , 'markdown preview'],
|
\ 'm' : [':MarkdownPreview' , 'markdown preview'],
|
||||||
\ 'M' : [':MarkdownPreviewStop' , 'markdown preview stop'],
|
\ 'M' : [':MarkdownPreviewStop' , 'markdown preview stop'],
|
||||||
\ 'n' : [':set nonumber!' , 'line-numbers'],
|
\ 'n' : [':set nonumber!' , 'line-numbers'],
|
||||||
\ 's' : [':s/\%V\(.*\)\%V/"\1"/' , 'surround'],
|
\ 's' : [':s/\%V\(.*\)\%V/"\1"/' , 'surround'],
|
||||||
\ 'r' : [':set norelativenumber!' , 'relative line nums'],
|
\ 'r' : [':set norelativenumber!' , 'relative line nums'],
|
||||||
\ 't' : [':FloatermToggle' , 'terminal'],
|
\ 't' : [':FloatermToggle' , 'terminal'],
|
||||||
\ 'v' : [':Codi' , 'virtual repl on'],
|
\ 'v' : [':Codi' , 'virtual repl on'],
|
||||||
|
@ -69,15 +69,27 @@ let g:which_key_map.a = {
|
||||||
" b is for buffer
|
" b is for buffer
|
||||||
let g:which_key_map.b = {
|
let g:which_key_map.b = {
|
||||||
\ 'name' : '+buffer' ,
|
\ 'name' : '+buffer' ,
|
||||||
\ '1' : ['b1' , 'buffer 1'],
|
\ '>' : [':BufferMoveNext' , 'move next'],
|
||||||
\ '2' : ['b2' , 'buffer 2'],
|
\ '<' : [':BufferMovePrevious' , 'move prev'],
|
||||||
\ 'd' : [':Bdelete' , 'delete-buffer'],
|
\ '1' : [':BufferGoto 1' , 'buffer 1'],
|
||||||
\ 'f' : ['bfirst' , 'first-buffer'],
|
\ '2' : [':BufferGoto 2' , 'buffer 2'],
|
||||||
\ 'h' : ['Startify' , 'home-buffer'],
|
\ '3' : [':BufferGoto 3' , 'buffer 3'],
|
||||||
\ 'l' : ['blast' , 'last-buffer'],
|
\ '4' : [':BufferGoto 4' , 'buffer 4'],
|
||||||
\ 'n' : ['bnext' , 'next-buffer'],
|
\ '5' : [':BufferGoto 5' , 'buffer 5'],
|
||||||
\ 'p' : ['bprevious' , 'previous-buffer'],
|
\ '6' : [':BufferGoto 6' , 'buffer 6'],
|
||||||
\ '?' : ['Buffers' , 'fzf-buffer'],
|
\ '7' : [':BufferGoto 7' , 'buffer 7'],
|
||||||
|
\ '8' : [':BufferGoto 8' , 'buffer 8'],
|
||||||
|
\ '9' : [':BufferGoto 9' , 'buffer 9'],
|
||||||
|
\ '0' : [':BufferGoto 0' , 'buffer 0'],
|
||||||
|
\ 'b' : [':BufferPick' , 'pick buffer'],
|
||||||
|
\ 'd' : [':Bdelete' , 'delete-buffer'],
|
||||||
|
\ 'D' : [':BufferOrderByDirectory', 'order by directory'],
|
||||||
|
\ 'f' : ['bfirst' , 'first-buffer'],
|
||||||
|
\ 'l' : ['blast' , 'last buffer'],
|
||||||
|
\ 'L' : [':BufferOrderByLanguage' , 'order by language'],
|
||||||
|
\ 'n' : ['bnext' , 'next-buffer'],
|
||||||
|
\ 'p' : ['bprevious' , 'previous-buffer'],
|
||||||
|
\ '?' : ['Buffers' , 'fzf-buffer'],
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" f is for find and replace
|
" f is for find and replace
|
||||||
|
|
|
@ -14,3 +14,22 @@ require "nvim-treesitter.configs".setup {
|
||||||
persist_queries = false -- Whether the query persists across vim sessions
|
persist_queries = false -- Whether the query persists across vim sessions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
refactor = {
|
||||||
|
highlight_current_scope = { enable = false },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
refactor = {
|
||||||
|
smart_rename = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
smart_rename = "grr",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
56
plug-config/barbar.vim
Normal file
56
plug-config/barbar.vim
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
let bufferline = {}
|
||||||
|
|
||||||
|
" Show a shadow over the editor in buffer-pick mode
|
||||||
|
let bufferline.shadow = v:true
|
||||||
|
|
||||||
|
" Enable/disable icons
|
||||||
|
let bufferline.icons = v:true
|
||||||
|
|
||||||
|
" Enables/disable clickable tabs
|
||||||
|
" - left-click: go to buffer
|
||||||
|
" - middle-click: delete buffer
|
||||||
|
"
|
||||||
|
" NOTE disabled by default because this might cause E541 (too many items)
|
||||||
|
" if you have many tabs open
|
||||||
|
let bufferline.clickable = v:true
|
||||||
|
|
||||||
|
" If set, the letters for each buffer in buffer-pick mode will be
|
||||||
|
" assigned based on their name. Otherwise or in case all letters are
|
||||||
|
" already assigned, the behavior is to assign letters in order of
|
||||||
|
" usability (see order below)
|
||||||
|
let bufferline.semantic_letters = v:true
|
||||||
|
|
||||||
|
" New buffer letters are assigned in this order. This order is
|
||||||
|
" optimal for the qwerty keyboard layout but might need adjustement
|
||||||
|
" for other layouts.
|
||||||
|
let bufferline.letters =
|
||||||
|
\ 'asdfjkl;ghnmxcbziowerutyqpASDFJKLGHNMXCBZIOWERUTYQP'
|
||||||
|
|
||||||
|
let bg_current = get(nvim_get_hl_by_name('Normal', 1), 'background', '#000000')
|
||||||
|
let bg_visible = get(nvim_get_hl_by_name('TabLineSel', 1), 'background', '#000000')
|
||||||
|
let bg_inactive = get(nvim_get_hl_by_name('TabLine', 1), 'background', '#000000')
|
||||||
|
|
||||||
|
" For the current active buffer
|
||||||
|
hi default link BufferCurrent Normal
|
||||||
|
" For the current active buffer when modified
|
||||||
|
hi default link BufferCurrentMod Normal
|
||||||
|
" For the current active buffer icon
|
||||||
|
hi default link BufferCurrentSign Normal
|
||||||
|
" For the current active buffer target when buffer-picking
|
||||||
|
exe 'hi default BufferCurrentTarget guifg=red gui=bold guibg=' . bg_current
|
||||||
|
|
||||||
|
" For buffers visible but not the current one
|
||||||
|
hi default link BufferVisible TabLineSel
|
||||||
|
hi default link BufferVisibleMod TabLineSel
|
||||||
|
hi default link BufferVisibleSign TabLineSel
|
||||||
|
exe 'hi default BufferVisibleTarget guifg=red gui=bold guibg=' . bg_visible
|
||||||
|
|
||||||
|
" For buffers invisible buffers
|
||||||
|
hi default link BufferInactive TabLine
|
||||||
|
hi default link BufferInactiveMod TabLine
|
||||||
|
hi default link BufferInactiveSign TabLine
|
||||||
|
exe 'hi default BufferInactiveTarget guifg=red gui=bold guibg=' . bg_inactive
|
||||||
|
|
||||||
|
|
||||||
|
" For the shadow in buffer-picking mode
|
||||||
|
hi default BufferShadow guifg=#000000 guibg=#000000
|
|
@ -35,3 +35,20 @@ let g:xtabline_settings.icons = {
|
||||||
\'lens': '🔍',
|
\'lens': '🔍',
|
||||||
\'flag': '🏁',
|
\'flag': '🏁',
|
||||||
\}
|
\}
|
||||||
|
|
||||||
|
" let g:which_key_map.T = {
|
||||||
|
" \ 'name' : '+tabline' ,
|
||||||
|
" \ 'b' : [':XTabListBuffers' , 'list buffers'],
|
||||||
|
" \ 'd' : [':XTabCloseBuffer' , 'close buffer'],
|
||||||
|
" \ 'D' : [':XTabDeleteTab' , 'close tab'],
|
||||||
|
" \ 'h' : [':XTabHideBuffer' , 'hide buffer'],
|
||||||
|
" \ 'i' : [':XTabInfo' , 'info'],
|
||||||
|
" \ 'l' : [':XTabLock' , 'lock tab'],
|
||||||
|
" \ 'm' : [':XTabMode' , 'toggle mode'],
|
||||||
|
" \ 'n' : [':tabNext' , 'next tab'],
|
||||||
|
" \ 'N' : [':XTabMoveBufferNext' , 'buffer->'],
|
||||||
|
" \ 't' : [':tabnew' , 'new tab'],
|
||||||
|
" \ 'p' : [':tabprevious' , 'prev tab'],
|
||||||
|
" \ 'P' : [':XTabMoveBufferPrev' , '<-buffer'],
|
||||||
|
" \ 'x' : [':XTabPinBuffer' , 'pin buffer'],
|
||||||
|
" \ }
|
||||||
|
|
|
@ -47,7 +47,6 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
||||||
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
|
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
|
||||||
Plug 'nvim-treesitter/playground'
|
Plug 'nvim-treesitter/playground'
|
||||||
Plug 'romgrk/nvim-treesitter-context'
|
Plug 'romgrk/nvim-treesitter-context'
|
||||||
|
|
||||||
" Cool Icons
|
" Cool Icons
|
||||||
Plug 'ryanoasis/vim-devicons'
|
Plug 'ryanoasis/vim-devicons'
|
||||||
" Auto pairs for '(' '[' '{'
|
" Auto pairs for '(' '[' '{'
|
||||||
|
@ -56,8 +55,6 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
||||||
Plug 'alvan/vim-closetag'
|
Plug 'alvan/vim-closetag'
|
||||||
" Themes
|
" Themes
|
||||||
Plug 'christianchiarulli/nvcode.vim'
|
Plug 'christianchiarulli/nvcode.vim'
|
||||||
" Plug 'ChristianChiarulli/nv-code'
|
|
||||||
" Plug 'kyazdani42/blue-moon'
|
|
||||||
" Intellisense
|
" Intellisense
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
" Status Line
|
" Status Line
|
||||||
|
@ -87,10 +84,10 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
||||||
Plug 'mattn/emmet-vim'
|
Plug 'mattn/emmet-vim'
|
||||||
" Interactive code
|
" Interactive code
|
||||||
Plug 'metakirby5/codi.vim'
|
Plug 'metakirby5/codi.vim'
|
||||||
" Debugging
|
|
||||||
" Plug 'puremourning/vimspector'
|
|
||||||
" Better tabline
|
" Better tabline
|
||||||
Plug 'mg979/vim-xtabline'
|
Plug 'kyazdani42/nvim-web-devicons'
|
||||||
|
Plug 'romgrk/lib.kom'
|
||||||
|
Plug 'romgrk/barbar.nvim'
|
||||||
" undo time travel
|
" undo time travel
|
||||||
Plug 'mbbill/undotree'
|
Plug 'mbbill/undotree'
|
||||||
" Find and replace
|
" Find and replace
|
||||||
|
@ -138,6 +135,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
||||||
" Plug 'kaicataldo/material.vim'
|
" Plug 'kaicataldo/material.vim'
|
||||||
" Plug 'NLKNguyen/papercolor-theme'
|
" Plug 'NLKNguyen/papercolor-theme'
|
||||||
" Plug 'tomasiser/vim-code-dark'
|
" Plug 'tomasiser/vim-code-dark'
|
||||||
|
" Plug 'mg979/vim-xtabline'
|
||||||
" Vim Wiki
|
" Vim Wiki
|
||||||
" Plug 'https://github.com/vimwiki/vimwiki.git'
|
" Plug 'https://github.com/vimwiki/vimwiki.git'
|
||||||
" Better Comments
|
" Better Comments
|
||||||
|
@ -158,6 +156,8 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
||||||
" Plug 'preservim/nerdcommenter'
|
" Plug 'preservim/nerdcommenter'
|
||||||
" Plug 'brooth/far.vim'
|
" Plug 'brooth/far.vim'
|
||||||
" Plug 'atishay/far.vim'
|
" Plug 'atishay/far.vim'
|
||||||
|
" Debugging
|
||||||
|
" Plug 'puremourning/vimspector'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue