Я пишу свою первую программу на JS, мне нужно вернуть текст курсора, когда курсор мыши находится над ним в Atom.
import {CompositeDisposable} from 'atom';
const atom = require("atom");
const cursorListener = {
subscriptions: null,
cursorReturn: null,
activate (state) {
constructor();
//this.subscriptions = new Atom.CompositeDisposable();
},
constructor() {
this.editor = editor;
this.getClient = getClient;
this.subscriptions = new Atom.CompositeDisposable();
}
this.reinitialize();
this.subscriptions.add(atom.texteditor.getWordUnderCursor()) {
var check = atom.texteditor.getWordUnderCursor();
console.log(check);
},
deactivate () {
this.subscriptions.dispose();
this.cursorReturn.destroy();
},
serialize () {
}
};
exports.cursorListener = cursorListener;
Я запускаю atom в режиме dev, и он не работает,Я искал так много мест, и я не могу понять это.Пожалуйста, если кто-нибудь может мне помочь, пожалуйста, дайте мне знать.Спасибо.