aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/adeptsense.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-07-29 18:27:06 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2011-07-29 18:27:06 -0400
commit36675f10b0cefaee7e9451b3eec3dfd715888625 (patch)
tree5a2135ef56b3e52bdf63fb4a82d4cec8c5e41eab /modules/textadept/adeptsense.lua
parent32da7ac1a36d2285daa3a0ee280f1730415f04cf (diff)
downloadtextadept-36675f10b0cefaee7e9451b3eec3dfd715888625.tar.gz
textadept-36675f10b0cefaee7e9451b3eec3dfd715888625.zip
Eliminated the need for keys.conf and keys.osx.conf.
Thanks to Robert Gieseke for the idea and prototype code.
Diffstat (limited to 'modules/textadept/adeptsense.lua')
-rw-r--r--modules/textadept/adeptsense.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index d7c3a9a5..37ee20bc 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -889,3 +889,21 @@ syntax = {
senses[lang] = sense
return sense
end
+
+---
+-- Completes the symbol at the current position based on the current lexer's
+-- Adeptsense.
+-- This should be called by key commands and menus instead of `complete`.
+function complete_symbol()
+ local m = _m[buffer:get_lexer()]
+ if m and m.sense then m.sense:complete() end
+end
+
+---
+-- Shows API documentation for the symbol at the current position based on the
+-- current lexer's Adeptsense.
+-- This should be called by key commands and menus instead of `show_apidoc`.
+function show_documentation()
+ local m = _m[buffer:get_lexer()]
+ if m and m.sense then m.sense:show_apidoc() end
+end