public void findLinks(@NotNull Indexer indexer) {
        // backlinks
        for (List<Binding> bindings : indexer.getBindings().values()) {
            for (Binding b : bindings) {
                addSemanticStyles(b);
                for (Def def : b.getDefs()) {
                    processDef(def, b);
                }
            }
        }

        // highlight definitions
        for (Entry<Ref,List<Binding>> e : indexer.getReferences().entrySet()) {
            processRef(e.getKey(), e.getValue());
        }

//        for (List<Diagnostic> ld: indexer.semanticErrors.values()) {
//            for (Diagnostic d: ld) {
//                processDiagnostic(d);
//            }
//        }

        for (List<Diagnostic> ld: indexer.parseErrors.values()) {
            for (Diagnostic d: ld) {
                processDiagnostic(d);

            }
        }
    }