Open twodrops opened 1 year ago
Thanks for reporting this :+1: Unfortunately, I can not reproduce it, but I get many other errors from RST-plugins directly.
I'm unsure what the reason is, maybe some API changes and inconsistent versions by RestructuredText, esbonio and Sphinx-Needs.
We will set up a .vscode
folder, which contains a common configuration for all the relevant extensions.
So we can be sure to work on the same IDE setup and it can be used as a reference.
We are on it :)
Hi @twodrops,
Can you please try rebuild needs.json? In this new release 1.0.2, we introduced "doctype" into "needs_info" for IDE feature, I think this breaks the old needs.json.
In my conf.py, I always have needs_build_json = True, this is maybe why I can't reproduce the bug you reported.
I am sorry for the inconvenience, I forgot document this.
Thats interesting because I have needs_build_json = True
set already since Sphinx-Needs 1.0.1 and the generated needs.json
has a doctype
with Sphinx-Needs 1.0.2
"doctype": ".rst",
Any other clue?
Hi @twodrops,
That's getting interesting. From the error message above, it clearly suggest that, that need doesn't have "doctype".
Could you please check the need-id you performed hover feature with? Is this need exits in the generated needs.json? Does this need has doctype?
I just got a feeling, maybe somehow external needs are involved.
@haiyangToAI Sorry, everything with rST works as expected. I don't know what it was. I setup my workspace again and everything started working fine,
The markdown support is still not working for me although :(
Is anything other than these two steps needed to get it working?
extensions = ["sphinx_needs", "myst_parser"] source_suffix = [".rst", ".md"]
For the markdown files, the need.json has the following entry.
"doctype": ".md"
I do not see any autocompleton for example, when I use "Role need completion"
With Sphinx-Needs 1.0.1 the IDE support worked pretty well. With 1.0.2 it raises the following exception for any action.
No change with any of these options.
NOTE: The problem is within VS Code Devcontainer where Sphinx-Needs 1.0.1 has no issues.