Skip to content

Commit eddd6c2

Browse files
committed
feat: support workspace dependencies
1 parent 003442e commit eddd6c2

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lua/crates/toml.lua

+8
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ function M.parse_section(text)
209209
}
210210

211211
local target = prefix
212+
213+
local workspace = prefix:match("^workspace%.$")
214+
if workspace then
215+
216+
target = ""
217+
prefix = ""
218+
end
219+
212220
local dev_target = prefix:match("^(.*)dev%-$")
213221
if dev_target then
214222
target = vim.trim(dev_target)

teal/crates/toml.tl

+8
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ function M.parse_section(text: string): Section
209209
}
210210

211211
local target = prefix
212+
213+
local workspace = prefix:match("^workspace%.$")
214+
if workspace then
215+
-- the workspace table only allows a regular dependencies sub-table
216+
target = ""
217+
prefix = ""
218+
end
219+
212220
local dev_target = prefix:match("^(.*)dev%-$")
213221
if dev_target then
214222
target = vim.trim(dev_target)

0 commit comments

Comments
 (0)