As an important coding scheme in modern distributed storage systems, locally repairable codes (LRCs) have attracted a lot of attentions from perspectives of both practical applications and theoretical research. As a major topic in the research of LRCs, bounds and constructions of the corresponding optimal codes are of particular concerns. In this work, codes with (r, delta)-locality which have optimal minimal distance w.r.t. the bound given by Prakash et al. are considered. Through parity-check matrix approach, constructions of both optimal (r, delta)-LRCs with all symbol locality ((r, delta)(a)-LRCs) and optimal (r, delta)-LRCs with information locality ((r, delta)(i)-LRCs) are provided. As a generalization of a work of Xing and Yuan, these constructions are built on a connection between sparse hypergraphs and optimal (r, delta)-LRCs. With the help of constructions of large sparse hypergraphs, the lengths of codes obtained from our construction can be super-linear in the alphabet size. This improves upon previous constructions when the minimal distance of the code is at least 3 delta+1. As two applications, optimal H-LRCs with super-linear lengths and GSD codes with unbounded lengths are also constructed.