Skip to content

Commit

Permalink
feat: shrink image size & rm bloat coc-ext
Browse files Browse the repository at this point in the history
added steps in the dockerfile to get rid of large folders only needed for initial building. Also removed html and import-cost coc extensions, as they were quite heavy, and unlikely to be used much by me.
  • Loading branch information
D-Nice committed Dec 25, 2019
1 parent d435db6 commit 6fba7e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 205 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ RUN set -ex \
+qa \
&& nvim --headless +CocUpdate \
# TODO find more elegant way over 2 minute sleep
& sleep 120
& sleep 120 \
&& rm -rf /root/.npm/_cacache

ENV PATH="/root/.nimble/bin:${PATH}"
RUN set -ex \
&& curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y \
&& nimble install nimlsp -y
nimble install nimlsp -y \
&& rm -rf /root/.choosenim/toolchains/nim-*/c_code
# post-install patch

COPY ./etc/patch /root
Expand Down
203 changes: 0 additions & 203 deletions etc/init/.config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ call plug#end()
" Define Coc Extensions Here
let g:coc_global_extensions = ['coc-tsserver',
\'coc-json',
\'coc-html',
\'coc-css' ,
\'coc-python',
\'coc-yaml',
Expand All @@ -50,7 +49,6 @@ let g:coc_global_extensions = ['coc-tsserver',
\'coc-tabnine',
\'coc-gitignore',
\'coc-pairs',
\'coc-import-cost',
\'coc-sh',
\'coc-terminal',
\'coc-docker',
Expand Down Expand Up @@ -213,204 +211,3 @@ endfunction
autocmd CursorHold * call s:AutoToggleLocList()
autocmd QuitPre * if empty(&bt) | lclose | endif
let g:coc_enable_locationlist = 0

"set nocompatible
"call plug#begin('~/.vim/plugged')
"
"" Aesthetics
"Plug 'vim-airline/vim-airline' " powerline status theme
"Plug 'dylanaraps/wal.vim' " pywal color integration
"
"" LSP/coc
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
"
"" Git
"Plug 'airblade/vim-gitgutter' " track git changes
"
"" NERDTree
"Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
"Plug 'jistr/vim-nerdtree-tabs'
"Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' }
"
"" Quality of Life
"Plug 'Raimondi/delimitMate' " auto delimiter for quotes etc
"Plug 'tpope/vim-surround' " bindings for surrounding text
"Plug 'tpope/vim-repeat' " repeat plugin cmd and not just native cmd
"Plug 'christoomey/vim-tmux-navigator' " enable C+hjkl nav between split buffers
"Plug 'easymotion/vim-easymotion' " improved motions
"Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
"Plug 'junegunn/fzf.vim'
"
"" Initialize plugin system
"call plug#end()
"
"" Define Coc Extensions Here
"let g:coc_global_extensions = ['coc-tsserver',
" \'coc-json',
" \'coc-html',
" \'coc-css' ,
" \'coc-python',
" \'coc-yaml',
" \'coc-highlight',
" \'coc-emmet',
" \'coc-lists',
" \'coc-git',
" \'coc-yank',
" \'coc-markdownlint',
" \'coc-tabnine',
" \'coc-gitignore',
" \'coc-pairs',
" \'coc-import-cost',
" \'coc-sh',
" \'coc-terminal',
" \'coc-docker',
" \'coc-github',
" \'coc-snippets',
" \'https://github.com/xabikos/vscode-javascript',
" \]
"
"" remap leader to space
"" TODO may need something to stop space happening in normal mode etc...
"let mapleader = "\<Space>"
"
"set clipboard^=unnamed,unnamedplus
"set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab
"set nopaste
"set number
"set mouse=a
"set encoding=UTF-8
"syntax on
"
"colorscheme wal
"
"" vim-airline
"let g:airline_powerline_fonts = 1
"let g:airline#extensions#tabline#enabled = 1
"let g:airline#extensions#branch#enabled = 1
"let g:airline#extensions#whitespace#enabled = 1
"let g:airline#extensions#hunks#non_zero_only = 1
"let g:airline_detect_paste=1
"let g:airline#extensions#tabline#enabled = 1
"set laststatus=2
"
"" NERDTree
"let g:NERDTreeWinSize=24
"map <S-j> :tabn<CR>
"map <S-k> :tabp<CR>
"map <C-n> :tabnew<CR>
"map <F8> :NERDTreeToggle<CR>
"
"" vimgutter
"if exists("*GitGutterGetHunkSummary")
" function! GitStatus()
" return join(filter(map(['A','M','D'], {i,v -> v.': '.GitGutterGetHunkSummary()[i]}), 'v:val[-1:]'), ' ')
" endfunction
" set statusline+=%{GitStatus()}
"endif
"let g:gitgutter_highlight_linenrs = 1
"" use preview window instead of floating
"let g:gitgutter_preview_win_floating = 0
"
"" Autoremove any dnagling endlines
"" Credit: https://stackoverflow.com/a/15994331/8453393
"" Restore cursor position, window position, and last search after running a
"" command.
"function! Preserve(command)
" " Save the last search.
" let search = @/
" " Save the current cursor position.
" let cursor_position = getpos('.')
" " Save the current window position.
" normal! H
" let window_position = getpos('.')
" call setpos('.', cursor_position)
" " Execute the command.
" execute a:command
" " Restore the last search.
" let @/ = search
" " Restore the previous window position.
" call setpos('.', window_position)
" normal! zt
" " Restore the previous cursor position.
" call setpos('.', cursor_position)
"endfunction
"function! RemoveDanglingEndlines()
" call Preserve('%s/\s\+$//e')
"endfunction
"
"" LSP
"" coc.vim
""
"" Pywal compatibility colors
"" With highly contrasting red for errors always
"hi PMenu ctermbg=Black ctermfg=14
"hi CocErrorSign ctermfg=160
"hi link CocErrorLine CocErrorSign
"
"inoremap <silent><expr> <TAB>
" \ pumvisible() ? "\<C-n>" :
" \ <SID>check_back_space() ? "\<TAB>" :
" \ coc#refresh()
"inoremap <silent><expr> <S-Tab>
" \ pumvisible() ? "\<C-p>" :
" \ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
" \ coc#refresh()
"function! s:check_back_space() abort
" let col = col('.') - 1
" return !col || getline('.')[col - 1] =~# '\s'
"endfunction
"let g:coc_snippet_next = '<tab>'
"let g:coc_snippet_prev = '<s-tab>'
"inoremap <silent><expr> <c-space>
" \ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
" \ coc#refresh()
"inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<CR>"
"
"
"let g:airline#extensions#coc#enabled = 1
"
"nmap gd <Plug>(coc-definition)
"nmap gy <Plug>(coc-type-definition)
"nmap gi <Plug>(coc-implementation)
"nmap gr <Plug>(coc-references)
"nmap [a <Plug>(coc-diagnostic-prev)
"nmap ]a <Plug>(coc-diagnostic-next)
"nmap [e <Plug>(coc-diagnostic-prev-error)
"nmap ]e <Plug>(coc-diagnostic-next-error)
"
"let g:coc_enable_locationlist = 1
"
"let g:syntastic_error_symbol = "EE"
"let g:syntastic_warning_symbol = "WW"
"let g:syntastic_always_populate_loc_list = 1
"let g:syntastic_auto_loc_list = 1
"let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 0
"let g:syntastic_loc_list_height = 3
"function! s:AutoToggleLocList()
" let loclength = len(getloclist(winnr()))
" let lastwinnr = winnr()
" if loclength
" if g:syntastic_auto_loc_list == 1
" if loclength > g:syntastic_loc_list_height
" let loclength = g:syntastic_loc_list_height
" endif
" exe 'lopen '.loclength
" "wincmd p
" exe lastwinnr . " wincmd w"
" endif
" else
" if g:syntastic_auto_loc_list > 0
" lclose
" endif
" endif
"endfunction
"autocmd CursorHold * call s:AutoToggleLocList()
"
"set updatetime=500
"
map <silent> <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name")
\ . '> trans<' . synIDattr(synID(line("."),col("."),0),"name")
\ . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
\ . ">"<CR>

0 comments on commit 6fba7e8

Please sign in to comment.