chore:; respect EmmyLua comment
This commit is contained in:
@@ -20,9 +20,9 @@ local function get_parent_node(filetype, typ, language)
|
|||||||
return language.locator({root = tree, current = ts_utils.get_node_at_cursor(0)}, language.parent[typ])
|
return language.locator({root = tree, current = ts_utils.get_node_at_cursor(0)}, language.parent[typ])
|
||||||
end
|
end
|
||||||
|
|
||||||
---Generates the prefix according to `template` options.
|
--- Generates the prefix according to `template` options.
|
||||||
---Prefix is generated with an offset (currently spaces) repetition of `n` times.
|
--- Prefix is generated with an offset (currently spaces) repetition of `n` times.
|
||||||
---If `template.use_default_comment` is not set to false, the `commentstring` is added
|
--- If `template.use_default_comment` is not set to false, the `commentstring` is added
|
||||||
---@param template table
|
---@param template table
|
||||||
---@param commentstring string
|
---@param commentstring string
|
||||||
---@param n integer
|
---@param n integer
|
||||||
@@ -72,7 +72,7 @@ local function get_place_pos(parent, position, append, typ)
|
|||||||
return row, col
|
return row, col
|
||||||
end
|
end
|
||||||
|
|
||||||
---Uses the provided template to format the annotations with data found by the granulator
|
--- Uses the provided template to format the annotations with data found by the granulator
|
||||||
---@param parent userdata the node used to generate the annotations
|
---@param parent userdata the node used to generate the annotations
|
||||||
---@param data table the data from the granulator, which is a set of [type] = results
|
---@param data table the data from the granulator, which is a set of [type] = results
|
||||||
---@param template table a template from the configuration
|
---@param template table a template from the configuration
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
local ts_utils = require("nvim-treesitter.ts_utils")
|
local ts_utils = require("nvim-treesitter.ts_utils")
|
||||||
local helpers = require("neogen.utilities.helpers")
|
local helpers = require("neogen.utilities.helpers")
|
||||||
|
|
||||||
---Tries to use the configuration to find all required content nodes from the parent node
|
--- Tries to use the configuration to find all required content nodes from the parent node
|
||||||
---@param parent_node userdata the node found by the locator
|
---@param parent_node userdata the node found by the locator
|
||||||
---@param node_data table the data from configurations[lang].data
|
---@param node_data table the data from configurations[lang].data
|
||||||
return function(parent_node, node_data)
|
return function(parent_node, node_data)
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
---@field current userdata the current node from cursor
|
---@field current userdata the current node from cursor
|
||||||
---@field root? userdata the root node
|
---@field root? userdata the root node
|
||||||
|
|
||||||
---The default locator tries to find one of the nodes to match in the current node
|
--- The default locator tries to find one of the nodes to match in the current node
|
||||||
---If it does not find one, will fetch the parents until he finds one
|
--- If it does not find one, will fetch the parents until he finds one
|
||||||
---@param node_info Neogen.node_info a node informations
|
---@param node_info Neogen.node_info a node informations
|
||||||
---@param nodes_to_match table a list of parent nodes to match
|
---@param nodes_to_match table a list of parent nodes to match
|
||||||
---@return userdata node one of the nodes to match directly above the given node
|
---@return userdata node one of the nodes to match directly above the given node
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ local autocmd = {}
|
|||||||
|
|
||||||
autocmd.events = {}
|
autocmd.events = {}
|
||||||
|
|
||||||
---Subscribe autocmd
|
--- Subscribe autocmd
|
||||||
---@param event string
|
---@param event string
|
||||||
---@param callback function
|
---@param callback function
|
||||||
---@return function
|
---@return function
|
||||||
@@ -40,7 +40,7 @@ autocmd.subscribe = function(event, callback)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---Emit autocmd
|
--- Emit autocmd
|
||||||
---@param event string
|
---@param event string
|
||||||
autocmd.emit = function(event)
|
autocmd.emit = function(event)
|
||||||
autocmd.events[event] = autocmd.events[event] or {}
|
autocmd.events[event] = autocmd.events[event] or {}
|
||||||
|
|||||||
Reference in New Issue
Block a user