Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Specs do NOT reflect actual highlighting #310

Open
1 task done
alpyre opened this issue Nov 23, 2018 · 1 comment
Open
1 task done

Specs do NOT reflect actual highlighting #310

alpyre opened this issue Nov 23, 2018 · 1 comment

Comments

@alpyre
Copy link
Contributor

alpyre commented Nov 23, 2018

Prerequisites

Description

"Run Package Specs" results with zero failures, yet the actual highlighting on the editor is faulty.

Steps to Reproduce

  1. Open c-spec.coffee and copy the code for "conditionals".
  2. Create a new c file and paste the code.
  3. See it does NOT highlight the keyword "defined" correctly:
    ss1
  4. Yet the scope for that keyword in the spec is: keyword.control.directive.conditional.c
    expect(lines[0][3]).toEqual value: 'defined', scopes: ['source.c', 'meta.preprocessor.c', 'keyword.control.directive.conditional.c']

Expected behavior: This should have caused a spec failure.
Actual behavior: It does not!?
ss2
Reproduces how often: %100

Versions

Latest stable version (both linux and Windows versions):

Atom:     1.32.2
Electron: 2.0.9
Chrome:   61.0.3163.100
Node:     8.9.3

Additional Information

I could not reproduce it on Atom 1.31.2 (language-c: 0.60.4). This looks like a quite serious issue and maybe it is deeper than this package.

@Aerijo
Copy link

Aerijo commented Nov 23, 2018

Those specs are for a different grammar system than the one being used in your editor, which is why they are passing. To toggle back to the old one, go Settings -> Core -> Use Tree Sitter Parsers

As for the issue, someone else will have to comment on that. It does look like the parse tree handles it, but the scopes aren't as before.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants