Comments (8)
After some more testing, it seems it's only a problem when the "Use Tree Sitter Parsers" is enabled. It could potentially be the scope name change to just "javascript"? I know that's messed with some other plugins
from atom-aligner.
Error happens for me in ruby files.
from atom-aligner.
I got the same issue. Disabled Tree Sitter, reloaded Atom and everything works again. Thanks @Chifilly
from atom-aligner.
[Enter steps to reproduce:]
- Open a Ruby file;
- Execute the align command
Atom: 1.32.2 x64
Electron: 2.0.9
OS: Mac OS X 10.14
Thrown From: aligner package 1.2.4
Stack Trace
Uncaught TypeError: Cannot read property 'reset' of null
At /Applications/Atom.app/Contents/Resources/app/static/<embedded>:14
TypeError: Cannot read property 'reset' of null
at TokenizedLine.t.exports.TokenizedLine.getTokenIterator (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:107041)
at TokenizedLine.get (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:107144)
at Object.getAlignCharacter (/packages/aligner/lib/helper.js:50:33)
at _traverseRanges (/packages/aligner/lib/helper.js:80:26)
at _traverseRanges (/packages/aligner/lib/helper.js:17:20)
at Object.getAlignCharacterInRanges (/packages/aligner/lib/helper.js:79:10)
at Aligner.alignRanges (/packages/aligner/lib/main.js:53:30)
at Aligner.align (/packages/aligner/lib/main.js:35:12)
at HTMLElement.disposables.add.atom.commands.add (/packages/aligner/lib/main.js:74:12)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:347327)
at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1227611)
at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1223745)
at WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:282763)
Commands
2x -3:04.3.0 editor:consolidate-selections (input.hidden-input)
-3:04.1.0 core:cancel (input.hidden-input)
2x -3:02.6.0 core:save (input.hidden-input)
2x -2:53.9.0 core:move-up (input.hidden-input)
3x -2:53.5.0 core:select-down (input.hidden-input)
-2:53.1.0 aligner:align (input.hidden-input)
-2:47.5.0 core:save (input.hidden-input)
-2:05.5.0 core:save-as (input.hidden-input)
-2:03.7.0 core:select-down (input.hidden-input)
-2:01.1.0 core:move-left (input.hidden-input)
-2:00.7.0 editor:move-to-first-character-of-line (input.hidden-input)
3x -2:00.6.0 core:select-down (input.hidden-input)
-2:00.1.0 editor:select-to-end-of-line (input.hidden-input)
3x -1:58.9.0 aligner:align (input.hidden-input)
2x -1:26.6.0 settings-view:open (input.hidden-input)
4x -0:21.6.0 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)
Non-Core Packages
aligner 1.2.4
aligner-javascript 1.3.0
aligner-ruby 1.7.0
atom-handlebars 1.3.0
atom-wrap-in-tag 0.6.0
block-travel 1.0.5
busy-signal 1.4.3
clean-context-menu 0.3.2
erb-snippets 1.1.0
highlight-selected 0.14.0
intentions 1.1.5
language-csv 1.1.2
language-generic-config 1.4.0
language-graphql 0.11.0
language-nginx 0.8.0
language-rspec 0.12.1
language-syslog-ng 0.0.6
language-systemd 0.1.1
language-terraform 0.8.1
language-varnish 0.6.0
linter 2.2.0
linter-eslint 8.4.1
linter-js-yaml 1.3.0
linter-json-lint 0.1.3
linter-rubocop 2.2.3
linter-sass-lint 1.8.3
linter-terraform-syntax 1.2.4
linter-ui-default 1.7.1
pretty-json 2.0.3
rubocop-auto-correct 1.5.1
ruby-block-converter 4.1.1
sort-lines 0.18.0
ssh-config 0.14.0
yaml-sortkey 0.1.0
from atom-aligner.
- Open a bash file;
- I selected some points (CTRL + D);
- I navigated to the point where I would like to align;
- Press CTRL + ALT + /;
- 💥
Atom: 1.33.0 x64
Electron: 2.0.11
OS: Ubuntu 18.04.1
Thrown From: aligner package 1.2.4
Stack Trace
Uncaught TypeError: Cannot read property 'reset' of null
At /usr/share/atom/resources/app/static/<embedded>:14
TypeError: Cannot read property 'reset' of null
at TokenizedLine.t.exports.TokenizedLine.getTokenIterator (/usr/share/atom/resources/app/static/<embedded>:14:107078)
at TokenizedLine.get (/usr/share/atom/resources/app/static/<embedded>:14:107181)
at Object.getAlignCharacter (/packages/aligner/lib/helper.js:50:33)
at Aligner.alignAtRow (/packages/aligner/lib/main.js:40:30)
at editor.getSelectedBufferRanges.forEach (/packages/aligner/lib/main.js:28:14)
at Array.forEach (<anonymous>)
at Aligner.align (/packages/aligner/lib/main.js:25:38)
at HTMLElement.disposables.add.atom.commands.add (/packages/aligner/lib/main.js:74:12)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/<embedded>:11:349858)
at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app/static/<embedded>:11:1230399)
at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/static/<embedded>:11:1226533)
at WindowEventHandler.handleDocumentKeyEvent (/usr/share/atom/resources/app/static/<embedded>:11:285037)
Commands
-1:00.9.0 editor:move-to-first-character-of-line (input.hidden-input)
-1:00.6.0 intentions:highlight (input.hidden-input)
-1:00.5.0 editor:select-to-end-of-word (input.hidden-input)
-1:00.2.0 find-and-replace:select-next (input.hidden-input)
2x -0:59.8.0 core:move-right (input.hidden-input)
-0:59.5.0 intentions:highlight (input.hidden-input)
-0:59.4.0 editor:move-to-end-of-word (input.hidden-input)
-0:53.7.0 core:move-down (input.hidden-input)
-0:53.3.0 editor:move-to-first-character-of-line (input.hidden-input)
-0:53 intentions:highlight (input.hidden-input)
-0:52.9.0 editor:select-to-end-of-word (input.hidden-input)
-0:52.7.0 find-and-replace:select-next (input.hidden-input)
-0:52.4.0 editor:move-to-end-of-word (input.hidden-input)
-0:51.7.0 core:move-right (input.hidden-input)
-0:51.4.0 intentions:highlight (input.hidden-input)
-0:49.6.0 aligner:align (input.hidden-input)
Non-Core Packages
aligner 1.2.4
aligner-javascript 1.3.0
busy-signal 1.4.3
intentions 1.1.5
jslint 1.5.1
language-docker 1.1.8
linter 2.0.0
linter-docker 0.3.2
linter-php 1.5.1
linter-ui-default 1.7.1
markdown-scroll-sync 2.1.2
monokai-seti 0.9.0
seti-syntax 1.2.0
seti-ui 1.11.0
textmate-multimarkdown-syntax 0.1.0
from atom-aligner.
- Navigate to a JS file, and a group of lines to align
- Use Ctl + Alt + /
Atom: 1.32.0 x64
Electron: 2.0.9
OS: linux 4.18.16-96.current
Thrown From: aligner package 1.2.4
Stack Trace
Uncaught TypeError: Cannot read property 'reset' of null
At /usr/share/atom/resources/app/static/<embedded>:14
TypeError: Cannot read property 'reset' of null
at TokenizedLine.t.exports.TokenizedLine.getTokenIterator (/usr/share/atom/resources/app/static/<embedded>:14:107041)
at TokenizedLine.get (/usr/share/atom/resources/app/static/<embedded>:14:107144)
at Object.getAlignCharacter (/packages/aligner/lib/helper.js:50:33)
at Aligner.alignAtRow (/packages/aligner/lib/main.js:40:30)
at editor.getSelectedBufferRanges.forEach (/packages/aligner/lib/main.js:28:14)
at Array.forEach (<anonymous>)
at Aligner.align (/packages/aligner/lib/main.js:25:38)
at HTMLElement.disposables.add.atom.commands.add (/packages/aligner/lib/main.js:74:12)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/static/<embedded>:11:345848)
at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app/static/<embedded>:11:1226096)
at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/static/<embedded>:11:1222230)
at WindowEventHandler.handleDocumentKeyEvent (/usr/share/atom/resources/app/static/<embedded>:11:281284)
Commands
5x -9:16.2.0 core:backspace (input.hidden-input)
-0:53 intentions:highlight (input.hidden-input)
-0:52.8.0 aligner:align (input.hidden-input)
Non-Core Packages
aligner 1.2.4
aligner-javascript 1.3.0
aligner-php 1.3.0
atom-beautify 0.33.4
atom-minify 0.8.0
atom-typescript 12.7.3
busy-signal 1.4.3
docblockr 0.13.7
intentions 1.1.5
language-docker 1.1.8
linter 2.2.0
linter-docker 0.3.2
linter-js-yaml 1.3.0
linter-php 1.5.1
linter-sass-lint 1.8.3
linter-ui-default 1.7.1
minimap 4.29.9
ninja-atom-syntax 0.1.2
pretty-json 2.0.3
from atom-aligner.
I ran into this bug on atom 1.38.2 for a simple js alignment case. When I upgraded to 1.40.0-beta1
via Atom Beta, I no longer saw this bug. Seems atom/atom#19538 addressed the issue 🎉
from atom-aligner.
It has been at least 5 minor versions since 1.40.0 and hopefully everyone has upgraded. I'm going to close this issue now.
from atom-aligner.
Related Issues (20)
- TextEditor.module.exports.Object.defineProperty.get is deprecated. HOT 1
- Comment duplication when aligning variables with and without operators. HOT 1
- Change default keybinding HOT 1
- Align RSpec to eq HOT 11
- aligning destructuring statements removes/mangles code HOT 2
- Bug: Removing code (!) HOT 7
- Aligner not working on Linux HOT 4
- New Update Breaks functionality HOT 15
- Uncaught TypeError: Cannot read property 'getSelectedBufferRanges' of undefined HOT 4
- where to modify alignment options ? HOT 3
- aligner for salt states HOT 8
- different from file vue and file js HOT 8
- Atom aligner not working HOT 11
- TypeScript support HOT 3
- Aligner stopped working after atom updated to 1.19.0 HOT 2
- Package doesn't accept Ctrl-Alt-/ HOT 4
- Failed to activate the aligner package HOT 1
- Uncaught TypeError: Cannot assign to read only property 'row' of object '[object Object]' HOT 3
- Identical examples readme.md HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-aligner.