Skip to content

Commit c16eeb5

Browse files
authored
✨feat(.solution.toml): now accept entry_point = "$current_buffer".
In case the user want to define the current buffer as entry_point.
1 parent d4f7bbb commit c16eeb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/compiler/utils.lua

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ function M.parse_solution_file(file_path)
6868
key = vim.trim(key)
6969
value = value:gsub("^%s*", ""):gsub(" *#.*", ""):gsub("^['\"](.-)['\"]$", "%1") -- Remove inline comments and surrounding quotes
7070

71+
if key == "entry_point" and value == "$current_buffer" then
72+
value = vim.api.nvim_buf_get_name(0)
73+
end
74+
7175
if string.find(key, "executable") then
7276
table.insert(executables, value)
7377
else

0 commit comments

Comments
 (0)