diff options
author | 2011-02-26 12:07:49 -0500 | |
---|---|---|
committer | 2011-02-26 12:07:49 -0500 | |
commit | 89f7d7c37c97d316305e380f944f2e77019578ce (patch) | |
tree | 9fdf01f8637421fc25f1f36df9efec8d42bdf2f9 /modules/lua/adeptsense.lua | |
parent | 04d5d496565d97b2860d318a68c200fb097c30b7 (diff) | |
download | textadept-89f7d7c37c97d316305e380f944f2e77019578ce.tar.gz textadept-89f7d7c37c97d316305e380f944f2e77019578ce.zip |
Use Ctrl+H for showing apidoc in cpp and lua modules.
Diffstat (limited to 'modules/lua/adeptsense.lua')
-rw-r--r-- | modules/lua/adeptsense.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/lua/adeptsense.lua b/modules/lua/adeptsense.lua index 6b900cd8..9e6d86a2 100644 --- a/modules/lua/adeptsense.lua +++ b/modules/lua/adeptsense.lua @@ -27,6 +27,17 @@ sense.ctags_kinds = { }
sense:load_ctags(_HOME..'/modules/lua/tags', true)
+---
+-- Shows an autocompletion list for the symbol behind the caret.
+-- @param only_fields If true, returns list of only fields; defaults to false.
+-- @param only_functions If true, returns list of only functions; defaults to
+-- false.
+function sense:complete(only_fields, only_functions)
+ local line, pos = buffer:get_cur_line()
+ local symbol = line:sub(1, pos):match(self.syntax.symbol_chars..'*$')
+ return self.super.complete(self, false, symbol:find(':'))
+end
+
-- Load user tags and apidoc.
if lfs.attributes(_USERHOME..'/modules/lua/tags') then
sense:load_ctags(_USERHOME..'/modules/lua/tags')
|