Skip to content

Commit

Permalink
πŸ—
Browse files Browse the repository at this point in the history
  • Loading branch information
mikker committed Jan 12, 2022
1 parent e9f1626 commit 7d40219
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 52 deletions.
3 changes: 3 additions & 0 deletions bin/refresh-os
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

curl -sf "https://api.opensea.io/api/v1/asset/$1/$2/?force_update=true" > /dev/null
4 changes: 1 addition & 3 deletions brew/Brewfile.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ brew "zsh-syntax-highlighting"

tap "homebrew/services"

tap "mongodb/brew"
brew "mongodb-community"

tap "federico-terzi/espanso"
brew "espanso"

Expand All @@ -44,6 +41,7 @@ tap "homebrew/cask"
cask "acorn"
cask "airtable"
cask "appzapper"
cask "blackhole-2ch"
cask "dash"
cask "docker"
cask "dropshare"
Expand Down
5 changes: 0 additions & 5 deletions git/gitconfig-elastic.symlink

This file was deleted.

2 changes: 0 additions & 2 deletions git/gitconfig.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
helper = osxkeychain
[credential "https://github.com"]
username = mikker
[includeIf "gitdir:~/dev/elastic/"]
path = "~/.gitconfig-elastic"
[commit]
gpgsign = true
[merge]
Expand Down
24 changes: 3 additions & 21 deletions git/gitignore.symlink
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
.DS_Store
*~
.sass-cache
node_modules
jspm_packages

## Xcode specific
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

tags
tags.temp
tags.lock

artifacts/
cache/
.env
2 changes: 1 addition & 1 deletion iterm/com.googlecode.iterm2.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3414,7 +3414,7 @@
<key>Non-ASCII Anti Aliased</key>
<true/>
<key>Normal Font</key>
<string>VictorMono-SemiBold 16</string>
<string>MonoLisa-Light 16</string>
<key>Option Key Sends</key>
<integer>0</integer>
<key>Place Prompt at First Column</key>
Expand Down
4 changes: 3 additions & 1 deletion vim/vim.symlink/autoload/plug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ function! plug#begin(...)
let home = s:path(s:plug_fnamemodify(s:plug_expand(a:1), ':p'))
elseif exists('g:plug_home')
let home = s:path(g:plug_home)
elseif has('nvim')
let home = stdpath('data') . '/plugged'
elseif !empty(&rtp)
let home = s:path(split(&rtp, ',')[0]) . '/plugged'
else
Expand Down Expand Up @@ -405,7 +407,7 @@ function! plug#end()

for [map, names] in items(lod.map)
for [mode, map_prefix, key_prefix] in
\ [['i', '<C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
\ [['i', '<C-\><C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
execute printf(
\ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>',
\ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix)
Expand Down
5 changes: 3 additions & 2 deletions vim/vim.symlink/autoload/plug.vim.old
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ function! plug#end()

for [map, names] in items(lod.map)
for [mode, map_prefix, key_prefix] in
\ [['i', '<C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
\ [['i', '<C-\><C-O>', ''], ['n', '', ''], ['v', '', 'gv'], ['o', '', '']]
execute printf(
\ '%snoremap <silent> %s %s:<C-U>call <SID>lod_map(%s, %s, %s, "%s")<CR>',
\ mode, map, map_prefix, string(map), string(names), mode != 'i', key_prefix)
Expand Down Expand Up @@ -1208,7 +1208,8 @@ function! s:update_impl(pull, force, args) abort
normal! 2G
silent! redraw

let s:clone_opt = []
" Set remote name, overriding a possible user git config's clone.defaultRemoteName
let s:clone_opt = ['--origin', 'origin']
if get(g:, 'plug_shallow', 1)
call extend(s:clone_opt, ['--depth', '1'])
if s:git_version_requirement(1, 7, 10)
Expand Down
8 changes: 4 additions & 4 deletions vim/vim.symlink/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ Plug 'tomlion/vim-solidity'
Plug 'vimwiki/vimwiki'

Plug 'etdev/vim-hexcolor'
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'}

if has("nvim") && !has("gui_vimr")
Plug 'neovim/nvim-lspconfig'
Plug 'kabouzeid/nvim-lspinstall'
" Plug 'neovim/nvim-lspconfig'
" Plug 'kabouzeid/nvim-lspinstall'
" Plug 'folke/lsp-colors.nvim'
" Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-lua/completion-nvim'
" Plug 'nvim-lua/completion-nvim'
" Plug 'glepnir/lspsaga.nvim'
endif

Expand Down
137 changes: 124 additions & 13 deletions vim/vimrc.symlink
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,10 @@ let g:vrc_curl_opts = {

nnoremap <leader>F :Prettier<cr>

if has('nvim') && !has("gui_vimr")
luafile ~/.vim/lsp.lua
endif
" if has('nvim') && !has("gui_vimr")
" luafile ~/.vim/lsp.lua
" autocmd BufEnter * lua require'completion'.on_attach()
" endif

" Auto-darkmode
let output = system("is-this-dark-mode")
Expand All @@ -371,21 +372,131 @@ else
set background=light
endif

" let g:coc_global_extensions = ['coc-json', 'coc-tsserver', 'coc-css', 'coc-tailwindcss', 'coc-html', 'coc-elixir']
command! -nargs=0 Rubyfmt %!rubyfmt %

let g:coc_global_extensions = ['coc-tsserver', 'coc-css', 'coc-tailwindcss', 'coc-html']

" Use <Tab> and <S-Tab> to navigate through popup menu
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" ---- COC

" Set completeopt to have a better completion experience
set completeopt=menuone,noinsert,noselect
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300

" Avoid showing message extra message when using completion
" Don't pass messages to |ins-completion-menu|.
set shortmess+=c

command! -nargs=0 Rubyfmt %!rubyfmt %
" " Make <CR> auto-select the first completion item and notify coc.nvim to
" " format on enter, <cr> could be remapped by other vim plugin
" inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
" \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"

" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)

" GoTo code navigation.
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)

" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>

function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction

" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')

" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)

if has('nvim') && !has("gui_vimr")
autocmd BufEnter * lua require'completion'.on_attach()
" Formatting selected code.
" xmap <leader>f <Plug>(coc-format-selected)
" nmap <leader>f <Plug>(coc-format-selected)

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

" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)

" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)

" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)

" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif

" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)

" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')

" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)

" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')

" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}

" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
" nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
" nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
" nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>

0 comments on commit 7d40219

Please sign in to comment.