bug: config value completions should only trigger after `=`
Druue opened this issue · 0 comments
Druue commented
Bug description
Property value completions can trigger anywhere after the name, which can be before the = sign :: This is an issue with find_at_position and would probably require changes in the PEST grammar to include having the = as an identifiable piece in the parser for config blocks.
How to reproduce
- Open a schema
- Trigger a completion after a prop name (e.g. directUrl) but before
=
- See completions for
""
orenv()
Prisma information
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl <|> =
}
Environment & setup
- OS: macOS
- Database: N/A
- Node.js version: N/A
Prisma Version
4.11 / insider
Expected Fix
PSL will need the ability to parse =
as an expression so that we can match positions after it.
Changes expected in datamodel.pest
, datasource_loader
(and the other loaders), and find_at_position.rs