fix(config): propagate template through platform overrides
Problem: CpPlatformOverrides lacked a template field and merge_lang() never copied ov.template into the effective language config, so per-platform template overrides were silently dropped. Solution: add template? to CpPlatformOverrides and forward it in merge_lang(), matching how extension is handled.
This commit is contained in:
parent
24b088e8e9
commit
d3324aafa3
1 changed files with 4 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
---@class CpPlatformOverrides
|
---@class CpPlatformOverrides
|
||||||
---@field extension? string
|
---@field extension? string
|
||||||
---@field commands? CpLangCommands
|
---@field commands? CpLangCommands
|
||||||
|
---@field template? string
|
||||||
|
|
||||||
---@class CpPlatform
|
---@class CpPlatform
|
||||||
---@field enabled_languages string[]
|
---@field enabled_languages string[]
|
||||||
|
|
@ -259,6 +260,9 @@ local function merge_lang(base, ov)
|
||||||
if ov.commands then
|
if ov.commands then
|
||||||
out.commands = vim.tbl_deep_extend('force', out.commands or {}, ov.commands or {})
|
out.commands = vim.tbl_deep_extend('force', out.commands or {}, ov.commands or {})
|
||||||
end
|
end
|
||||||
|
if ov.template then
|
||||||
|
out.template = ov.template
|
||||||
|
end
|
||||||
return out
|
return out
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue