useblocks / sphinx-needs-vscode

https://sphinx-needs-vscode.useblocks.com
MIT License
3 stars 2 forks source link

Ease handling without changig settings all the time #29

Open kreuzberger opened 1 year ago

kreuzberger commented 1 year ago

Hi! I am migration to vscode and use the sphinx-needs-vscode extension the first time.

In my project we use sphinx-needs in a very modular way, due to the concept of DocsAsCode. So we have lot of "requirements.rst" projects/files, with generated "conf.py" and "needs.json" files in the build tree.

Due to the nature of the plugin, it is awfull to switch between requriement files, cause you have to provide 2 paths in the settings any time.

Could this not be made easier?

If i open a "needs.json" file (e.g. exact that or a configurable name or just the json extension), or drop the file in the explorer, the source files are referenced in this file. So there is normally no need to configure the source directory if the json file is used directly

Normaly, if the json file location and the "source" directory (does this mean where the conf.py file is placed) there is "normaly" a static relation between both in projects. So if they are in different directories, the configuration of an relative directory should be possible.

In my cases, configuration of the SrcDir as ".." does not work in my use cases (json files are in subfolder "needs").

So just the handling with the json files should be made easier without always changing settings.

danwos commented 1 year ago

I think the code on main may also support this. There was this great PR #24 "Support Multi Docs", which allows the definition of multiple srcDir locations.

kreuzberger commented 1 year ago

Ok, this helps to see more than one file at a time, but adding the files is still the same way (cause settings have to be changed manually) Or did i miss something? (just saw the docu, did not try it in vscode)

1) I have also manually change seetings for each json document in my build/source tree 2) i have to configure json and source dir, even if they have static "relations"

So ok, i can now see more than one document, but still have to configure it. I am not familiar with vscode plugins but can the "explorer" view not be used for d'n'd operations or should there be a context menu for needs.json files to be "added" to the view?