fix: DB completion path parsing, array-of-UDT resolution, blink source registration

- Fix path extraction pattern (missing closing quote, extra capture group)
- Add Array[..] of "UdtName" detection for nested member resolution
- Remove vim.schedule_wrap from DB member callback (causes blink.cmp timeout)
- Add built-in instruction parameter fallback (IEC_TIMER IN/PT/Q/ET)
- Ensure DB cache is populated on demand in completion source
- Make try_register() succeed without cmp.add_source_provider API
- docs: add blink.cmp source config steps to installation guide
This commit is contained in:
2026-07-22 20:26:16 +02:00
parent 3776ce33ff
commit 0a0b5c9bf1
3 changed files with 86 additions and 26 deletions
+12 -11
View File
@@ -177,17 +177,18 @@ function M.setup_syntax(opts)
if opts.cmp then
local function try_register()
local cmp_ok, cmp = pcall(require, "blink.cmp")
local blink_source_ok, blink_source = pcall(require, "tia.blink_cmp_source")
if cmp_ok and cmp and cmp.add_source_provider and blink_source_ok then
local source_config = {
name = "scl",
provider = blink_source,
score_offset = 100,
}
pcall(cmp.add_source_provider, "scl", source_config)
pcall(cmp.add_filetype_source, "scl", "scl")
vim.notify("SCL: blink.cmp source registered", vim.log.levels.INFO)
local blink_source_ok = pcall(require, "tia.blink_cmp_source")
if cmp_ok and cmp and blink_source_ok then
if cmp.add_source_provider then
local blink_source = require("tia.blink_cmp_source")
local source_config = {
name = "scl",
provider = blink_source,
score_offset = 100,
}
pcall(cmp.add_source_provider, "scl", source_config)
pcall(cmp.add_filetype_source, "scl", "scl")
end
return true
end
return false