Re: [code] Best way to handle beautifiers in Textadept?

From: Robert Gieseke <rob.g.att.web.de>
Date: Tue, 30 Apr 2019 23:25:53 +0200

Hi Ryan,

Am 30.04.19 um 15:33 schrieb Ryan McQuen:
> I have some programs that beautify languages, for example, on JavaScript
> I use Prettier. These run on the file, my current workflow is to put
> these under |compile_commands|, so an example would be:
>
> |textadept.run.compile_commands.javascript = 'prettier --write "%f"' |
>
> The friction with this workflow, is that it opens the message buffer
> (something I would like to avoid), and it also requires me to leave the
> file, and return to it to prompt the ‘Reload it?’ dialog. I’d like the
> file to just refresh after that command is run. I’m sure there is a
> better way to handle it, but I’ve been poking around the manual and
> haven’t arrived at anything. Sorry if this has been asked before …
>

Here is an example from the Rust module:

https://github.com/abaez/ta-rust/blob/master/init.lua#L54

It handles the reloading programmatically and works on every save.

Cheers
Robert

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 30 Apr 2019 - 17:25:53 EDT

This archive was generated by hypermail 2.2.0 : Wed 01 May 2019 - 06:49:37 EDT