Vim, Updates for autocomplete

This commit is contained in:
2023-05-24 20:10:52 -06:00
parent 1d35b206f7
commit acd7bb9c00
4 changed files with 14 additions and 90 deletions

View File

@@ -2,34 +2,20 @@
" Use tab for trigger completion with characters ahead and navigate. " Use tab for trigger completion with characters ahead and navigate.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by " NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config. " other plugin before putting this into your config.
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 inoremap <silent><expr> <TAB>
let col = col('.') - 1 \ coc#pum#visible() ? coc#_select_confirm() :
return !col || getline('.')[col - 1] =~# '\s' \ coc#expandableOrJumpable() ?
\ "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
\ CheckBackSpace() ? "\<TAB>" :
\ coc#refresh()
function! CheckBackSpace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction endfunction
" Use <c-space> to trigger completion. let g:coc_snippet_next = '<tab>'
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" 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)
set runtimepath^=/home/xyvs/.vim/plugged/coc.nvim set runtimepath^=/home/xyvs/.vim/plugged/coc.nvim
filetype plugin indent on filetype plugin indent on

View File

@@ -50,6 +50,7 @@ yabai -m config right_padding 10
yabai -m config window_gap 20 yabai -m config window_gap 20
# floating rules # floating rules
yabai -m rule --add app="^System Settings$" manage=off
yabai -m rule --add app="^System Preferences$" manage=off yabai -m rule --add app="^System Preferences$" manage=off
yabai -m rule --add app="^System Information$" manage=off yabai -m rule --add app="^System Information$" manage=off
yabai -m rule --add app="^Preview$" manage=off yabai -m rule --add app="^Preview$" manage=off

View File

@@ -1,14 +1,12 @@
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'fxn/vim-monochrome' Plug 'fxn/vim-monochrome'
Plug 'dylanaraps/wal.vim'
Plug 'arcticicestudio/nord-vim' Plug 'arcticicestudio/nord-vim'
Plug 'lurst/austere.vim'
" autocomplete " autocomplete
Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'github/copilot.vim'
Plug 'mattn/emmet-vim' Plug 'mattn/emmet-vim'
Plug 'github/copilot.vim'
" other " other
Plug 'preservim/nerdcommenter' Plug 'preservim/nerdcommenter'
@@ -49,7 +47,6 @@ if (empty($TMUX))
endif endif
set background=dark set background=dark
colorscheme austere
colorscheme nord colorscheme nord
" new leader key " new leader key
@@ -99,7 +96,7 @@ nnoremap <leader>m :MaximizerToggle<CR>
let g:user_emmet_leader_key=',' let g:user_emmet_leader_key=','
" build commands " build commands
nnoremap <C-b> <Esc>:w<CR>:!clear;python windmill.py /tests/ui/participant/suite_b/test_participant_1028_investment_election_beta.py<CR> nnoremap <C-b> <Esc>:w<CR>:!clear;python3 %<CR>
nnoremap <C-t> <Esc>:w<CR>:!clear;pipenv run pytest -v<CR> nnoremap <C-t> <Esc>:w<CR>:!clear;pipenv run pytest -v<CR>
" vim settings " vim settings

View File

@@ -1,60 +0,0 @@
tap "clementtsang/bottom"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/services"
tap "jhawthorn/fzy"
tap "koekeishiya/formulae"
tap "universal-ctags/universal-ctags"
brew "openssl@1.1"
brew "autojump"
brew "bat"
brew "emacs"
brew "cask"
brew "ccat"
brew "cmus"
brew "curl"
brew "fzf"
brew "fzy"
brew "gcc"
brew "geckodriver"
brew "git"
brew "gotop"
brew "grep"
brew "httpie"
brew "libheif"
brew "imagemagick"
brew "jq"
brew "lf"
brew "libao"
brew "media-info"
brew "vapoursynth"
brew "youtube-dl"
brew "mpv"
brew "neofetch"
brew "neovim"
brew "node"
brew "nvm"
brew "peco"
brew "percol"
brew "pipenv"
brew "postgresql"
brew "pyenv"
brew "ranger"
brew "rust"
brew "scala"
brew "screen"
brew "screenfetch"
brew "tmux"
brew "tree"
brew "vim"
brew "wget"
brew "yadm"
brew "yarn"
brew "zsh-vi-mode"
brew "clementtsang/bottom/bottom"
brew "koekeishiya/formulae/skhd"
brew "koekeishiya/formulae/yabai"
brew "universal-ctags/universal-ctags/universal-ctags", args: ["HEAD"]
cask "chromedriver"
cask "mpv"