Re: [code] [textadept]

From: Robert Gieseke <rob.g.att.web.de>
Date: Sun, 25 Oct 2015 10:16:16 +0100

Hi,

sorry for any additional confusion I caused!

Mitchell,
maybe the documentation in the manual section `Autocompletion and
Documentation` could be amended to include something like:

The official language modules load an API file from `
_USERHOME..'/modules/<lexer name>/api'` if such a file exists.

To add separate API files the `api_files` table can be amended by adding
the following to a `post_init.lua` file for a language, e.g. for Lua in
`_USERHOME..'/modules/lua/post_init.lua'`:

    local api_files = textadept.editing.api_files.lua
    api_files[#api_files + 1] = _USERHOME..'/modules/lua/extra_api'

Cheers,
Robert

Am 25/10/15 um 04:15 schrieb Jae-woo Kim:
> Wow, without `post_init.lua`! Good magic.
> OK, now my understanding is clear.
> Thank you for your endeavor :)
> Good luck to you.
>
> 2015-10-25 12:09 GMT+09:00 Mitchell <m.att.foicica.com>:
>
>> Hi Jay,
>>
>> On Sun, 25 Oct 2015, Jae-woo Kim wrote:
>>
>> Thank you, Robert, Mitchell. I understanded what you both said, and
>>> successed to follow your instruction.
>>> Yes, now I can see my API document comment after seeing the official API
>>> document when I press Ctrl+H repeatedly. I think the effects of
>>> _USERHOME..'/modules/ansi_c/api'
>>> _USERHOME..'/modules/ansi_c/jay_api'
>>> are same.
>>>
>>
>> I actually forgot that if you use the filename 'api', and place it in
>> `~/.textadept/modules/ansi_c/`, Textadept will automatically pick it up
>> without you having to create or do anything with a `post_init.lua`. Magic!
>>
>>
>>> That's already sufficient to me, but now I'm trying to tweak the way
>>> documents appears.
>>> e.g.)
>>> in official modules/ansi_c/api, there is
>>> sin sin(double) blahblah
>>>
>>> and I made _USERHOME..'/modules/ansi_c/api'
>>> sin my_private_trivial_shy_comment
>>>
>>> finally, I want to see "merged" API document in textadept like this,
>>> sin(double) blahblah
>>> my_private_trivial_shy_comment
>>> when I press Ctrl+H "just one time".
>>>
>>>
>>> But, as far, I've thought it's impossible to achieve this after reading
>>> M.show_documentation() implementation in official
>>> modules/textadept/editing.lua
>>>
>>
>> Yes, that is correct. API documentation strings are separate from one
>> another. Sorry for the confusion.
>>
>>
>> Cheers,
>> Mitchell
>> --
>> 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.
>>
>>
>

-- 
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 25 Oct 2015 - 05:16:16 EDT

This archive was generated by hypermail 2.2.0 : Sun 25 Oct 2015 - 06:26:38 EDT