Skip to content
This repository has been archived by the owner on Dec 12, 2019. It is now read-only.
/ deoplete-latex Public archive

An experimental deoplete source for LaTeX completion

License

Notifications You must be signed in to change notification settings

poppyschmo/deoplete-latex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

deoplete-latex

Update. vimtex has been offering command completion for some time now. Please use that instead. Thanks.

Warning. This is not a serious deoplete source. It's merely a "dumb list" of LaTeX commands thrown together ad hoc to assist the infrequent user or LaTeX novice. To be clear, there's no syntax analysis happening here, no "intellisense" engine humming in the background. (See Poor performance below.)

screenshot

Features (or lack thereof)

  • delegates to vimtex for all completion capabilities offered by the plugin (like \cite{}, \ref{}, etc.), meaning vimtex must be loaded for these to appear

  • completion offerings are LaTeX only; no ConTeXt, Texinfo, etc.

  • packages listed in TeXstudio's completion repo are included as default sources; currently, these are not extensible, (you can't add your own local .cwl header files), though this could change

  • key/value args and other command options noted in TeXstudio's cwl spec tend to work as expected

  • all preview-window doc strings were removed in favor simple signatures; see vim-latexrefman for a full docs-integration option

  • in-menu Unicode symbols for relevant commands

  • package contents loaded on save; previous attempts at dynamic loading have been abandoned, for now

Global options

" Include macros like `\jhat` from MathJax and KaTeX.
let g:deoplete#sources#latex#include_web_math = 1  " default 0

" Include a hodgepodge of miscellaneous commands and environments.
let g:deoplete#sources#latex#include_misc = 1      " default 0

Issues

There are far too many niggling issues to list here (and likely some major unknown unknowns, as well). Most can safely be attributed to the author's overall lack of computer knowhow.

Poor performance

When editing documents longer than a few pages, especially ones dependent on more than a few packages, initial completion suggestions are truncated (seemingly arbitrarily). This is accompanied by laggy cursor movement and jittery scrolling. Things settle down after a minute or so, but this is obviously a deal breaker for non-trivial work.

No context awareness re "environment"

Some commands are only supported in a given environment. These constraints currently go unheeded.

Wrong "mode" context

Many commands are tagged with the wrong combination of text/math labels, preventing them from showing up for completion in a given mode. Absent a more precise and authoritative source for such data, this won't change.

Missing options

Much like the "mode" issue, most of these are attributable to incomplete or erroneous source information, mainly because TeXstudio's cwl roster is crowd-sourced and imperfect. Unless some facility for extensibility is implemented here, this also won't change.

About

An experimental deoplete source for LaTeX completion

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published