-
Notifications
You must be signed in to change notification settings - Fork 271
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
[Multi-file schema / vsCode extension]: Load related schema files into extension context #3063
Comments
Hey! This should be supported by the latest version of Atlas LSP. What extension and Atlas versions are you using? |
Extension
edit: upgraded to
Still the same error |
@yannxaver : How did you put those files? It should be under same directory to be collected as a module. |
The 0.5.4 version of the VS Code Extension doesn't appear to work within a single file either. Auto-completion and linting are not working (altho syntax highlighting seems to be functioning). Using Windows Atlas EXE Version: The last version that appears to work is 0.4.5. VS Code Version 1.92.2 |
$ find . -type f -name "*.pg.hcl"
./src/postgres/base.pg.hcl
./src/domain/comment/comment.pg.hcl
./src/domain/user/user.pg.hcl
--> not working
$ find . -type f -name "*.pg.hcl"
./src/domain/base.pg.hcl
./src/domain/comment/comment.pg.hcl
./src/domain/user/user.pg.hcl
--> not working
$ find . -type f -name "*.pg.hcl"
./src/domain/base.pg.hcl
./src/domain/user.pg.hcl
./src/domain/comment.pg.hcl
--> working So it seems like all schema files have to be located in the same folder for the extension to discover them? For me the primary reason to use multi-file schemas was to co-locate the database schema with other entity-related files in the same folder. Do you have any plans to load schema files into the extension context based on the paths specified in the Atlas configuration file ( |
The vsCode extension currently does not seem to be aware of tables and columns defined in other schema files.
My suggestion would be that schema files can be tagged as
multi-file
, in which case the extension will traverse up the folder tree until it finds an Atlas configuration file. It could then load the other schema files based onenv.src
. This should enable IntelliSense between multiple files.The text was updated successfully, but these errors were encountered: