slap-editor / slap

Sublime-like terminal-based text editor
MIT License
6.14k stars 216 forks source link

no syntax highlighting for node/js #371

Open marktyers opened 7 years ago

marktyers commented 7 years ago

I have installed the latest version of slap to edit NodeJS files (.js) but there is absolutely no syntax highlighting. Documentation is sparse but I assumed that the editor would load the correct syntax based on the file extension. This does not happen so how can I force it to load the correct syntax files? screenshot from 2016-11-26 18-05-30

dbkaplun commented 7 years ago

That is very strange. Can you pastebin your ~/.slap/slap.log? Sometimes it takes a little time to highlight on slower machines, maybe wait a bit longer?

marktyers commented 7 years ago

http://pastebin.com/EQSgF9Xx

marktyers commented 7 years ago

I'm running slap on Ubuntu 16.04 on a Thinkpad T450S with 12 GB RAM and i5 processor. Left the file open for 30 min

dbkaplun commented 7 years ago

@marktyers,

Can you try adding

util.logger.info(data);

after line#415 to $path_to_slap/node_modules/editor-widget/lib/Editor.js? You can find your $path_to_slap:

$ dirname $(readlink -f $(which slap))

Rerun with slap --logger.level silly <args> and pastebin the result, maybe this will show something else. (This might be easier in #slap on Freenode.)