Further work on editor:

- refined the error reporting with tooltips showing the detailed
  messages of the found problems;
- allow the term declarations to be shown if one hovers above a
  reference.