I’m trying to write an EventListener that applies relevant syntax to files based on several criteria (I know there’s a package that does this already, I’m doing it for educational purposes).
I have set up a dummy event listener, but I get this kind of errors, and I can’t find a way to make it work:
from sublime import *
from sublime_plugin import *
class ck2IDE_event_listener(EventListener):
def on_new(view):
print('test')
Every time I creat a new file, I get this error on the console:
Traceback (most recent call last):
File "C:\Sublime Text 3\sublime_plugin.py", line 330, in on_new
callback.on_new(v)
TypeError: on_new() takes 1 positional argument but 2 were given
The same eror happens with other even hooks such as on_loaded or on_pre_save.
Any help would be appreciated - and I hope I’m not being overy obtuse with this.
Edit; having the same problem with ViewEventListeners. Also, having this in the last dev build, if that changes anything.