diff options
author | 2019-11-07 23:04:18 -0500 | |
---|---|---|
committer | 2019-11-07 23:04:18 -0500 | |
commit | e7d1e26a6db30304f61a59702cbca2f92d673af0 (patch) | |
tree | f35310bc03ac997178e00c50ee465fe0c8f4958d /modules/textadept | |
parent | 8778e3c1864dcd8ef1ae6669be446bb1b2ee2d18 (diff) | |
download | textadept-e7d1e26a6db30304f61a59702cbca2f92d673af0.tar.gz textadept-e7d1e26a6db30304f61a59702cbca2f92d673af0.zip |
Split Lua and Textadept autocompletion and documentation files.
Textadept autocompletion and documentation is now only performed on Textadept
files.
Modified the LuaDoc doclet to only process "lua.luadoc" on its own, and updated
the Makefile rule accordingly.
Diffstat (limited to 'modules/textadept')
-rw-r--r-- | modules/textadept/command_entry.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua index d858f071..b506757a 100644 --- a/modules/textadept/command_entry.lua +++ b/modules/textadept/command_entry.lua @@ -203,12 +203,21 @@ events.connect(events.INITIALIZED, function() for key, f in pairs(keys) do if f == textadept.editing.show_documentation then lua_mode_keys[key] = function() + -- Enable Textadept API documentation unless the Lua module already + -- enabled it. + local api_files = textadept.editing.api_files + if not api_files.lua[_HOME] then + api_files.lua[#api_files.lua + 1] = _HOME..'/modules/lua/ta_api' + end -- Temporarily change _G.buffer since ui.command_entry is the "active" -- buffer. local orig_buffer = _G.buffer _G.buffer = ui.command_entry textadept.editing.show_documentation() _G.buffer = orig_buffer + -- Disable Textadept API documentation unless the Lua module previously + -- enabled it. + if not api_files.lua[_HOME] then api_files.lua[#api_files.lua] = nil end end break end |