Atom overlay decorations

Hello,

I’m in the midst of developing a linter for a custom language in Atom. I want to use the overlay style decoration to create tool tips (so that when you hover over a token which contains an error or warning you can see the error message), but quite frankly I’m stumped on how to do that.

The following snippet does not do the job:

  var wrapper = document.createElement("div");
  wrapper.innerText = err.Text;
  var toolTip = editor.decorateMarker(marker, {type: 'overlay', item: wrapper});

If someone could help me figure out how to accomplish this, it would be greatly appreciated!

Don’t post this in multiple categories, please. This has been common etiquette since the 90’s!