aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-03-15 10:23:40 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-03-15 10:23:40 -0400
commit3534a4e66eb248f0ba5560014c2e71208a6312cd (patch)
tree1c69d8eac8ae50855c29c52709beae81d98de2a7
parent9964c09b5a9a769786f9fc62f316781050fe2dc9 (diff)
downloadtextadept-3534a4e66eb248f0ba5560014c2e71208a6312cd.tar.gz
textadept-3534a4e66eb248f0ba5560014c2e71208a6312cd.zip
Added note about child Adeptsenses; modules/textadept/adeptsense.lua
-rw-r--r--modules/textadept/adeptsense.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index 7c1658c4..a4a0cb2e 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -315,6 +315,22 @@ module('_M.textadept.adeptsense')]]
-- self.imports = {}
-- end
--
+-- ### Child Language Adeptsenses
+--
+-- When Adeptsense completion is triggered, the Adeptsense for the language at
+-- the *current caret position* is used, not necessarily the parent language's
+-- Adeptsense. For example, when editing CSS inside of an HTML file, the user
+-- expects the CSS Adeptsense to be used. However, child language Adeptsenses
+-- are not loaded automatically and must be loaded by the parent language
+-- module. For the case of CSS in HTML, the HTML module's `init.lua` must
+-- contain:
+--
+-- -- Load CSS Adeptsense.
+-- if not _M.css then _M.css = require 'css' end
+--
+-- You will have to do something similar if you are writing an Adeptsense for a
+-- child lexer language.
+--
-- ### Other Adeptsense Settings
--
-- * `always_show_globals` [bool]