summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authoraktersnurra <grydholm@kth.se>2021-02-10 23:31:32 +0100
committeraktersnurra <grydholm@kth.se>2021-02-10 23:31:32 +0100
commitaa2b6faa6c52e3c333d3cc5f47dad0391085e666 (patch)
tree78e6a3f8e8b9de59baa11fb5cbce829dbb11acbf /.config/nvim
parentd4b9c144f24ddf4f22e32e33c05e0785bcff1beb (diff)
some nice stuff
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/general/settings.vim2
-rw-r--r--.config/nvim/init.vim10
-rw-r--r--.config/nvim/plug-config/barbar.vim55
-rw-r--r--.config/nvim/plug-config/floaterm.vim13
-rw-r--r--.config/nvim/plug-config/ranger.vim2
-rw-r--r--.config/nvim/plug-config/rnvimr.vim14
-rw-r--r--.config/nvim/plug-config/vista.vim8
-rw-r--r--.config/nvim/vim-plug/plugins.vim26
8 files changed, 114 insertions, 16 deletions
diff --git a/.config/nvim/general/settings.vim b/.config/nvim/general/settings.vim
index 877b3db..1f9ae7f 100644
--- a/.config/nvim/general/settings.vim
+++ b/.config/nvim/general/settings.vim
@@ -37,5 +37,7 @@ set clipboard=unnamedplus " Copy paste between vim and everything
au! BufWritePost $MYVIMRC source % " auto source when writing to init.vm alternatively you can run :source $MYVIMRC
+set laststatus=2 " To get galaxyline to display
+
" You can't stop me
cmap w!! w !sudo tee %
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 2d1be33..e979a84 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -9,15 +9,21 @@ source $HOME/.config/nvim/plug-config/polyglot.vim
source $HOME/.config/nvim/vim-plug/plugins.vim
source $HOME/.config/nvim/general/settings.vim
source $HOME/.config/nvim/keys/mappings.vim
+source $HOME/.config/nvim/plug-config/rnvimr.vim
+source $HOME/.config/nvim/plug-config/ranger.vim
+source $HOME/.config/nvim/plug-config/barbar.vim
+source $HOME/.config/nvim/plug-config/floaterm.vim
+
" Theme
" source $HOME/.config/nvim/themes/githubsy.vim
source $HOME/.config/nvim/themes/wal.vim
-source $HOME/.config/nvim/themes/airline.vim
+" source $HOME/.config/nvim/themes/airline.vim
source $HOME/.config/nvim/plug-config/coc.vim
+
" luafile $HOME/.config/nvim/lua/plug-colorizer.lua
+luafile $HOME/.config/nvim/lua/statusline.lua
source $HOME/.config/nvim/plug-config/start-screen.vim
source $HOME/.config/nvim/plug-config/sneak.vim
-
diff --git a/.config/nvim/plug-config/barbar.vim b/.config/nvim/plug-config/barbar.vim
new file mode 100644
index 0000000..57ac470
--- /dev/null
+++ b/.config/nvim/plug-config/barbar.vim
@@ -0,0 +1,55 @@
+let g:bufferline = { 'closable': v:false }
+" 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
diff --git a/.config/nvim/plug-config/floaterm.vim b/.config/nvim/plug-config/floaterm.vim
new file mode 100644
index 0000000..18e38a9
--- /dev/null
+++ b/.config/nvim/plug-config/floaterm.vim
@@ -0,0 +1,13 @@
+let g:floaterm_keymap_toggle = '<F1>'
+let g:floaterm_keymap_next = '<F2>'
+let g:floaterm_keymap_prev = '<F3>'
+let g:floaterm_keymap_new = '<F4>'
+let g:floaterm_title=''
+
+" Floaterm
+let g:floaterm_gitcommit='floaterm'
+let g:floaterm_autoinsert=1
+let g:floaterm_width=0.8
+let g:floaterm_height=0.8
+let g:floaterm_wintitle=0
+let g:floaterm_autoclose=1
diff --git a/.config/nvim/plug-config/ranger.vim b/.config/nvim/plug-config/ranger.vim
new file mode 100644
index 0000000..e6001ba
--- /dev/null
+++ b/.config/nvim/plug-config/ranger.vim
@@ -0,0 +1,2 @@
+let g:ranger_replace_netrw = 1 "// open ranger when vim open a directory
+let g:ranger_map_keys = 0
diff --git a/.config/nvim/plug-config/rnvimr.vim b/.config/nvim/plug-config/rnvimr.vim
index b5912b0..4264b03 100644
--- a/.config/nvim/plug-config/rnvimr.vim
+++ b/.config/nvim/plug-config/rnvimr.vim
@@ -1,4 +1,14 @@
" Make Ranger replace netrw and be the file explorer
-let g:rnvimr_ex_enable = 1
-nmap <space>r :RnvimrToggle<CR>
+let g:rnvimr_draw_border = 1
+
+" Make Ranger to be hidden after picking a file
+let g:rnvimr_pick_enable = 1
+
+" Make Neovim to wipe the buffers corresponding to the files deleted by Ranger
+let g:rnvimr_bw_enable = 1
+
+let g:rnvimr_ranger_cmd = 'ranger --cmd="set column_ratios 1,1"'
+
+let g:rnvimr_presets = [
+ \ {'width': 0.800, 'height': 0.800}]
diff --git a/.config/nvim/plug-config/vista.vim b/.config/nvim/plug-config/vista.vim
new file mode 100644
index 0000000..1940357
--- /dev/null
+++ b/.config/nvim/plug-config/vista.vim
@@ -0,0 +1,8 @@
+let g:vista_fzf_preview = ['right:50%']
+
+let g:vista#renderer#enable_icon = 1
+
+let g:vista#renderer#icons = {
+\ "function": "\uf794",
+\ "variable": "\uf71b",
+\ }
diff --git a/.config/nvim/vim-plug/plugins.vim b/.config/nvim/vim-plug/plugins.vim
index 58ebeb3..c4e683a 100644
--- a/.config/nvim/vim-plug/plugins.vim
+++ b/.config/nvim/vim-plug/plugins.vim
@@ -11,9 +11,6 @@ call plug#begin('~/.config/nvim/autoload/plugged')
" Better Syntax Support
Plug 'sheerun/vim-polyglot'
- " File Explorer
- Plug 'scrooloose/NERDTree'
-
" Auto pairs for '(' '[' '{'
Plug 'jiangmiao/auto-pairs'
@@ -25,20 +22,25 @@ call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'synul/githubsy'
Plug 'dylanaraps/wal.vim'
Plug 'richtan/pywal.vim'
-
+
+ " Better tabline
+ Plug 'romgrk/barbar.nvim'
+ " Terminal
+ Plug 'voldikss/vim-floaterm'
" Status line
- Plug 'vim-airline/vim-airline'
- Plug 'vim-airline/vim-airline-themes'
- " Plug 'glepnir/galaxyline.nvim'
-
+ " Plug 'vim-airline/vim-airline'
+ " Plug 'vim-airline/vim-airline-themes'
+ Plug 'glepnir/galaxyline.nvim' , {'branch': 'main'}
+ " Vista
+ Plug 'liuchengxu/vista.vim'
" If you want icons use one of these:
- " Plug 'kyazdani42/nvim-web-devicons' " lua
- " Plug 'ryanoasis/vim-devicons' " vimscript
-
+ Plug 'kyazdani42/nvim-web-devicons' " lua
+ Plug 'ryanoasis/vim-devicons' " vimscript
+ Plug 'kyazdani42/nvim-tree.lua'
" Stable version of coc
Plug 'neoclide/coc.nvim', {'branch': 'release'}
- " Plug 'kevinhwang91/rnvimr'
+ Plug 'kevinhwang91/rnvimr'
" Colorizer
Plug 'norcalli/nvim-colorizer.lua'