Skip to content

Commit

Permalink
fix: don't try to encode dap_open_command in JSON (#21)
Browse files Browse the repository at this point in the history
dap_open_command is a function, and Neovim gets *very* angry when asked
to encode a command in JSON. I don't know if it silently allowed this
before or what, but it's causing issues for me.

Signed-off-by: Julia DeMille <[email protected]>
  • Loading branch information
judemille authored Jan 18, 2024
1 parent 2730051 commit 12fbbff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/tasks/project_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ end
--- Writes all values as JSON to disk.
function ProjectConfig:write()
local params_file = Path:new(config.params_file)
local tmp_dap_open_command = self.dap_open_command
self.dap_open_command = nil
params_file:write(vim.json.encode(self), 'w')
self.dap_open_command = tmp_dap_open_command
end

return ProjectConfig

0 comments on commit 12fbbff

Please sign in to comment.