From 860747910a628aa98d7f267f1d3d2fa50cdfeb26 Mon Sep 17 00:00:00 2001 From: miguel Date: Mon, 14 Jun 2021 19:35:42 +0200 Subject: renamed to init.vim and added some more config --- vim-new/init.vim | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ vim-new/vimrc | 166 --------------------------------------------- 2 files changed, 201 insertions(+), 166 deletions(-) create mode 100644 vim-new/init.vim delete mode 100644 vim-new/vimrc diff --git a/vim-new/init.vim b/vim-new/init.vim new file mode 100644 index 0000000..a663f6c --- /dev/null +++ b/vim-new/init.vim @@ -0,0 +1,201 @@ +" Miguel's Fresh Neovim Config +" 29th Apr 2021 - 02nd June 2021 + +" {{{ vim-plug +call plug#begin('~/.vim/plugged') + +Plug 'tpope/vim-sensible' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-surround' +Plug 'tpope/vim-unimpaired' +Plug 'tpope/vim-vinegar' +Plug 'tpope/vim-fugitive' +Plug 'tpope/vim-dispatch' + +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } +Plug 'junegunn/fzf.vim' + +Plug 'airblade/vim-gitgutter' +Plug 'nelstrom/vim-visual-star-search' +Plug 'majutsushi/tagbar' + +Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } + +Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' } + +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' + +" Plug 'rafi/awesome-vim-colorschemes' +Plug 'jnurmine/Zenburn' + +" haskell related +Plug 'neovimhaskell/haskell-vim' +Plug 'alx741/vim-stylishask' +Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' } + +call plug#end() +" }}} + +" 256 colorscheme +colorscheme zenburn + +" {{{ misc +set nocompatible +" set cursorcolumn +set cursorline +set foldmethod=marker +set nowrap +set showcmd +set number relativenumber +set hidden +set colorcolumn=73 +set backspace=2 +" }}} + + +" disable preview window on autocompletion +set completeopt-=preview + +set updatetime=300 +set signcolumn=yes + +" set mouse=a + +syntax on + +" detect type and autoload plugin and indent files +filetype plugin indent on + +let g:deoplete#enable_at_startup = 1 + +let g:airline_theme='wombat' +let g:airline_powerline_fonts = 1 + +nnoremap :call LanguageClient_contextMenu() +let g:LanguageClient_serverCommands = { 'haskell': ['haskell-language-server-wrapper', '--lsp'] } +let g:LanguageClient_codeLensDisplay = { "virtualTexthl": "SpellRare" } +let g:LanguageClient_diagnosticsDisplay = +\ { +\ 1: { +\ "name": "Error", +\ "texthl": "LanguageClientError", +\ "signText": "x", +\ "signTexthl": "LanguageClientErrorSign", +\ "virtualTexthl": "SpellRare", +\ }, +\ 2: { +\ "name": "Warning", +\ "texthl": "LanguageClientError", +\ "signText": "!", +\ "signTexthl": "LanguageClientWarningSign", +\ "virtualTexthl": "SpellRare", +\ }, +\ 3: { +\ "name": "Information", +\ "texthl": "LanguageClientError", +\ "signText": "i", +\ "signTexthl": "LanguageClientInfoSign", +\ "virtualTexthl": "SpellRare", +\ }, +\ 4: { +\ "name": "Hint", +\ "texthl": "LanguageClientError", +\ "signText": ">", +\ "signTexthl": "LanguageClientInfoSign", +\ "virtualTexthl": "SpellRare", +\ }, +\ } + + +let g:haskell_enable_quantification = 1 " to enable highlighting of `forall` +let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec` +let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc` +let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern` +let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles +let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static` +let g:haskell_backpack = 1 " to enable highlighting of backpack keywords + +" {{{ tabs +set listchars=tab:>.,trail:~ +set list +set tabstop=8 +set expandtab +set softtabstop=4 +set shiftwidth=4 +set shiftround +" }}} + +" {{{ folding +set foldcolumn=5 +set foldlevelstart=0 +" }}} + +" {{{ search +set hlsearch +set incsearch +set ignorecase +set smartcase +" }}} + +" {{{ match brackets +set showmatch +set matchtime=5 +" }}} + +" {{{ KEY BINDINGS +" mapleader +" use but remap to _ so it is visible for 'showcmd' +nmap _ +let mapleader="\_" +let maplocalleader="\_" + +" get rid of bad habits. (might break other stuff eg. in cygwin) +" inoremap +" inoremap +" inoremap +" inoremap +" inoremap + +" activate 'very magic' for searches automatically +nnoremap / /\v +nnoremap ? ?\v + +" alt esc +inoremap jk +cnoremap jk + +" easy editing and sourcing of vimrc +" nnoremap sv :source $MYVIMRC +nnoremap ev :e $MYVIMRC + +" turn off search highlight +nnoremap h :nohlsearch + +" layout +"nnoremap ln :NERDTreeToggle + +" silver search +"noremap a :Ack! + +" show list if multiple ctrl-] matches +nnoremap g +augroup filetype_haskell + autocmd! + autocmd Filetype haskell nnoremap :call LanguageClient#textDocument_definition() + autocmd Filetype haskell nnoremap i :call LanguageClient#textDocument_hover() +augroup END + +" ctrl-space auto complete in insert mode +inoremap + +" FZF settings +nmap f :Files| " fuzzy find files in the working directory (where you launched Vim from) +nmap / :BLines| " fuzzy find lines in the current file +nmap b :Buffers| " fuzzy find an open buffer +nmap a :Rg | " fuzzy find text in the working directory +nmap c :Commands| " fuzzy find Vim commands (like Ctrl-Shift-P in Sublime/Atom/VSC) +nmap t :Tags| " fuzzy find tags +" }}} +" +let g:fzf_layout = { 'down': '~40%' } diff --git a/vim-new/vimrc b/vim-new/vimrc deleted file mode 100644 index 7ab0e1b..0000000 --- a/vim-new/vimrc +++ /dev/null @@ -1,166 +0,0 @@ -" Miguel's Fresh Neovim Config -" 29th Apr 2021 - 02nd June 2021 - -" {{{ vim-plug -call plug#begin('~/.vim/plugged') - -Plug 'tpope/vim-sensible' -Plug 'tpope/vim-commentary' -Plug 'tpope/vim-surround' -Plug 'tpope/vim-unimpaired' -Plug 'tpope/vim-vinegar' -Plug 'tpope/vim-fugitive' -Plug 'tpope/vim-dispatch' - -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' - -Plug 'airblade/vim-gitgutter' -Plug 'nelstrom/vim-visual-star-search' -Plug 'majutsushi/tagbar' - -Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } - -Plug 'autozimu/LanguageClient-neovim', { 'branch': 'next', 'do': 'bash install.sh' } - -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' - -" Plug 'rafi/awesome-vim-colorschemes' -Plug 'jnurmine/Zenburn' - -" haskell related -Plug 'neovimhaskell/haskell-vim' -Plug 'alx741/vim-stylishask' -Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' } - -call plug#end() -" }}} - -" 256 colorscheme -colorscheme zenburn - -" {{{ misc -set nocompatible -" set cursorcolumn -set cursorline -set foldmethod=marker -set nowrap -set showcmd -set number relativenumber -set hidden -set colorcolumn=73 -set backspace=2 -" }}} - - -" disable preview window on autocompletion -set completeopt-=preview - -set updatetime=300 -set signcolumn=yes - -" set mouse=a - -syntax on - -" detect type and autoload plugin and indent files -filetype plugin indent on - -let g:deoplete#enable_at_startup = 1 - -let g:airline_theme='wombat' -let g:airline_powerline_fonts = 1 - -nnoremap :call LanguageClient_contextMenu() -let g:LanguageClient_serverCommands = { 'haskell': ['haskell-language-server-wrapper', '--lsp'] } - -let g:haskell_enable_quantification = 1 " to enable highlighting of `forall` -let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec` -let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc` -let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern` -let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles -let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static` -let g:haskell_backpack = 1 " to enable highlighting of backpack keywords - -" {{{ tabs -set listchars=tab:>.,trail:~ -set list -set tabstop=8 -set expandtab -set softtabstop=4 -set shiftwidth=4 -set shiftround -" }}} - -" {{{ folding -set foldcolumn=5 -set foldlevelstart=0 -" }}} - -" {{{ search -set hlsearch -set incsearch -set ignorecase -set smartcase -" }}} - -" {{{ match brackets -set showmatch -set matchtime=5 -" }}} - -" {{{ KEY BINDINGS -" mapleader -" use but remap to _ so it is visible for 'showcmd' -nmap _ -let mapleader="\_" -let maplocalleader="\_" - -" get rid of bad habits. (might break other stuff eg. in cygwin) -" inoremap -" inoremap -" inoremap -" inoremap -" inoremap - -" activate 'very magic' for searches automatically -nnoremap / /\v -nnoremap ? ?\v - -" alt esc -inoremap jk -cnoremap jk - -" easy editing and sourcing of vimrc -" nnoremap sv :source $MYVIMRC -nnoremap ev :e $MYVIMRC - -" turn off search highlight -nnoremap h :nohlsearch - -" layout -"nnoremap ln :NERDTreeToggle - -" silver search -"noremap a :Ack! - -" show list if multiple ctrl-] matches -nnoremap g -augroup filetype_haskell - autocmd! - autocmd Filetype haskell nnoremap :call LanguageClient#textDocument_definition() - autocmd Filetype haskell nnoremap i :call LanguageClient#textDocument_hover() -augroup END - -" ctrl-space auto complete in insert mode -inoremap - -" FZF settings -nmap f :Files| " fuzzy find files in the working directory (where you launched Vim from) -nmap / :BLines| " fuzzy find lines in the current file -nmap b :Buffers| " fuzzy find an open buffer -nmap a :Rg | " fuzzy find text in the working directory -nmap c :Commands| " fuzzy find Vim commands (like Ctrl-Shift-P in Sublime/Atom/VSC) -nmap t :Tags| " fuzzy find tags -" }}} -- cgit v1.2.3