Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't try to encode dap_open_command in JSON #21

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

judemille
Copy link
Contributor

@judemille judemille commented Jan 17, 2024

dap_open_command is a function, and Neovim gets very angry when asked
to encode a function in JSON. I don't know if it silently allowed this
before or what, but it's causing issues for me.

This just temporarily stores it, clears it in the project config while
encoding, and then puts it back. Simple enough.

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]>
@Shatur
Copy link
Owner

Shatur commented Jan 17, 2024

dap_open_command is a function, and Neovim gets very angry when asked

How can I reproduce it?

@judemille
Copy link
Contributor Author

judemille commented Jan 17, 2024

How can I reproduce it?

Open a new project. Try to change a project setting (e.g. CMake args). This will cause the error in my environment.

Specificities: Up to date Arch Linux, LunarVim.

@Shatur
Copy link
Owner

Shatur commented Jan 17, 2024

Can't reproduce also on Arch. What Neovim version are you using?

@judemille
Copy link
Contributor Author

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742

@Shatur
Copy link
Owner

Shatur commented Jan 17, 2024

Same... I guess it depends on the dap config?
There is a recent issue about it, maybe we should reconsider how dap should be integrated?
#22

@judemille
Copy link
Contributor Author

I use the default function for DAP integration in this plugin, so I don't know why anything special would occur. Regardless, we shouldn't be encoding a function in JSON.

As for reconsidering DAP integration: That may well be a good idea.

@judemille
Copy link
Contributor Author

In the meantime, can this be merged?

@Shatur Shatur merged commit 12fbbff into Shatur:master Jan 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants