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

Ignoring comments in .vimspector.json #164

Open
mark2185 opened this issue Oct 3, 2022 · 3 comments
Open

Ignoring comments in .vimspector.json #164

mark2185 opened this issue Oct 3, 2022 · 3 comments

Comments

@mark2185
Copy link
Contributor

mark2185 commented Oct 3, 2022

Is your feature request related to a problem? Please describe.
vimspector ignores comments in JSON (// comment), but cmake4vim doesn't so it complains about parsing the JSON file when trying to run a target.

Describe the solution you'd like
Ignore the content after //, but don't delete it when writing .vimspector.json again.

Describe alternatives you've considered
Not writing comments.

@ilyachur
Copy link
Owner

Unfortunately json standard doesn't support comments.

As per Standard JSON rules, There is no official support for Comments in JSON content.

I read vimspector config to json dictionary and write it also as json, so in case of C style comments it returns error

@mark2185
Copy link
Contributor Author

I know, but vimspector explicitly supports C styled comments

The JSON configuration file allows C-style comments:

// comment to end of line ...
/* inline comment ... */

So we do have vimspector support, but we also have a missing feature.

@ilyachur
Copy link
Owner

Yes I know, honestly I don't know the simple way how to support comments. Looks like for that I need to change the system of reading/writing vimspector config file.

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

No branches or pull requests

2 participants