From 36675f10b0cefaee7e9451b3eec3dfd715888625 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 29 Jul 2011 18:27:06 -0400 Subject: Eliminated the need for keys.conf and keys.osx.conf. Thanks to Robert Gieseke for the idea and prototype code. --- modules/textadept/adeptsense.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'modules/textadept/adeptsense.lua') 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 -- cgit v1.2.3