vim-lsc icon indicating copy to clipboard operation
vim-lsc copied to clipboard

Suggestions disappearing with snip-integ

Open CadeMichael opened this issue 4 years ago • 11 comments

As soon as I load snip-integ I no longer get autosuggestions after the third character. I am not sure what exactly is going wrong as there is no error message.

CadeMichael avatar Feb 09 '21 11:02 CadeMichael

Hi, the snip-integ means vsnip-integ, right? If so, I will investigate it.

hrsh7th avatar Feb 09 '21 11:02 hrsh7th

yes thank you!

CadeMichael avatar Feb 09 '21 11:02 CadeMichael

if it helps this is my init.vim

" ----------------installCommand---------------------- " sh -c 'curl -fLo '${XDG_DATA_HOME:-$HOME/.local/share}'/nvim/site/autoload/plug.vim --create-dirs
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' " " ---------------------Plugs-------------------------- " vim-plug call plug#begin('~/.config/nvim/plugged') Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'preservim/nerdtree' Plug 'junegunn/fzf.vim' Plug 'vim-scripts/AutoComplPop' Plug 'itchyny/lightline.vim' Plug 'ryanoasis/vim-devicons' Plug 'dart-lang/dart-vim-plugin' Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'preservim/tagbar' Plug 'natebosch/vim-lsc' Plug 'natebosch/vim-lsc-dart' Plug 'Neevash/awesome-flutter-snippets' Plug 'hrsh7th/vim-vsnip' Plug 'hrsh7th/vim-vsnip-integ' Plug 'microsoft/vscode-python' Plug 'tmsvg/pear-tree' Plug 'voldikss/vim-floaterm' Plug 'instant-markdown/vim-instant-markdown', {'for': 'markdown'} Plug 'gruvbox-community/gruvbox' call plug#end() " ------------------PlugSettings----------------------

" colorscheme colorscheme gruvbox

" lightline set laststatus=2 set noshowmode let g:lightline = { \ 'colorscheme': 'gruvbox', \ }

" devicons set conceallevel=3 set encoding=UTF-8

" dart let g:dart_format_on_save = 1 let g:dart_style_guide = 2

" vim-lsc let g:lsc_auto_map = v:true

" -----------LangConf------------- let g:lsc_server_commands = { \ 'python' : 'pyls', \ 'cpp': { \ 'command': 'clangd --background-index', \ 'suppress_stderr': v:true }, \ 'c': { \ 'command': 'clangd --background-index', \ 'suppress_stderr': v:true }, } let g:go_metalinter_autosave = 1 let g:go_metalinter_deadline = "5s" " -------------------------------

" NERDTree let g:NERDTreeDirArrowExpandable = '+' let g:NERDTreeDirArrowCollapsible = '|' "Exit Vim if NERDTree is the only window left. autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | \ quit | endif

" floaterm let g:floaterm_keymap_toggle = '<Leader><CR>' " leader is usually '' let g:floaterm_keymap_kill = '<Leader><BS>'

" pairing let g:pear_tree_repeatable_expand = 0

" markdown --sudo npm -g install instant-markdown-d@next-- let g:instant_markdown_autostart = 0

" ------------------Settings -------------------------------------

" basic requirements set nocompatible filetype indent plugin on syntax on set noerrorbells

" mac specific for deleting properly set backspace=indent,eol,start

" case insensitive searching set ignorecase set smartcase

" line numbers set relativenumber set nu

" Indentation settings set smartindent set shiftwidth=4 set softtabstop=4 set expandtab

" no junk files set noswapfile set nobackup

" autocomplete set shortmess+=c set complete+=kspell set completeopt=menuone,longest,noinsert,noselect

" searching set incsearch set nohlsearch

" scrolling set scrolloff=8

" ----------------Custom key bindings----------------------------- " switching between splits more effectively nnoremap <C-l> <C-w>l nnoremap <C-k> <C-w>k nnoremap <C-j> <C-w>j nnoremap <C-h> <C-w>h " Plug command bindings nnoremap <C-t> :FZF<CR> nnoremap <C-Space> :NERDTreeToggle<CR> nnoremap <C-m><CR> :InstantMarkdownPreview<CR> nnoremap <C-m><BS> :InstantMarkdownStop<CR> nnoremap <Space>t :TagbarToggle<CR> " Expand imap <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>' smap <C-j> vsnip#expandable() ? '<Plug>(vsnip-expand)' : '<C-j>' " Jump forward or backward imap <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>' smap <Tab> vsnip#jumpable(1) ? '<Plug>(vsnip-jump-next)' : '<Tab>' imap <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>' smap <S-Tab> vsnip#jumpable(-1) ? '<Plug>(vsnip-jump-prev)' : '<S-Tab>' " Navigate the complete menu items like CTRL+n / CTRL+p would. inoremap <Down> pumvisible() ? "<C-n>" :"<Down>" inoremap <Up> pumvisible() ? "<C-p>" : "<Up>" " ---------------------------------------------------------------

CadeMichael avatar Feb 09 '21 11:02 CadeMichael

Awesome. It very helpful. I will try it to reproduce.

hrsh7th avatar Feb 09 '21 11:02 hrsh7th

@CadeMichael Could you provide repro steps? I will try to repro with clangd. Is it correct?

hrsh7th avatar Feb 09 '21 11:02 hrsh7th

when I do something like

#inc I get suggestions and snippets suggestions then if I add the l they go away. If I delete the l and retype it they come back.

CadeMichael avatar Feb 09 '21 11:02 CadeMichael

sorry Lower case L and uppercase i look very similar in that ^

CadeMichael avatar Feb 09 '21 11:02 CadeMichael

Reproduced. It's weird...

hrsh7th avatar Feb 09 '21 11:02 hrsh7th

Is there a setting that I should tweak maybe something with set complete opt ? I messed around with removing no insert and insert with no changes...

CadeMichael avatar Feb 09 '21 11:02 CadeMichael

I get the reason. I will create PR.

hrsh7th avatar Feb 09 '21 12:02 hrsh7th

thank you for your help!

CadeMichael avatar Feb 09 '21 12:02 CadeMichael