forked from qt-creator/qt-creator
Lua: Add Lua plugin support
Adds basic support for writing Plugins using the lua scripting language. Lua Plugins are registered just as native plugins are and can be enabled or disabled via the plugin dialog. see src/plugins/lua/README.md for further details. Change-Id: I9f4d15e9632c46e1c6c132bcd0bbcdd70b150640 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
40
src/plugins/lua/meta/qtc.lua
Normal file
40
src/plugins/lua/meta/qtc.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
---@meta
|
||||
|
||||
---The global qtc object defined in the Lua plugin.
|
||||
---@class qtc
|
||||
Qtc = {}
|
||||
|
||||
---@class (exact) QtcPlugin
|
||||
---@field Name string The name of the plugin.
|
||||
---@field Version string The version of the plugin. (`major.minor.patch`)
|
||||
---@field CompatVersion string The lowest previous version of the plugin that this one is compatible to. (`major.minor.patch`)
|
||||
---@field Vendor string The vendor of the plugin.
|
||||
---@field Category string The category of the plugin.
|
||||
---@field Dependencies? QtcPluginDependency[] The dependencies of the plugin.
|
||||
---@field Description? string A short one line description of the plugin.
|
||||
---@field LongDescription? string A long description of the plugin. Can contain newlines.
|
||||
---@field Url? string The url of the plugin.
|
||||
---@field License? string The license text of the plugin.
|
||||
---@field Revision? string The revision of the plugin.
|
||||
---@field Copyright? string The copyright of the plugin.
|
||||
---@field Experimental? boolean Whether the plugin is experimental or not. ( Default: true )
|
||||
---@field DisabledByDefault? boolean Whether the plugin is disabled by default or not. ( Default: true )
|
||||
---@field setup function The setup function of the plugin.
|
||||
---@field hooks? Hooks The hooks of the plugin.
|
||||
QtcPlugin = {}
|
||||
|
||||
---@class QtcPluginDependency
|
||||
---@field Name string The name of the dependency.
|
||||
---@field Version string The version of the dependency. (`major.minor.patch`)
|
||||
---@field Required boolean Whether the dependency is required or not.
|
||||
QtcPluginDependency = {}
|
||||
|
||||
|
||||
---@class EditorHooks
|
||||
---@field documentOpened function function(document)
|
||||
---@field documentClosed function function(document)
|
||||
EditorHooks = {}
|
||||
|
||||
---@class Hooks
|
||||
---@field editors? EditorHooks
|
||||
Hooks = {}
|
||||
Reference in New Issue
Block a user