% arara: xelatex
% arara: bib2gls: {group: on}
% arara: xelatex
% arara: xelatex
\documentclass{report}

\usepackage{fontspec}
\setmainfont{DejaVu Serif}

\usepackage{amssymb}
\usepackage[hidelinks]{hyperref}
\usepackage[bib2gls,diglyphs]{testidx-glossaries}

\setglossarystyle{mcolindexspannav}

\renewcommand*{\glstreenamefmt}[1]{#1}
\renewcommand*{\glstreegroupheaderfmt}[1]{\textbf{#1}}

\tstidxmakegloss[
 max-loc-diff={2},
% Try with different languages
% sort={no}% norsk
% sort={nn}% nynorsk
% sort={nl}% dutch
% sort={is}% icelandic
% sort={cy}% welsh
% sort={ga}% irish
% sort={pl}% polish
% sort={hu}% hungarian
% Or use a custom rule:
 sort={custom},
 sort-rule={% custom sort rule (only used with sort=custom)
 ' '; % space
 \string\u0300;% combining grave accent
 \string\u0301;% combining acute accent
 \string\u0302;% combining circumflex accent
 \string\u0303;% combining tilde accent
 \string\u0304;% combining macron accent
 \string\u0305;% combining overline accent
 \string\u0306;% combining breve accent
 \string\u0307;% combining dot above accent
 \string\u0308;% combining diaeresis accent
 \string\u0309;% combining hook above accent
 \string\u030A;% combining ring above accent
 \string\u030B;% combining double acute accent
 \string\u030C;% combining caron accent
 \string\u0327;% combining cedilla accent
 \string\u0328;% combining ogonek accent
 \string\u20D7% combining right arrow above accent
 <'\string_'< ','< ';'< ':'< '!'< '?'< '/'< '.'< '<'<'>'<'('<')'% punctuation
 < 0 < 1 < 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9
 < a,A < b,B < c,C < d,D
 < dd,Dd,DD
 < dz,\string\u01F3\string&Dz,\string\u01F2\string&DZ,\string\u01F1 < dzs,DZS
 < \string\u00F0,\string\u00D0 % eth
 < e,E < f,F < ff,Ff,FF
 < g,G < h,H < i,I < ij,\string\u0133,IJ,\string\u0132
 < j,J < k,K < l,L
 < ll,\string\u1EFB,Ll,LL,\string\u1EFA
 < m,M < n,N
 < ng,Ng,NG < o,O < p,P
 < q,Q < r,R < s,S < t,T < u,U < v,V < w,W < x,X < y,Y < z,Z
 < \string\u00E6,\string\u00C6 % (ae ligature)
 < \string\u0153,\string\u0152 % (oe ligature)
 < \string\u00FE,\string\u00DE % (thorn)
 < \string\u00F8,\string\u00D8 % (o slash)
 < \string\u0142,\string\u0141 % (l stroke)
 }
]

\begin{document}

\testidx

\tstidxprintglossaries
\end{document}
