Skip to content

Commit

Permalink
✨feat(.solution.toml): now accept entry_point = "$current_buffer".
Browse files Browse the repository at this point in the history
In case the user want to define the current buffer as entry_point.
  • Loading branch information
Zeioth authored Mar 24, 2024
1 parent d4f7bbb commit c16eeb5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/compiler/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ function M.parse_solution_file(file_path)
key = vim.trim(key)
value = value:gsub("^%s*", ""):gsub(" *#.*", ""):gsub("^['\"](.-)['\"]$", "%1") -- Remove inline comments and surrounding quotes

if key == "entry_point" and value == "$current_buffer" then
value = vim.api.nvim_buf_get_name(0)
end

if string.find(key, "executable") then
table.insert(executables, value)
else
Expand Down

0 comments on commit c16eeb5

Please sign in to comment.