gtksource.snippet_context
Module for [SnippetContext] class
Types 3
Context for expanding class@SnippetChunk.
This class is currently used primary as a hashtable. However, the longer term goal is to have it hold onto a GjsContext as well as other languages so that class@SnippetChunk can expand themselves by executing script within the context.
The class@Snippet will build the context and then expand each of the chunks during the insertion/edit phase.
Methods
SnippetContext self()Returns `this`, for use in `with` statements.SnippetContextGidBuilder builder()Get builder for [gtksource.snippet_context.SnippetContext] Returns: New builder objectvoid clearVariables()Removes all variables from the context.string expand(string input)string getVariable(string key)Gets the current value for a variable named key.void setConstant(string key, string value)Sets a constatnt within the context.void setLinePrefix(string linePrefix)void setTabWidth(int tabWidth)void setUseSpaces(bool useSpaces)void setVariable(string key, string value)Sets a variable within the context.gulong connectChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.snippet_context.SnippetContext)))
&& Parameters!T.length < 2)Connect to `Changed` signal.Fluent builder for [gtksource.snippet_context.SnippetContext]
Methods