From 12fbbff7e91b1d07498f0574505e9d48baa9d7bf Mon Sep 17 00:00:00 2001 From: Julia DeMille <8127111+judemille@users.noreply.github.com> Date: Wed, 17 Jan 2024 18:49:04 -0600 Subject: fix: don't try to encode dap_open_command in JSON (#21) 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 --- lua/tasks/project_config.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lua/tasks') diff --git a/lua/tasks/project_config.lua b/lua/tasks/project_config.lua index b3891a3..f0ca017 100644 --- a/lua/tasks/project_config.lua +++ b/lua/tasks/project_config.lua @@ -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 -- cgit v1.2.3