[code] On require() in REPL, auto_c_selection_change and refactored js module

From: Alexander Misel <alexander_misel.att.live.cn>
Date: Mon, 18 Nov 2019 03:31:44 +0000

I recently tried to play with Lua in Textadept's REPL. But as I need to import some module, I used require syntax. But I found that the global function called inside that module didn't use the env that REPL defined, for example, print(), which made me unable to output in REPL. Is there a fix for this?

I also wanted to add an event handler to auto_c_selection_change event, for example, show related document associated to the choice in the code completion list. But the behavior seems not the same as document, the arguments didn't really pass to the event handler. I wonder if it is related to the Scintilla used by Textadept.

Moreover, I kind of refactored my ta-javascript module, in particular, the pattern matching was rewritten using lpeg.re (as re is more like the syntax mentioned in papers) and the new tags was generated based on https://github.com/ternjs/tern/tree/master/defs . I added a typeref field to the ctags files to get return type info during code completion. But as for now, it's not fully used. Ideas of using this field is welcome.

-- 
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 Sun 17 Nov 2019 - 22:31:44 EST

This archive was generated by hypermail 2.2.0 : Mon 18 Nov 2019 - 06:26:39 EST