The domain-speciﬁc language allows for describing problems of a concrete domain, for which the language is created. This fact implies that a number of languages of this kind grows with a number of problem domains. The use of domain-speciﬁc languages brings a necessity to pretty-print these languages, where the concept of pretty-printing consists of code formatting and syntax highlighting. One of tools that allow for creating domain-speciﬁc languages is the Xtext framework, which offers only a limited range of tools that are able to deﬁne a conﬁguration for pretty-printing. Moreover, these tools are hardly understandable because they are confusing and requires knowledge of Xtext’s internals. Thus this project introduces a new way of pretty-printing domain-speciﬁc languages. The way is based on declarative deﬁnition of formatting rules. Furthermore, this project helps a user to create formatting rules by utilizing nontrivial heuristics.