Open noklam opened 2 months ago
I think you could extend the DictConfig
and ListConfig
constructors so that when you create the config in https://github.com/omry/omegaconf/blob/ed9601045f2342f87604a5c5b6029aa4fff4c0da/omegaconf/omegaconf.py#L832 you can pass this information when available, which could then be stored in the metadata (you'd also have to add this to the ContainerMetadata
class).
Pseudocode:
For example, this is supported with yaml https://yaml.readthedocs.io/en/latest/detail/. Obviously it won't work for the Python API. I wonder how could this be supported or could I extend OmegaConf myself. Does OmegaConf preserve the tree during resolution? It would be super useful for me as I am trying to build some sort of LSP IDE feature on top of it so navigation/go to definition would be easier.
I know for
DictConfig
there is a_parent
attribute, is there a way that I can extend the config resolution method so that these metadata can be kept.