fix(parser): add support for .udt and .db file parsing and goto declaration
- extract_variables: Parse STRUCT fields in TYPE sections for .udt files - extract_types: Handle quoted type names and multiple type definitions - declaration handler: Extract quoted type names for goto declaration - Add filetype detection for .udt and .db files in nvim config
This commit is contained in:
+1
-1
@@ -558,7 +558,7 @@ function handlers.textDocument_declaration(params)
|
||||
local var_type = doc.variables[word].data_type
|
||||
if var_type then
|
||||
var_type = var_type:gsub("%s*;.*$", ""):gsub("%s*:=.*$", ""):gsub("^%s+", ""):gsub("%s+$", "")
|
||||
local type_name = var_type:match("([%w_]+)")
|
||||
local type_name = var_type:match('"([^"]+)"') or var_type:match("([%w_]+)")
|
||||
if type_name and type_name ~= word then
|
||||
table.insert(search_names, type_name)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user