all repos

dotfiles @ 43b3ba3aaa6835036b8c90a5dd8a25456cf2314d

my dotfiles

config/nvim/init.vim (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
call plug#begin('~/.vim/plugged')
  " Plug 'Smirnov-O/nten.vim'
  Plug 'projekt0n/github-nvim-theme'
  Plug 'hoob3rt/lualine.nvim'
  Plug 'romgrk/barbar.nvim'
  Plug 'b3nj5m1n/kommentary'
  Plug 'jiangmiao/auto-pairs'
  Plug 'nvim-lua/plenary.nvim'
  " Files
  Plug 'junegunn/fzf.vim', {'on': ['Files', 'GFiles']}
  " Plug 'kyazdani42/nvim-tree.lua', {'on': 'NvimTreeToggle'}
  " Syntax
  Plug 'sheerun/vim-polyglot'
  Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
  " Completion
  Plug 'neovim/nvim-lspconfig'
  Plug 'hrsh7th/nvim-compe'
  Plug 'kabouzeid/nvim-lspinstall'
  " Git
  Plug 'lewis6991/gitsigns.nvim'
  " Plug 'TimUntersberger/neogit'
call plug#end()

" colo codedark
let mapleader=";"

"== Config
set termguicolors        " GUI colors
set nu rnu nocul         " Line numbers & cursor line highlight
set nolbr nowrap         " Line wrap
set mouse=a mh           " Mouse
set history=500          " Set history size
set autoread             " Auto read file on change
set hidden               " Change buffet without warning
set visualbell t_vb=     " Disable sounds
set pumheight=8          " Maximum items in pop up
set modeline             " Enable modeline
set nosmd                " Disable show mode
set nobk noswf noudf     " Swap files
set is ic scs            " Search
set spr                  " Split
set enc=utf-8 fenc=utf-8 " Encoding
set scrolloff=3          " Scroll padding
set list listchars=tab:\|·,trail:~,space:·
set completeopt=menuone,noselect

"== Netrw file tree
let g:netrw_liststyle = 3
let g:netrw_banner = 0
let g:netrw_dirhistmax = 0

"== Tab(or spaces)
set ts=4 sw=4 sts=4
set sta et ai

"== Custom commands
com! Prettier :sil !prettier -w %
com! Term  :vs|winc L|se nonu nornu|start|term
com! GoFmt :sil !gofmt -w %
com! Black :sil !black %

"== Filetypes
au FileType go setl noet
au FileType javascript,yaml,json setl et ts=2 sw=2 sts=4
au FileType python setl et ts=4 sw=4 sts=4 ai
autocmd BufReadPost,FileReadPost lua require "lsp_signature".on_attach()


"== Config's
lua require'config'
so $HOME/.config/nvim/vimscript/barbar.vim
so $HOME/.config/nvim/vimscript/mappings.vim