Looking for Advice: Auto-Completition of Section numbers of Legal Texts


I would like to improve the writing experience of legal texts in markdown that have many section references to texts such as the General Data Protection Regulation (GDPR for short, this is the first occurrence of it in this forum now :smile:).

Section references look generally like this:

  • Article 6
  • Article 6, 18 and 24
  • Article 6.3.2
  • Article 6.2 (b)

I imagine that editors type in $$ or § to trigger the auto-completittion similar to those in https://atom.io/packages/autocomplete-emojis.

The auto-completition should allow then to search for the descriptive title of the section to enter the respective number. Optionally, editors should be able to even use a full article search.

For this, a local text directory would be needed. This could be generated in case of the GDPR from https://gdpr-info.eu/.

A separate linter may check all references and highlight those that do not seem to exist.

My question are now:

  • Has somebody tried this before?
  • Who would be interested to join the afford to develop such package?
  • Do you know packages that provide similar functionalities?


The next step would be to open on click the respective text in a html preview panel. :thinking:


Something similar is done by

  • https://atom.io/packages/autocomplete-bibtex (https://github.com/apcshields/autocomplete-bibtex/blob/master/lib/provider.js)
  • https://atom.io/packages/autocomplete-emojis (https://github.com/atom/autocomplete-emojis/blob/master/lib/emojis-provider.coffee)

The documentation for the autocomplete-plus package is here:

It looks like my idea can be realised with a custom provider for the autocomplete-plus package.