This commit is contained in:
Agatha Lovelace 2022-06-23 10:07:54 +02:00
parent e60e881215
commit d6c5b475a1
Signed by: sorceress
GPG Key ID: 11BBCFC65FC9F401
1 changed files with 47 additions and 8 deletions

55
.vimrc
View File

@ -5,6 +5,7 @@
" || | || || || || || ||
" \\/ \\ \\ \\ \\ \\, \\,/
" Install VimPlug
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
@ -22,27 +23,31 @@ Plug 'dhruvasagar/vim-table-mode'
Plug 'fadein/vim-FIGlet'
Plug 'gkeep/iceberg-dark'
Plug 'itchyny/lightline.vim'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'karolbelina/uxntal.vim', {'for': 'uxntal'}
Plug 'lambdalisue/fern-git-status.vim'
Plug 'lambdalisue/fern-hijack.vim'
Plug 'lambdalisue/fern-renderer-nerdfont.vim'
Plug 'lambdalisue/fern.vim'
Plug 'lilydjwg/colorizer'
Plug 'mg979/vim-visual-multi'
Plug 'owickstrom/vim-colors-paramount'
Plug 'raimondi/delimitmate'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-commentary'
Plug 'vim-scripts/nginx.vim', {'for': 'nginx'}
Plug 'yuttie/comfortable-motion.vim'
Plug 'lambdalisue/nerdfont.vim'
Plug 'ryanoasis/vim-devicons'
" don't install these plugins on remote servers
if has('nvim')
Plug 'airblade/vim-gitgutter'
Plug 'folke/todo-comments.nvim'
Plug 'hrsh7th/cmp-calc'
Plug 'j-hui/fidget.nvim'
Plug 'jghauser/mkdir.nvim'
Plug 'stevearc/dressing.nvim'
Plug 'airblade/vim-gitgutter'
Plug 'williamboman/nvim-lsp-installer'
Plug 'antoinemadec/FixCursorHold.nvim'
Plug 'edluffy/specs.nvim'
Plug 'folke/lsp-colors.nvim'
@ -56,14 +61,12 @@ if has('nvim')
Plug 'hrsh7th/vim-vsnip'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'maximbaz/lightline-ale'
Plug 'williamboman/nvim-lsp-installer'
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'tpope/vim-fugitive'
Plug 'w0rp/ale'
Plug 'xuyuanp/nerdtree-git-plugin'
endif
call plug#end()
@ -81,14 +84,50 @@ noremap <silent> <ScrollWheelUp> :call comfortable_motion#flick(-20)<CR>
let g:VM_maps = {}
let g:VM_maps["I BS"] = '<c-BS>'
" Nerdtree/git config
let g:NERDTreeGitStatusConcealBrackets = 1
" Fern config
let g:fern#renderer = "nerdfont"
function FindSessionDirectory() abort
if len(argv()) > 0
return fnamemodify(argv()[0], ':p:h')
endif
return getcwd()
endfunction!
function! s:init_fern() abort
nmap <buffer><expr>
\ <Plug>(fern-my-expand-or-collapse)
\ fern#smart#leaf(
\ "\<Plug>(fern-action-open)",
\ "\<Plug>(fern-action-expand)",
\ "\<Plug>(fern-action-collapse)",
\ )
" Define NERDTree like mappings
nmap <buffer> t <Plug>(fern-action-open:tabedit)
nmap <buffer> T <Plug>(fern-action-open:tabedit)gT
nmap <buffer> i <Plug>(fern-action-open:split)
nmap <buffer> gi <Plug>(fern-action-open:split)<C-w>p
nmap <buffer> s <Plug>(fern-action-open:vsplit)
nmap <buffer> gs <Plug>(fern-action-open:vsplit)<C-w>p
nmap <buffer> ma <Plug>(fern-action-new-path)
nmap <buffer> <CR> <Plug>(fern-my-expand-or-collapse)
nmap <buffer> P gg
endfunction
augroup my-fern-startup
autocmd! *
autocmd FileType fern call s:init_fern()
if has('nvim')
autocmd TabNewEntered * ++nested exec 'Fern -reveal=% -drawer -stay ' . FindSessionDirectory()
endif
augroup END
" Aliases
command Header FIGlet -f Gothic
cmap W w !sudo tee > /dev/null %
nnoremap <C-e> :NERDTreeTabsToggle<CR>
" nnoremap <C-e> :NERDTreeTabsToggle<CR>
nnoremap <C-e> :exec ':Fern -reveal=% -drawer -toggle -stay ' . FindSessionDirectory()<CR>
" Colorscheme
set background=dark