Last active
August 3, 2022 12:57
-
-
Save jkhoeini/e113eb08275638d739dbee65e649679d to your computer and use it in GitHub Desktop.
Revisions
-
jkhoeini revised this gist
May 29, 2019 . 2 changed files with 5 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -99,6 +99,8 @@ function! myspacevim#after() abort nnoremap <silent> K :call <SID>show_documentation()<CR> nnoremap <silent> ga :<C-u>A<CR> function! s:show_documentation() if &filetype == 'vim' execute 'h '.expand('<cword>') 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 charactersOriginal file line number Diff line number Diff line change @@ -120,3 +120,6 @@ name = "neoclide/coc-sources" [[custom_plugins]] name = "tpope/vim-obsession" [[custom_plugins]] name = "tpope/vim-projectionist" -
jkhoeini revised this gist
Apr 8, 2019 . 2 changed files with 15 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ # set spacevim theme. by default colorscheme layer is not loaded, # if you want to use more colorscheme, please load the colorscheme # layer colorscheme = "one" colorscheme_bg = "dark" # Disable guicolors in basic mode, many terminal do not support 24bit # true colors @@ -57,10 +57,12 @@ textobj = ['indent', 'line', 'entire'] [[layers]] name = 'git' [[layers]] name = 'lang#dockerfile' [[layers]] name = 'lang#elixir' [[layers]] name = 'lang#graphql' @@ -115,3 +117,6 @@ name = "jsfaint/coc-neoinclude" [[custom_plugins]] name = "neoclide/coc-sources" [[custom_plugins]] name = "tpope/vim-obsession" 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ snippet log options head function log(x) { console.log(x); return x; } -
jkhoeini revised this gist
Mar 27, 2019 . 1 changed file with 50 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -115,5 +115,54 @@ function! myspacevim#after() abort autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') augroup end unmap q set guifont='RobotoMono\ Nerd\ Font:h16' if exists('veonim') " extensions for web dev let g:vscode_extensions = [ \'vscode.typescript-language-features', \'vscode.json-language-features', \'vscode.css-language-features', \'vscode.html-language-features', \] " multiple nvim instances nno <silent> <c-t>c :Veonim vim-create<cr> nno <silent> <c-g> :Veonim vim-switch<cr> nno <silent> <c-t>, :Veonim vim-rename<cr> " workspace functions nno <silent> ,f :Veonim files<cr> nno <silent> ,e :Veonim explorer<cr> nno <silent> ,b :Veonim buffers<cr> nno <silent> ,d :Veonim change-dir<cr> "or with a starting dir: nno <silent> ,d :Veonim change-dir ~/proj<cr> " searching text nno <silent> <space>fw :Veonim grep-word<cr> vno <silent> <space>fw :Veonim grep-selection<cr> nno <silent> <space>fa :Veonim grep<cr> nno <silent> <space>ff :Veonim grep-resume<cr> nno <silent> <space>fb :Veonim buffer-search<cr> " language features nno <silent> sr :Veonim rename<cr> nno <silent> sd :Veonim definition<cr> nno <silent> si :Veonim implementation<cr> nno <silent> st :Veonim type-definition<cr> nno <silent> sf :Veonim references<cr> nno <silent> sh :Veonim hover<cr> nno <silent> sl :Veonim symbols<cr> nno <silent> so :Veonim workspace-symbols<cr> nno <silent> sq :Veonim code-action<cr> nno <silent> sk :Veonim highlight<cr> nno <silent> sK :Veonim highlight-clear<cr> nno <silent> ,n :Veonim next-usage<cr> nno <silent> ,p :Veonim prev-usage<cr> nno <silent> sp :Veonim show-problem<cr> nno <silent> <c-n> :Veonim next-problem<cr> nno <silent> <c-p> :Veonim prev-problem<cr> endif endfunction -
jkhoeini revised this gist
Mar 25, 2019 . 1 changed file with 112 additions and 112 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,119 +1,119 @@ function! myspacevim#before() abort " let g:neomake_enabled_c_makers = ['clang'] " nnoremap jk <Esc> endfunction function! myspacevim#after() abort " let g:ale_fixers = { " \ 'javascript': [ " \ 'eslint', " \ 'prettier', " \ ], " \} " " augroup fmt " autocmd! " autocmd BufWritePre * undojoin | Neoformat " augroup END let g:neoformat_enabled_javascript = [ 'prettier', 'eslint' ] let g:neoformat_enabled_json = [ 'prettier' ] let g:neoformat_enabled_graphql = [ 'prettier' ] let g:neoformat_enabled_css = [ 'prettier' ] let g:neoformat_enabled_ruby = [ 'rubocop' ] let g:neoformat_run_all_formatters = 1 " set autochdir tunmap <Esc> tmap jk <C-\><C-N> set shell=/usr/local/bin/zsh let g:coc_global_extensions = [ \ 'coc-emoji', \ 'coc-json', \ 'coc-neosnippet', \ 'coc-syntax', \ 'coc-omni', \ 'coc-tsserver', \ 'coc-html', \ 'coc-css', \ 'coc-solargraph', \ 'coc-rls', \ 'coc-yaml', \ 'coc-highlight', \ 'coc-snippets', \ 'coc-lists', \ 'coc-yank', \ 'coc-tailwindcss', \ 'coc-prettier', \ 'coc-eslint', \ ] autocmd CursorHold * silent call CocActionAsync('highlight') set cmdheight=2 set updatetime=300 inoremap <silent><expr> <TAB> \ pumvisible() ? "\<C-n>" : \ <SID>check_back_space() ? "\<TAB>" : \ coc#refresh() inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction inoremap <silent><expr> <c-space> coc#refresh() inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" nmap <silent> [d <Plug>(coc-diagnostic-prev) nmap <silent> ]d <Plug>(coc-diagnostic-next) nmap <silent> ,gd <Plug>(coc-definition) nmap <silent> ,gy <Plug>(coc-type-definition) nmap <silent> ,gi <Plug>(coc-implementation) nmap <silent> ,gr <Plug>(coc-references) nmap <silent> ,r <Plug>(coc-rename) vmap <silent> ,= <Plug>(coc-format-selected) nmap <silent> ,= <Plug>(coc-format-selected) vmap <silent> ,a <Plug>(coc-codeaction-selected) nmap <silent> ,a <Plug>(coc-codeaction-selected) nmap <silent> ,ac <Plug>(coc-codeaction) nmap <silent> ,f <Plug>(coc-fix-current) command! -nargs=0 Format :call CocAction('format') command! -nargs=? Fold :call CocAction('fold', <f-args>) nnoremap <silent> <space>cca :<C-u>CocList diagnostics<cr> nnoremap <silent> <space>cce :<C-u>CocList extensions<cr> nnoremap <silent> <space>ccc :<C-u>CocList commands<cr> nnoremap <silent> <space>cco :<C-u>CocList outline<cr> nnoremap <silent> <space>ccs :<C-u>CocList -I symbols<cr> nnoremap <silent> <space>ccj :<C-u>CocNext<CR> nnoremap <silent> <space>cck :<C-u>CocPrev<CR> nnoremap <silent> <space>ccp :<C-u>CocListResume<CR> nnoremap <silent> K :call <SID>show_documentation()<CR> function! s:show_documentation() if &filetype == 'vim' execute 'h '.expand('<cword>') else call CocAction('doHover') endif endfunction augroup mygroup autocmd! " Setup formatexpr specified filetype(s). autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') " Update signature help on jump placeholder autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') augroup end endfunction -
jkhoeini revised this gist
Mar 25, 2019 . 2 changed files with 166 additions and 30 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,119 @@ function! myspacevim#before() abort " let g:neomake_enabled_c_makers = ['clang'] " nnoremap jk <Esc> endfunction function! myspacevim#after() abort " let g:ale_fixers = { " \ 'javascript': [ " \ 'eslint', " \ 'prettier', " \ ], " \} " " augroup fmt " autocmd! " autocmd BufWritePre * undojoin | Neoformat " augroup END let g:neoformat_enabled_javascript = [ 'prettier', 'eslint' ] let g:neoformat_enabled_json = [ 'prettier' ] let g:neoformat_enabled_graphql = [ 'prettier' ] let g:neoformat_enabled_css = [ 'prettier' ] let g:neoformat_enabled_ruby = [ 'rubocop' ] let g:neoformat_run_all_formatters = 1 " set autochdir tunmap <Esc> tmap jk <C-\><C-N> set shell=/usr/local/bin/zsh let g:coc_global_extensions = [ \ 'coc-emoji', \ 'coc-json', \ 'coc-neosnippet', \ 'coc-syntax', \ 'coc-omni', \ 'coc-tsserver', \ 'coc-html', \ 'coc-css', \ 'coc-solargraph', \ 'coc-rls', \ 'coc-yaml', \ 'coc-highlight', \ 'coc-snippets', \ 'coc-lists', \ 'coc-yank', \ 'coc-tailwindcss', \ 'coc-prettier', \ 'coc-eslint', \ ] autocmd CursorHold * silent call CocActionAsync('highlight') set cmdheight=2 set updatetime=300 inoremap <silent><expr> <TAB> \ pumvisible() ? "\<C-n>" : \ <SID>check_back_space() ? "\<TAB>" : \ coc#refresh() inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction inoremap <silent><expr> <c-space> coc#refresh() inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" nmap <silent> [d <Plug>(coc-diagnostic-prev) nmap <silent> ]d <Plug>(coc-diagnostic-next) nmap <silent> ,gd <Plug>(coc-definition) nmap <silent> ,gy <Plug>(coc-type-definition) nmap <silent> ,gi <Plug>(coc-implementation) nmap <silent> ,gr <Plug>(coc-references) nmap <silent> ,r <Plug>(coc-rename) vmap <silent> ,= <Plug>(coc-format-selected) nmap <silent> ,= <Plug>(coc-format-selected) vmap <silent> ,a <Plug>(coc-codeaction-selected) nmap <silent> ,a <Plug>(coc-codeaction-selected) nmap <silent> ,ac <Plug>(coc-codeaction) nmap <silent> ,f <Plug>(coc-fix-current) command! -nargs=0 Format :call CocAction('format') command! -nargs=? Fold :call CocAction('fold', <f-args>) nnoremap <silent> <space>cca :<C-u>CocList diagnostics<cr> nnoremap <silent> <space>cce :<C-u>CocList extensions<cr> nnoremap <silent> <space>ccc :<C-u>CocList commands<cr> nnoremap <silent> <space>cco :<C-u>CocList outline<cr> nnoremap <silent> <space>ccs :<C-u>CocList -I symbols<cr> nnoremap <silent> <space>ccj :<C-u>CocNext<CR> nnoremap <silent> <space>cck :<C-u>CocPrev<CR> nnoremap <silent> <space>ccp :<C-u>CocListResume<CR> nnoremap <silent> K :call <SID>show_documentation()<CR> function! s:show_documentation() if &filetype == 'vim' execute 'h '.expand('<cword>') else call CocAction('doHover') endif endfunction augroup mygroup autocmd! " Setup formatexpr specified filetype(s). autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') " Update signature help on jump placeholder autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') augroup end endfunction 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 charactersOriginal file line number Diff line number Diff line change @@ -8,37 +8,38 @@ # All SpaceVim option below [option] section [options] # set spacevim theme. by default colorscheme layer is not loaded, # if you want to use more colorscheme, please load the colorscheme # layer colorscheme = "onedark" colorscheme_bg = "dark" # Disable guicolors in basic mode, many terminal do not support 24bit # true colors enable_guicolors = true # Disable statusline separator, if you want to use other value, please # install nerd fonts statusline_separator = "arrow" statusline_inactive_separator = "arrow" buffer_index_type = 4 enable_tabline_filetype_icon = true enable_statusline_mode = false autocomplete_method = "coc" enable_neomake = false enable_ale = true lint_on_the_fly = true bootstrap_before = "myspacevim#before" bootstrap_after = "myspacevim#after" filemanager = "nerdtree" enable_vimfiler_gitstatus = true disabled_plugins = ["vim-signify"] [[layers]] name = 'autocomplete' auto-completion-return-key-behavior = "complete" auto-completion-tab-key-behavior = "smart" # [layers.override_cmd] # ruby = ['solargraph', 'stdio'] # typescript = ['typescript-language-server', '--stdio'] [[layers]] name = "checkers" @@ -56,6 +57,7 @@ textobj = ['indent', 'line', 'entire'] [[layers]] name = 'git' [[layers]] name = 'lang#dockerfile' @@ -78,9 +80,9 @@ repl_command = "pry" [[layers]] name = 'lang#typescript' # [[layers]] # name = 'lsp' # filetypes = [ "javascript", "typescript", "css", "ruby" ] [[layers]] name = 'shell' @@ -98,3 +100,18 @@ name = 'VersionControl' [[custom_plugins]] name = "tpope/vim-vinegar" [[custom_plugins]] name = "mhartington/oceanic-next" [[custom_plugins]] name = "fenetikm/falcon" [[custom_plugins]] name = "airblade/vim-gitgutter" [[custom_plugins]] name = "jsfaint/coc-neoinclude" [[custom_plugins]] name = "neoclide/coc-sources" -
jkhoeini created this gist
Mar 12, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,100 @@ #============================================================================= # dark_powered.toml --- dark powered configuration example for SpaceVim # Copyright (c) 2016-2017 Wang Shidong & Contributors # Author: Wang Shidong < wsdjeg at 163.com > # URL: https://spacevim.org # License: GPLv3 #============================================================================= # All SpaceVim option below [option] section [options] # set spacevim theme. by default colorscheme layer is not loaded, # if you want to use more colorscheme, please load the colorscheme # layer colorscheme = "gruvbox" colorscheme_bg = "dark" # Disable guicolors in basic mode, many terminal do not support 24bit # true colors enable_guicolors = true # Disable statusline separator, if you want to use other value, please # install nerd fonts statusline_separator = "arrow" statusline_inactive_separator = "arrow" buffer_index_type = 4 enable_tabline_filetype_icon = true enable_statusline_mode = false autocomplete_method = "coc" enable_neomake = false enable_ale = true lint_on_the_fly = true bootstrap_before = "myspacevim#before" bootstrap_after = "myspacevim#after" filemanager = "nerdtree" # Enable autocomplete layer [[layers]] name = 'autocomplete' auto-completion-return-key-behavior = "complete" auto-completion-tab-key-behavior = "smart" [layers.override_cmd] ruby = ['solargraph', 'stdio'] typescript = ['typescript-language-server', '--stdio'] [[layers]] name = "checkers" [[layers]] name = 'colorscheme' [[layers]] name = 'denite' [[layers]] name = 'edit' textobj = ['indent', 'line', 'entire'] [[layers]] name = 'git' [[layers]] name = 'lang#dockerfile' [[layers]] name = 'lang#graphql' [[layers]] name = 'lang#html' [[layers]] name = 'lang#javascript' [[layers]] name = 'lang#markdown' [[layers]] name = 'lang#ruby' repl_command = "pry" [[layers]] name = 'lang#typescript' [[layers]] name = 'lsp' filetypes = [ "javascript", "typescript", "css", "ruby" ] [[layers]] name = 'shell' default_position = 'top' default_height = 30 [[layers]] name = 'sudo' [[layers]] name = 'tmux' [[layers]] name = 'VersionControl' [[custom_plugins]] name = "tpope/vim-vinegar"