summaryrefslogtreecommitdiff
path: root/nvim/init.vim
diff options
context:
space:
mode:
authormono-b <monoblanco@DRAINERDOMAIN.localdomain>2022-12-26 04:08:53 -0300
committermono-b <monoblanco@DRAINERDOMAIN.localdomain>2022-12-26 04:08:53 -0300
commit8dc8f2d52338fd87e7763995e6732f5a295300e8 (patch)
tree56ea8a124b9a81e42251ffa1be92ad6475d7bef3 /nvim/init.vim
huh
Diffstat (limited to 'nvim/init.vim')
-rw-r--r--nvim/init.vim89
1 files changed, 89 insertions, 0 deletions
diff --git a/nvim/init.vim b/nvim/init.vim
new file mode 100644
index 0000000..0aa9c34
--- /dev/null
+++ b/nvim/init.vim
@@ -0,0 +1,89 @@
+set nocompatible
+
+" vim-plugged
+call plug#begin()
+ Plug 'itchyny/lightline.vim'
+ Plug 'junegunn/goyo.vim'
+ Plug 'mattn/emmet-vim'
+ Plug 'neoclide/coc.nvim', {'branch': 'release'}
+ Plug 'preservim/nerdtree'
+ Plug 'ryanoasis/vim-devicons'
+ Plug 'bluz71/vim-nightfly-guicolors'
+ Plug 'morhetz/gruvbox'
+ Plug 'dylanaraps/wal.vim'
+call plug#end()
+
+" Lightline Integration
+ let g:lightline = {'colorscheme': 'nightfly'}
+
+" General
+ set laststatus=2
+ set encoding=UTF-8
+ set bg=dark
+ syntax on
+ set nohlsearch
+ set cursorline
+ set incsearch
+ set clipboard=unnamedplus
+ set tabstop=4
+ set softtabstop=4
+ set shiftwidth=4
+ set expandtab
+ set autoindent
+ set fileformat=unix
+ set number
+ set relativenumber
+ set nowrap
+ set noswapfile
+ set noshowmode
+ set incsearch
+ set scrolloff=8
+
+colorscheme wal
+
+" Autoload
+augroup remember_folds
+ autocmd!
+ autocmd BufWinLeave * mkview
+ autocmd BufWinEnter * silent! loadview
+augroup END
+
+
+" Keymaps
+ let mapleader = " "
+ vnoremap <C-c> "+y
+ map <C-p> "+P
+ let g:user_emmet_leader_key=','
+ map <leader>h :wincmd h<CR>
+ map <leader>j :wincmd j<CR>
+ map <leader>k :wincmd k<CR>
+ map <leader>l :wincmd l<CR>
+ nnoremap <leader>nt :NERDTreeToggle %:p:h<CR>
+
+" NERDTree
+ map <F2> :NERDTreeToggle<CR>
+ nnoremap <leader>nt :NERDTree %:p:h<CR>
+
+" Goyo
+ nnoremap <leader>g :Goyo<CR>
+
+function! s:goyo_enter()
+ set linebreak
+ set spell spelllang=en_us
+ HexokinaseTurnOff
+endfunction
+
+function! s:goyo_leave()
+ set nolinebreak
+ set nolinebreak
+ HexokinaseTurnOn
+endfunction
+
+" CoC
+" Tab navigation and confirmation
+inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
+inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>" Tab autocompletion
+inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
+
+" Remove Whitespaces After Closing File
+autocmd BufWritePre *.sh :%s/\s\+$//e