diff options
author | 2011-02-22 00:02:32 -0500 | |
---|---|---|
committer | 2011-02-22 00:02:32 -0500 | |
commit | fbb71bf42f1bd8b845dfb2b3c2ab43ddc739fe1e (patch) | |
tree | a48d46079cad187cc8d66a6739e7f564681e1999 /modules/textadept/adeptsense.lua | |
parent | 2816072322fba8decd561d44e7572511ab3de5f5 (diff) | |
download | textadept-fbb71bf42f1bd8b845dfb2b3c2ab43ddc739fe1e.tar.gz textadept-fbb71bf42f1bd8b845dfb2b3c2ab43ddc739fe1e.zip |
Added sense.always_show_globals option; modules/textadept/adeptsense.lua
Diffstat (limited to 'modules/textadept/adeptsense.lua')
-rw-r--r-- | modules/textadept/adeptsense.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua index 4ecd1743..07e9bd58 100644 --- a/modules/textadept/adeptsense.lua +++ b/modules/textadept/adeptsense.lua @@ -312,6 +312,13 @@ module('_m.textadept.adeptsense', package.seeall) -- self.imports = {} -- end -- +-- #### Other Adeptsense Settings +-- +-- * `always_show_globals`: A flag indicating whether or not to include globals +-- in the list of completions offered. Globals are classes, functions, and +-- fields that do not belong to another class. They are contained in +-- completions['']. Defaults to true. +-- -- ## Settings -- -- * `FUNCTIONS`: XPM image for adeptsense functions. @@ -418,7 +425,7 @@ function get_completions(sense, symbol, only_fields, only_functions) local context_class = sense:get_class(symbol) if context_class and compls[context_class] then class = context_class - include_globals = compls[''] ~= nil + include_globals = sense.always_show_globals and compls[''] ~= nil end end @@ -733,6 +740,7 @@ function new(lang) sense = setmetatable({ lexer = lang, events = {}, + always_show_globals = true, --- -- Contains a map of ctags kinds to adeptsense kinds. |