Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions disappearing with snip-integ #395

Open
CadeMichael opened this issue Feb 9, 2021 · 11 comments
Open

Suggestions disappearing with snip-integ #395

CadeMichael opened this issue Feb 9, 2021 · 11 comments

Comments

@CadeMichael
Copy link

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.

@hrsh7th
Copy link
Contributor

hrsh7th commented Feb 9, 2021

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

@CadeMichael
Copy link
Author

yes thank you!

@CadeMichael
Copy link
Author

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 is usually ''
let g:floaterm_keymap_kill = ''

" 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 l
nnoremap k
nnoremap j
nnoremap h
" Plug command bindings
nnoremap :FZF
nnoremap :NERDTreeToggle
nnoremap :InstantMarkdownPreview
nnoremap :InstantMarkdownStop
nnoremap t :TagbarToggle
" Expand
imap vsnip#expandable() ? '(vsnip-expand)' : ''
smap vsnip#expandable() ? '(vsnip-expand)' : ''
" Jump forward or backward
imap vsnip#jumpable(1) ? '(vsnip-jump-next)' : ''
smap vsnip#jumpable(1) ? '(vsnip-jump-next)' : ''
imap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : ''
smap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : ''
" Navigate the complete menu items like CTRL+n / CTRL+p would.
inoremap pumvisible() ? "" :""
inoremap pumvisible() ? "" : ""
" ---------------------------------------------------------------

@hrsh7th
Copy link
Contributor

hrsh7th commented Feb 9, 2021

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

@hrsh7th
Copy link
Contributor

hrsh7th commented Feb 9, 2021

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

@CadeMichael
Copy link
Author

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
Copy link
Author

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

@hrsh7th
Copy link
Contributor

hrsh7th commented Feb 9, 2021

Reproduced.
It's weird...

@CadeMichael
Copy link
Author

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...

@hrsh7th
Copy link
Contributor

hrsh7th commented Feb 9, 2021

I get the reason. I will create PR.

@CadeMichael
Copy link
Author

thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants