Loading CSV data for design-time completion/hints - looking for modern examples

I’m building an MPS language where users need to load CSV files to get better code completion and hints while writing code.

What I’m trying to do:

  • Load CSV file into the project
  • Show the data in a table (using Table extension)
  • Use CSV columns/cells for validation and auto-completion in my language
  • Only need this at design time, not when generating code

I found some old examples like mps.samples.plugin but they’re ancient and won’t work with current MPS. I’m fairly new to MPS and struggling to find modern approaches for this.

Anyone know of current examples or can point me in the right direction? Specifically wondering:

  • Best way to handle external file loading in recent MPS versions?
  • Should this be a plugin or part of the language itself?
  • How to make the CSV data available to completion contributors?

The goal is just to make the editing experience better by giving context-aware suggestions based on the loaded data.

Thanks!

The usual approach is to create concepts to represent entries in the CSV data and then write an importer. You can then create custom editors for the concepts, to present them as tables or however you like. And you can either directly refer to the imported concepts from user-written concepts or query their instances to customize the completion menu if you want to avoid referencing them directly.