Last active
June 30, 2022 05:35
-
-
Save rorisme/610baca6e959feb460fb75282a3e653c to your computer and use it in GitHub Desktop.
Neovim config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lua require('plugins') | |
:set number | |
:set autoindent | |
:set tabstop=2 | |
:set shiftwidth=2 | |
:set expandtab | |
:set smartindent | |
:set mouse=a | |
let g:ale_disable_lsp = 1 | |
call plug#begin() | |
Plug 'tpope/vim-surround' " Surrounding ysw) | |
Plug 'tpope/vim-commentary' " For Commenting gcc & gc | |
Plug 'vim-airline/vim-airline' " Status bar | |
Plug 'ap/vim-css-color' " CSS Color Preview | |
Plug 'rafi/awesome-vim-colorschemes' " Retro Scheme | |
Plug 'neoclide/coc.nvim' " Auto Completion | |
Plug 'ryanoasis/vim-devicons' " Developer Icons | |
Plug 'preservim/tagbar' " Tagbar for code navigation | |
Plug 'Yggdroot/indentLine' | |
Plug 'alvan/vim-closetag' | |
Plug 'Townk/vim-autoclose' | |
Plug 'prettier/vim-prettier', { 'do': 'yarn install --frozen-lockfile --production' } | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'tpope/vim-eunuch' | |
Plug 'dense-analysis/ale' | |
Plug 'dyng/ctrlsf.vim' | |
Plug 'junegunn/fzf.vim' | |
Plug 'pechorin/any-jump.vim' | |
Plug 'ntpeters/vim-better-whitespace' | |
Plug 'glepnir/oceanic-material' | |
Plug 'preservim/nerdcommenter' | |
Plug 'mg979/vim-visual-multi', {'branch': 'master'} | |
set encoding=UTF-8 | |
call plug#end() | |
nnoremap <C-l> :call CocActionAsync('jumpDefinition')<CR> | |
nnoremap <C-j> :m .+1<CR>== | |
nnoremap <C-k> :m .-2<CR>== | |
inoremap <C-j> <Esc>:m .+1<CR>==gi | |
inoremap <C-k> <Esc>:m .-2<CR>==gi | |
vnoremap <C-j> :m '>+1<CR>gv=gv | |
vnoremap <C-k> :m '<-2<CR>gv=gv | |
nmap <F8> :TagbarToggle<CR> | |
imap jj <Esc> | |
imap jk <Esc> | |
:colorscheme nord " nord gruvbox | |
:set guifont=DankMono\ Nerd\ Font\ Mono:h18 | |
:nmap <space>e <Cmd>CocCommand explorer<CR> | |
" air-line | |
let g:airline_powerline_fonts = 1 | |
if !exists('g:airline_symbols') | |
let g:airline_symbols = {} | |
endif | |
" airline symbols | |
let g:airline_left_sep = '' | |
let g:airline_left_alt_sep = '' | |
let g:airline_right_sep = '' | |
let g:airline_right_alt_sep = '' | |
let g:airline_symbols.branch = '' | |
let g:airline_symbols.readonly = '' | |
let g:airline_symbols.linenr = '' | |
inoremap <expr> <Tab> pumvisible() ? coc#_select_confirm() : "<Tab>" | |
" filenames like *.xml, *.html, *.xhtml, ... | |
" These are the file extensions where this plugin is enabled. | |
" | |
let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.jsx,*.tsx' | |
" filenames like *.xml, *.xhtml, ... | |
" This will make the list of non-closing tags self-closing in the specified files. | |
" | |
let g:closetag_xhtml_filenames = '*.xhtml,*.jsx,*.tsx' | |
" filetypes like xml, html, xhtml, ... | |
" These are the file types where this plugin is enabled. | |
" | |
let g:closetag_filetypes = 'html,xhtml,phtml,jsx,tsx' | |
" filetypes like xml, xhtml, ... | |
" This will make the list of non-closing tags self-closing in the specified files. | |
" | |
let g:closetag_xhtml_filetypes = 'xhtml,jsx,tsx' | |
" integer value [0|1] | |
" This will make the list of non-closing tags case-sensitive (e.g. `<Link>` will be closed while `<link>` won't.) | |
" | |
let g:closetag_emptyTags_caseSensitive = 1 | |
" dict | |
" Disables auto-close if not in a "valid" region (based on filetype) | |
" | |
let g:closetag_regions = { | |
\ 'typescript.tsx': 'jsxRegion,tsxRegion', | |
\ 'javascript.jsx': 'jsxRegion', | |
\ 'typescriptreact': 'jsxRegion,tsxRegion', | |
\ 'javascriptreact': 'jsxRegion', | |
\ } | |
" Shortcut for closing tags, default is '>' | |
" | |
let g:closetag_shortcut = '>' | |
" Add > at current position without closing the current tag, default is '' | |
" | |
let g:closetag_close_shortcut = '<leader>>' | |
" Ale configuration | |
" Fix files with prettier, and then ESLint. | |
let g:ale_fixers = { | |
\ '*': ['remove_trailing_lines', 'trim_whitespace'], | |
\ 'javascript': ['prettier', 'eslint'], | |
\ 'typescript': ['prettier', 'eslint'], | |
\} | |
" Set this variable to 1 to fix files when you save them. | |
let g:ale_fix_on_save = 1 | |
" Only run linters named in ale_linters settings. | |
let g:ale_linters_explicit = 1 | |
" Keep the sign gutter always open | |
let g:ale_sign_column_always = 1 | |
" coc config | |
let g:coc_global_extensions = [ | |
\ 'coc-snippets', | |
\ 'coc-pairs', | |
\ 'coc-tsserver', | |
\ 'coc-eslint', | |
\ 'coc-prettier', | |
\ 'coc-json', | |
\ 'coc-explorer', | |
\ ] | |
" Indent line | |
let g:indentLine_char = '▏' | |
" Neovim | |
let g:neovide_cursor_vfx_mode = "pixiedust" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment