benbrastmckie / .config

NeoVim configuration optimized for writing in LaTeX
313 stars 247 forks source link

Using your config, vimtex loads in neovim but none of the feature work #114

Closed jwbullard closed 10 months ago

jwbullard commented 10 months ago

Description

Using nvim v0.9.4 on Mac OS Sonoma 14.1.1, I have my vimtex.lua file attached.

Screenshot 2023-11-29 at 3 53 08 PM

Opening up nvim, I run :checkhealth and get this output for vimtex:

Screenshot 2023-11-29 at 3 54 41 PM

If I open up a LaTeX file, I can view the vimtex documentation with :h vimtex

Running :VimtexInfo on an open LaTeX file is successfull. See output below.

Screenshot 2023-11-29 at 3 57 24 PM

However, none of the expected vimtex features work within that LaTeX file. This includes:

Steps to reproduce

No response

Expected behavior

Default mappings (or any mappings) should work Environment completion should work, reference completion should work, etc.

Actual behavior

None of the default mappings are recognized. For example, if I type \ll, the cursor just moves two steps to the right.

Environment completion is not happening, reference completion suggestions are not happening ...

Do you use a latexmkrc file?

No

VimtexInfo

System info:
    1   OS: macOS 14.1.1 (23B81)
    2   Vim version: NVIM v0.9.4
    3   Has clientserver: true
    4   Servername: /var/folders/bx/n7fymkfd381363ckznhh8fp40000gr/T/nvim.jwbullard/mQ5bcZ/nvim.595.0
    5
    6 VimTeX project: test
    7   base: test.tex
    8   root: /Users/jwbullard/scratch
    9   tex: /Users/jwbullard/scratch/test.tex
   10   main parser: current file verified
   11   document class: article
   12   packages: fontaxes fontenc ifluatex iftex ifxetex libertine mweights textcomp xkeyval
   13   compiler: latexmk
   14     engine: -pdf
   15     options:
   16       -verbose
   17       -file-line-error
   18       -synctex=1
   19       -interaction=nonstopmode
   20     callback: 1
   21     continuous: 1
   22     executable: latexmk
   23   viewer: Skim
   24   qf method: LaTeX logfile
benbrastmckie commented 10 months ago

Seems like two issues. The first is if you want Vimtex bindings then in vimtex.lua turn 'vimtex_mappings_enabled' on by changing the 0 to a 1.

As for completion, cmp.lua is the relevant config file. Note that there is now a new plugin called vimtex-cmp which I have not gotten around to setting up yet but could help. You don't need that plugin to have completion (I have completion without it) but then you will have to troubleshoot why completion is not working. I can't tell from the information that you provided, and it might be worth trying the new plugin before anything else.

Let me know what else you uncover and if you hit any roadblocks with vimtex-cmp.

jwbullard commented 10 months ago

Thanks so much! The mappings are working fine now. I'm still working on the autocompletion part. I followed a long youtube video for setting up language-aware autcomplete for neovim and that might be conflicting somehow. I'll do some more digging and try to resolve that.