From affd28c6f53365825e32a457d91b88947d3f9209 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Thu, 24 Feb 2022 20:43:00 +0100 Subject: [PATCH] feat: update installer --- nvim/coc-settings.json | 19 ---- nvim/init.vim | 197 ----------------------------------------- nvim/install.sh | 5 +- 3 files changed, 2 insertions(+), 219 deletions(-) delete mode 100644 nvim/coc-settings.json delete mode 100644 nvim/init.vim diff --git a/nvim/coc-settings.json b/nvim/coc-settings.json deleted file mode 100644 index 0b91ed7..0000000 --- a/nvim/coc-settings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "coc.preferences.formatOnSaveFiletypes": [ - "cpp", - "css", - "javascript", - "typescript", - "typescriptreact", - "json", - "markdown", - "python", - "rust", - "toml", - "yaml" - ], - "clangd.path": "/home/mandlm/.config/coc/extensions/coc-clangd-data/install/11.0.0/clangd_11.0.0/bin/clangd", - "eslint.autoFixOnSave": true, - "eslint.format.enable": true, - "eslint.packageManager": "yarn" -} diff --git a/nvim/init.vim b/nvim/init.vim deleted file mode 100644 index 5853901..0000000 --- a/nvim/init.vim +++ /dev/null @@ -1,197 +0,0 @@ -call plug#begin(stdpath('data') . '/plugged') - -Plug 'altercation/vim-colors-solarized' -Plug 'itchyny/lightline.vim' - -Plug 'tpope/vim-obsession' -Plug 'dhruvasagar/vim-prosession' - -Plug 'airblade/vim-gitgutter' -Plug 'tpope/vim-fugitive' - -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -Plug 'junegunn/fzf.vim' - -Plug 'christoomey/vim-tmux-navigator' - -Plug 'tpope/vim-dispatch' - -Plug 'RRethy/vim-illuminate' - -Plug 'tpope/vim-surround' -Plug 'tpope/vim-commentary' - -Plug 'Lenovsky/nuake' - -Plug 'junegunn/vim-peekaboo' - -Plug 'cespare/vim-toml' - -Plug 'vimwiki/vimwiki' - -Plug 'neoclide/coc.nvim', {'branch': 'release'} - -" typescript syntax highlighting -Plug 'HerringtonDarkholme/yats.vim' - -Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } - -Plug 'folke/which-key.nvim' - -Plug 'wellle/targets.vim' - -Plug 'lukas-reineke/indent-blankline.nvim' - -call plug#end() - -" tabwidth -set tabstop=4 -set shiftwidth=4 - -" indent with spaces -set expandtab - -" scroll offset -set scrolloff=4 - -" don't warp lines -set nowrap - -" split to right/below -set splitright -set splitbelow - -" presistent undo -set undofile - -" solarized dark theme -silent! colorscheme solarized -set background=dark - -" line numbers -set number - -" searching -set ignorecase -set smartcase - -" preview commands -set inccommand=split - -" reload init.vim on save -augroup InitVimReload - autocmd! - autocmd BufWritePost init.vim source $MYVIMRC -augroup END - -" set cursorline in active window -augroup CursorLine - autocmd! - autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline - autocmd WinLeave * setlocal nocursorline -augroup END - -" terminal mode options -augroup terminal_mode - autocmd! - autocmd TermOpen * setlocal nonumber - autocmd TermOpen * startinsert -augroup END - -" map esc to exit insert mode in terminal -tnoremap (&filetype == "fzf") ? "" : "" - -" git-gutter -highlight SignColumn ctermbg=0 - -" lightline config -let g:lightline = { 'colorscheme': 'solarized' } - -" prosession -let g:prosession_tmux_title = 1 -let g:prosession_per_branch = 1 - -" fzf.vim -nnoremap :GFiles -nnoremap :Rg -nnoremap :Rg \b\b - -" vim-illuminate -highlight illuminatedWord ctermbg=23 - -augroup close_preview - autocmd InsertLeave * silent! pclose! -augroup end - -" autoread/checktime timer {{{ -set autoread -function! CheckTime(timer) - checktime -endfunction -let timerChecktime = timer_start(4000, 'CheckTime', {'repeat': -1}) -" }}} - -" nuake console -nnoremap :Nuake -inoremap :Nuake -tnoremap :Nuake - -" vimwiki -let g:vimwiki_list = [ - \ {'name': 'personal', 'path': '~/vimwiki/personal'}, - \ {'name': 'swp', 'path': '~/vimwiki/swp'} - \ ] - -let g:vimwiki_table_mappings = 0 -let g:vimwiki_global_ext = 0 - -" indent-blankline - -let g:indent_blankline_char = '┊' - -" coc -set updatetime=300 -highlight CocHintSign ctermfg=10 ctermbg=0 - -let g:coc_global_extensions = [ - \ 'coc-clangd', - \ 'coc-cmake', - \ 'coc-eslint', - \ 'coc-html', - \ 'coc-json', - \ 'coc-prettier', - \ 'coc-python', - \ 'coc-rust-analyzer', - \ 'coc-sh', - \ 'coc-toml', - \ 'coc-tsserver', - \ 'coc-vimlsp', - \ 'coc-yaml', - \ ] - -nnoremap K :call CocAction('doHover') - -nmap gd (coc-definition) -nmap gr (coc-references) -nmap ga (coc-codeaction) -nmap rn (coc-rename) - -" use for trigger completion and navigate to the next complete item {{{ -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~ '\s' -endfunction - -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() - -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -" }}} - -" select completion items with enter -inoremap pumvisible() ? "\" : "\u\" diff --git a/nvim/install.sh b/nvim/install.sh index a6050d4..5339dbf 100755 --- a/nvim/install.sh +++ b/nvim/install.sh @@ -1,6 +1,5 @@ #!/usr/bin/env sh mkdir --parents ~/.config/nvim -ln -svrf init.vim ~/.config/nvim/init.vim -ln -svrf coc-settings.json ~/.config/nvim/coc-settings.json - +ln -svrf init.lua ~/.config/nvim/init.lua +ln -svrf lua ~/.config/nvim/lua