From 3534a4e66eb248f0ba5560014c2e71208a6312cd Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 15 Mar 2012 10:23:40 -0400 Subject: Added note about child Adeptsenses; modules/textadept/adeptsense.lua --- modules/textadept/adeptsense.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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] -- cgit v1.2.3