Shougo / neosnippet.vim

neo-snippet plugin
Other
1.12k stars 108 forks source link

completion not working with neovim #483

Closed steven-omaha closed 4 years ago

steven-omaha commented 4 years ago

I installed neosnippet and cannot get it to work. I tried to create a minimum example. Here are my steps.

  1. I start with a fresh bundle directory, and have only Vundle installed.

    $ ls ~/.vim/bundle
    Vundle.vim
  2. I create the neovim config. ~/.config/nvim/init.vim

    set runtimepath^=~/.vim runtimepath+=~/.vim/after
    let &packpath = &runtimepath
    source ~/.vimrc
    let g:python3_host_prog='/usr/bin/python'
  3. I create my vimrc. ~/.vimrc

    
    " ------------------------------------------------------------------
    " vundle
    " ------------------------------------------------------------------
    set nocompatible
    filetype off

set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' Plugin 'Shougo/deoplete.nvim' Plugin 'Shougo/neosnippet.vim' Plugin 'Shougo/neosnippet-snippets' call vundle#end() filetype plugin indent on

"----------------------------- " deoplete "-----------------------------

let g:deoplete#enable_at_startup=1

"----------------------------- " neosnippet "----------------------------- "let g:neosnippet#snippets_directory='~/.vim/bundle/neosnippet-snippets/neosnippets'

" Plugin key-mappings. " Note: It must be "imap" and "smap". It uses mappings. imap (neosnippet_expand_or_jump) smap (neosnippet_expand_or_jump) xmap (neosnippet_expand_target)

" SuperTab like snippets behavior. " Note: It must be "imap" and "smap". It uses mappings. imap \ pumvisible() ? "\" : \ neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" : "\" smap neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" : "\"

" For conceal markers. if has('conceal') set conceallevel=2 concealcursor=niv endif


4. I open nvim and run:

:PluginInstall :UpdateRemotePlugins

5. I restart nvim and open ~/tmp.tex. When I enter `documentclass` I don't any completion for it. When I enter `do` I get the suggestions `date_iso8601` and `datetime_iso8601`. When I enter the next letter `c`, the suggestions disappear.

$ nvim --version NVIM v0.4.3 Build type: Release LuaJIT 2.0.5 Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include Compiled by builduser

Features: +acl +iconv +tui See ":help feature-compile"

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

:checkhealth

health#deoplete#check

deoplete.nvim

health#nvim#check

Configuration

Performance

Remote Plugins

terminal

health#provider#check

Clipboard (optional)

Python 2 provider (optional)

Python 3 provider (optional)

Ruby provider (optional)

Node.js provider (optional)

steven-omaha commented 4 years ago

Error was on my side. When opening a .tex file, neovim says it is a plaintex file. After running :set ft=tex it works.

Shougo commented 4 years ago

It is well known problem