asciidoctor / atom-language-asciidoc

⚛ AsciiDoc language package for the Atom editor.
https://atom.io/packages/language-asciidoc
MIT License
42 stars 20 forks source link

Compile Grammar causes `this.tokenizedBuffer.reloadGrammar is not a function` #163

Closed bentolor closed 7 years ago

bentolor commented 7 years ago

Description

I'm trying to add Kotlin to the supported language bindings. Therefore I installed the language-kotlin package and added this to languages.cson:

,
  pattern: 'kotlin|kts?', type: 'source', code: 'Kotlin'

I also manually hacked the language-asciidoc.cson (w/o success) until I realized it should become generated. Now, when I try to perform Asciidoc Grammar: Compile Grammar and Reload I only see this exception:

/home/andrei/atom-1.11.1/out/app/src/text-editor.coffee:2816 
Uncaught TypeError: this.tokenizedBuffer.reloadGrammar is not a function
module.exports.CommandPaletteView.confirmed @ /home/andrei/atom-1.11.1/out/app/node_modules/command-palette/lib/command-palette-view.coffee:183

Strange home path btw. Any ideas?

Disclaimer

I actually have no real clue what I'm actually doing…

ldez commented 7 years ago

Hello,

Are you running Atom in Dev Mode ?

bentolor commented 7 years ago

@ldez Yes. Otherwise this safeguard would take effect

bentolor commented 7 years ago

What I did so far:

  1. I'm using Atom 1.11.2 on Ubunut
  2. I've installed asciidoc-assistant
  3. I've uninstalled language-asciidoc, exited Atom
  4. I checked out this repository, run apm install and then apm link --dev
  5. Started atom . --dev and trying to run the command above
ldez commented 7 years ago

I know, I wrote this safeguard ;)

ldez commented 7 years ago

You don't need to uninstall language-asciidoc in normal mode because the package is automatically replace by the dev version (if you have install it) when you are in Dev Mode.

ldez commented 7 years ago

I reproduce with the last version of Atom.

ldez commented 7 years ago

It's an issue with Atom: https://github.com/atom/atom/issues/13022

ldez commented 7 years ago

Fixed in the next version

bentolor commented 7 years ago

Thanks, @ldez for your fast & helpful response!

bradennapier commented 7 years ago

im still having this issue in 1.18 ?

image

ldez commented 7 years ago

@bradennapier could you create a new issue?

ldez commented 7 years ago

@bradennapier please update the plugin (language-asciidoc)

bradennapier commented 7 years ago

i dont see that available anywhere even if i try to install it

ldez commented 7 years ago

I don't reproduce with Atom 1.18 and language-asciidoc 1.10.

Please uninstall language-asciidoc and re-install.

Open a new issue if you still have a problem.