How to disable annoying Sublime Text 3 (Typescript) error message

Recently (perhaps after the update?) Sublime Text 3 started showing these very annoying pop-up messages with deceptive messages when a text box over a syntax error.

The worst part about these pop-ups is that, as you can see from the image below, they do not hang over the text; rather, they invoke all the text below them to jump in a row to make room for the message:

screenshot

Maybe someone likes it, but it drove me crazy, and I can’t figure out how to turn it off. I don't need a popup at all; the message in the status bar is enough for me.

I tried to set "show_errors_inline" to false in user settings to no avail. Help would be appreciated. Thanks!

+5
source share
1 answer

As I found out thanks to Keith Hall and this GitHub page , this turns out to be the "feature" of the Microsoft Typescript plugin.

To disable it, edit the following file (this is on Windows, obviously the path will be slightly different on another system):

C:\Users\YourUserNameHere\AppData\Roaming\Sublime Text 3\Packages\TypeScript\typescript\commands\error_info.py

Highlight lines 26-29 of this file as shown below:

 ... if len(error_text) > 0: #if PHANTOM_SUPPORT: # template = '<body><style>div.error {{ background-color: brown; padding: 5px; color: white }}</style><div class="error">{0}</div></body>' # display_text = template.format(error_text) # self.view.add_phantom("typescript_error", self.view.sel()[0], display_text, sublime.LAYOUT_BLOCK) self.view.set_status("typescript_error", error_text) 

Then restart the editor.

+6
source

Source: https://habr.com/ru/post/1259785/


All Articles