Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay indentation detection until buffer is tokenized #12

Closed
wants to merge 1 commit into from
Closed

Delay indentation detection until buffer is tokenized #12

wants to merge 1 commit into from

Conversation

sryze
Copy link

@sryze sryze commented Mar 12, 2016

This fixes #7.

This fixes a bug where indentation in comments wasn't being ignored when
detecting indentation (#7). The Editor::isBufferRowCommented method works
only after onDidTokenize.
@sryze
Copy link
Author

sryze commented Mar 14, 2016

It looks like the specs need to be updated as well, I'll attempt to do it later tonight.

@jtokoph
Copy link
Owner

jtokoph commented Mar 14, 2016

The package currently attempts to detect indentation before tokenization
because a file might be opened that doesn't have a corresponding language
package. It will still re-detect after the tokenization.
On Mon, Mar 14, 2016 at 12:31 AM Sergey Zolotarev [email protected]
wrote:

It looks like the specs need to be updated as well, I'll attempt to do it
later tonight.


Reply to this email directly or view it on GitHub
#12 (comment)
.

Jason

@sryze
Copy link
Author

sryze commented Mar 14, 2016

Oh, didn't see that. I actually consoled out what editor.isBufferRowCommented i was returning and to my surprise if didn't detect any of the comments. But after adding this it worked.

@jtokoph
Copy link
Owner

jtokoph commented Mar 14, 2016

The first pass before tokenization won't detect comments. But the second
pass after tokenization will detect them. You should be seeing things
logged twice unless there is some other error
On Mon, Mar 14, 2016 at 8:28 AM Sergey Zolotarev [email protected]
wrote:

Oh, didn't see that. I actually consoled out what editor.isBufferRowCommented
i was returning and to my surprise if didn't detect any of the comments.
But after adding this it worked.


Reply to this email directly or view it on GitHub
#12 (comment)
.

Jason

@sryze sryze closed this Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore indentation in comments
2 participants