-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_config.vim
101 lines (82 loc) · 2.2 KB
/
default_config.vim
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
" To install highligher, use TSInstall lange -> EX: :TSInstall all
" Custom settings
set number relativenumber
set nu rnu
set list listchars=tab:>-,trail:.,extends:>,precedes:<
set hidden
set noincsearch
" Theme
colorscheme tokyonight-night
" Lua requires
lua require('nvim-treesitter.configs').setup {}
lua require('telescope_config')
" lua require("elixir").setup()
" Nerd tree config
let NERDSpaceDelims=1
let NERDTreeShowHidden=1
nnoremap <C-l> :bnext<CR>
nnoremap <C-h> :bprev<CR>
let g:EditorConfig_exec_path = './editorconfig'
set scrolloff=10
" Theme purposes
" For Neovim 0.1.3 and 0.1.4
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
" Or if you have Neovim >= 0.1.5
if (has("termguicolors"))
set termguicolors
endif
" ALE config
let g:ale_sign_error = '❌'
let g:ale_sign_warning = '⚠️'
let g:ale_fix_on_save = 1
let g:ale_lint_on_text_changed = 0
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 1
let g:ale_linters_explicit = 1
let g:ale_linters = {
\ 'ruby': ['rubocop'],
\ 'python': ['ruff'],
\ 'javascript': ['prettier'],
\ 'typescript': ['prettier'],
\ 'vue': ['prettier'],
\ 'json': ['prettier'],
\ 'astro': ['prettier'],
\ 'sql': ['pgformatter'],
\}
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'python': ['ruff'],
\ 'ruby': ['rubocop'],
\ 'javascript': ['prettier'],
\ 'typescript': ['prettier'],
\ 'vue': ['prettier'],
\ 'json': ['prettier'],
\ 'astro': ['prettier'],
\ 'sql': ['pgformatter'],
\}
" Copy to system clipboard by default
set clipboard=unnamedplus
" For RTL texts
set arabicshape!
" Rainbow config
let g:rainbow_active = 1
" git config
set diffopt+=vertical
nmap <leader>gj :diffget //3<CR>
nmap <leader>gf :diffget //2<CR>
nmap <leader>gs :G<CR>
" YCM config
" let g:ycm_key_list_stop_completion = ['<CR>']
" inoremap <expr> <C-j> pumvisible() ? "\<C-N>" : "j"
" inoremap <expr> <C-k> pumvisible() ? "\<C-P>" : "k"
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:ycm_autoclose_preview_window_after_completion = 1
" Vagrant and rspec
set foldmethod=indent
set foldnestmax=10
" set nofoldenable
set foldlevel=2
" Theme
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme = 'atomic'
let g:airline_powerline_fonts = 1