sbdchd / neoformat

:sparkles: A (Neo)vim plugin for formatting code.
BSD 2-Clause "Simplified" License
1.98k stars 188 forks source link

How can I add a vimscript formatter function not an external program? #185

Open kiryph opened 6 years ago

kiryph commented 6 years ago

I am writing a LaTeX manuscript and try out different tools for formatting:

I would like to switch conveniently between the different tools with :Neof[ormat] and tab-completion:

:Neof[ormat] vimtex
:Neof[ormat] latexindent
:Neof[ormat] bucky

I typically then run gqip to format a paragraph and look at the new format.

The vimscript formatter functions do not need much configuration in contrast to the external programs.

Searching for the term formatexpr did not list a single match and https://github.com/sbdchd/neoformat#supported-filetypes indicates that only external tools are used yet.

Is this already possible with neoformat?

sbdchd commented 6 years ago

Neoformat doesn't have any support for formatexpr, but does have support for formatprg.

kiryph commented 6 years ago

Since you added the enhancement tag, are you planning to add this in the near future or just to categorize raised issues? Adding support would be great!