Giter Site home page Giter Site logo

color-gutter's Introduction

Hey there ๐Ÿ‘‹

I'm Ben and I write software, usually for work, sometimes for fun.

color-gutter's People

Contributors

andersos avatar bkbooth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

color-gutter's Issues

Commented lines aren't being found on first load

From https://discuss.atom.io/t/editor-isbufferrowcommented-not-working-on-first-load/11308/2?u=bkbooth

This method relies on tokens, which are created asynchronously, hence the issue if your code try to know if a line is commented before the tokenized buffer have been completely initialized.

# atom/atom/blob/master/src/editor.coffee#L473-L476
isBufferRowCommented: (bufferRow) ->
  if match = @lineForBufferRow(bufferRow).match(/\S/)
    scopes = @tokenForBufferPosition([bufferRow, match.index]).scopes
    new TextMateScopeSelector('comment.*').matches(scopes)

You should try to hook onto the tokenized event on the displayBuffer of the editor prior to any access to methods that uses tokens.

Fail to activate the package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.1 x64
Electron: 1.6.15
OS: Mac OS X 10.13
Thrown From: color-gutter package 0.3.1

Stack Trace

Failed to activate the color-gutter package

At Cannot read property 'command' of undefined

TypeError: Cannot read property 'command' of undefined
    at Object.activate (/packages/color-gutter/lib/color-gutter.coffee:11:25)
    at Package.module.exports.Package.activateNow (<embedded>:70734:25)
    at <embedded>:70706:38
    at Package.module.exports.Package.measure (<embedded>:70580:21)
    at <embedded>:70699:32
    at Package.module.exports.Package.activate (<embedded>:70696:40)
    at PackageManager.activatePackage (<embedded>:23965:42)
    at config.transactAsync (<embedded>:23940:36)
    at Config.module.exports.Config.transactAsync (<embedded>:20835:24)
    at PackageManager.activatePackages (<embedded>:23938:23)
    at PackageManager.activate (<embedded>:23921:50)
    at <embedded>:1092:36

Commands

Non-Core Packages

autoprefixer 3.7.1 
busy-signal 1.4.3 
closure-linter 0.2.5 
color-gutter 0.3.1 
coverage-gutter 0.19.0 
emmet 2.4.3 
intentions 1.1.5 
language-puppet 0.23.0 
language-rust 0.4.12 
linter 2.2.0 
linter-clang 4.1.2 
linter-codscriptizer 0.2.0 
linter-cpplint 2.0.1 
linter-csslint 2.0.0 
linter-dekiscript 0.1.2 
linter-erb 1.1.0 
linter-flake8 2.2.1 
linter-gjslint 1.5.2 
linter-hlint 2.0.0 
linter-htmlhint 1.3.4 
linter-js-yaml 1.2.8 
linter-jscs 4.1.3 
linter-jshint 3.1.6 
linter-jsl 0.0.1 
linter-lua 1.0.4 
linter-mcs 0.2.0 
linter-metascript 0.0.5 
linter-pep8 0.0.5 
linter-php 1.5.1 
linter-puppet-lint 0.8.3 
linter-pycodestyle 2.1.3 
linter-pyflakes 0.3.2 
linter-rst 0.0.3 
linter-rust 0.8.0 
linter-scalac 1.4.4 
linter-scss-lint 3.1.1 
linter-tidy 2.3.1 
linter-tslint 1.9.0 
linter-ui-default 1.6.10 
linter-write-good 0.9.0 
merge-conflicts 1.4.5 
seti-syntax 1.1.3 
seti-ui 1.9.0 
unity-dark-ui 2.0.9 

Doesn't appear to work

I'm running Atom v0.187.0 under Ubuntu 14.04 LTS and when I open a CSS file with colors all over it I see no colors in the gutter.

Does this work only for LESS / SASS, or should it work also for plain old CSS ?

Uncaught Error: This TextEditor has been destroyed

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.192.0
System: Mac OS X 10.10.3
Thrown From: color-gutter package, v0.4.1

Stack Trace

Uncaught Error: This TextEditor has been destroyed

At /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1022

Error: This TextEditor has been destroyed
  at DisplayBuffer.module.exports.DisplayBuffer.screenPositionForBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1022:15)
  at Marker.module.exports.Marker.getHeadScreenPosition (/Applications/Atom.app/Contents/Resources/app/src/marker.js:176:33)
  at new Marker (/Applications/Atom.app/Contents/Resources/app/src/marker.js:36:41)
  at DisplayBuffer.module.exports.DisplayBuffer.getMarker (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1247:20)
  at DisplayBuffer.module.exports.DisplayBuffer.markBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1287:19)
  at TextEditor.module.exports.TextEditor.markBufferPosition (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1232:62)
  at ColorGutterView.module.exports.ColorGutterView.markLine (/Users/norbert/.atom/packages/color-gutter/lib/color-gutter-view.coffee:76:22)
  at ColorGutterView.<anonymous> (/Users/norbert/.atom/packages/color-gutter/lib/color-gutter-view.coffee:67:14)
  at ColorGutterView.module.exports.ColorGutterView.updateColors (/Users/norbert/.atom/packages/color-gutter/lib/color-gutter-view.coffee:89:14)
  at /Users/norbert/.atom/packages/color-gutter/lib/color-gutter-view.coffee:1:1
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.applyPatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:550:20)
  at BufferPatch.module.exports.BufferPatch.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/buffer-patch.js:57:21)
  at Transaction.module.exports.Transaction.applyTo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/transaction.js:70:15)
  at History.module.exports.History.abortTransaction (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:169:24)
  at History.module.exports.History.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:126:16)
  at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:647:27)
  at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1107:26)
  at atom-text-editor.newCommandListeners.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:304:22)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:238:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:180:20)

Commands

  6x -1:46.6 core:backspace (atom-text-editor.editor)
  2x -1:42.9 core:select-to-top (atom-text-editor.editor)
  2x -1:41.5 core:select-to-bottom (atom-text-editor.editor)
     -1:37.3 editor:select-to-first-character-of-line (atom-text-editor.editor)
     -1:36.4 core:backspace (atom-text-editor.editor)
     -1:34.5 core:undo (atom-text-editor.editor)
     -1:24.5 settings-view:open (atom-text-editor.editor.is-focused)
     -0:26.4 core:move-right (atom-text-editor.editor.is-focused)
     -0:25.0 core:move-down (atom-text-editor.editor.is-focused)
     -0:23.7 editor:consolidate-selections (atom-text-editor.editor.is-focused)
  3x -0:18.7 find-and-replace:find-next (atom-text-editor.editor.is-focused)
     -0:16.5 find-and-replace:select-next (atom-text-editor.editor.is-focused)
  2x -0:14.5 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:14.1 core:cancel (atom-text-editor.editor.is-focused)
     -0:01.1 emmet:insert-formatted-line-break-only (atom-text-editor.editor.is-focused)
     -0:01.1 editor:newline (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "seti-ui",
      "seti-syntax"
    ],
    "audioBeep": false,
    "projectHome": "Users/norbert/quince/"
  },
  "color-gutter": {}
}

Installed Packages

# User
color-gutter, v0.4.1
color-picker, v1.6.0
emmet, v2.3.7
grunt-runner, v0.8.0
language-SCSS, v0.2.0
linter-scss-lint, v0.0.14
preview-plus, v1.1.19
project-colorize, v0.1.0
save-session, v0.13.5
seti-syntax, v0.3.3
seti-ui, v0.6.3

# Dev
No dev packages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.