Giter VIP home page Giter VIP logo

filetype-color's Introduction

filetype-color package

##Description This package makes it possible to modify the colors of file names in the side bar and the panes.

When enabled it will add an extra class according to the file extension, for example:

  • ".js" files get "filetype-color-js"
  • ".jpg" files get "filetype-color-jpg"
  • ".php" files get "filetype-color-php"

There are already some predefined colors, but if you want to override or add colors you can do it in your own "styles.less" file. An example could be:

.filetype-color-js { color: #90c276; }

##Usage Toggle on and off with ctrl-alt-cmd-b

##Screenshot Screenshot

##Disclaimer Since I don't code in coffeescript and the Atom API docs still leave a lot to be desired I couldn't see if there are any events fired when content changes in the tree and pane view. Until I figure that out, this package will be using the MutationObserver to listen for DOM changes. Probably a less desireable solution as it creates uneeded overhead and leaves me with no other choice but to set some timeouts before applying the colors. Any insight to how it may be optimized is appreciated.

filetype-color's People

Contributors

aqzhyi avatar barabadzhi avatar jhutchins avatar luke5542 avatar sankargorthi avatar sommerper avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

filetype-color's Issues

atom.workspaceView is no longer available

Via Deprecation Cop: Atom 0.176.0

atom.workspaceView is no longer available. In most cases you will not need the view. See the Workspace docs for alternatives: https://atom.io/docs/api/latest/Workspace. If you do need the view, please use atom.views.getView(atom.workspace), which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:53:11)
FiletypeColorView.toggle (/Users/bob/.atom/packages/filetype-color/lib/filetype-color-view.js:74:24)

and

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:53:11)
FiletypeColorView.initialize (/Users/bob/.atom/packages/filetype-color/lib/filetype-color-view.js:41:20)

Uncaught NotFoundError:

Uncaught NotFoundError: Failed to execute 'observe' on 'MutationObserver': The provided node was null.

Atom 0.172.0
on toggle attempt

/Users/user/.atom/packages/filetype-color/lib/filetype-color-view.js:96

79 var target = document.querySelector('.panes .pane ul');
ul seems to have changed recently to tabs-bar???

looks like might need to remove 'li' from line 147 and 170 for the elements
elements = paneView.querySelectorAll(".title");

-----Show Stack Trace------

Error: Failed to execute 'observe' on 'MutationObserver': The provided node was null.
at Error (native)
at FiletypeColorView.module.exports.FiletypeColorView.createPaneViewObserver (/Users/user/.atom/packages/filetype-color/lib/filetype-color-view.js:96:23)
at FiletypeColorView.module.exports.FiletypeColorView.toggle (/Users/user/.atom/packages/filetype-color/lib/filetype-color-view.js:72:18)
at atom-workspace. (/Users/user/.atom/packages/filetype-color/lib/filetype-color-view.js:43:30)
at atom-workspace.handler (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:115:32)
at atom-workspace.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4681:9)
at atom-workspace.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4359:46)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243: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:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
FiletypeColorView.initialize (/Users/Sophearak/.atom/packages/filetype-color/lib/filetype-color-view.js:65:20)

Toggle color only tree or tabs

Hello !

I like this package !
But actually I use only the coloration in the tabs because my files are often sort by type with folder. And this new color make pollution for the coloration change with git.
But I find it useful with the coloration in tabs because I could easily find which tab is my js or html or controller for a page.

So could you add in the preferences a way to choose which part is colored ?

thank you :)

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:54:11)
FiletypeColorView.toggle (/home/michel/.atom/packages/filetype-color/lib/filetype-color-view.js:110:24)

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
FiletypeColorView.initialize (/Users/john/.atom/packages/filetype-color/lib/filetype-color-view.js:65:20)

Deprecated Atom APIs will be removed June 1st

This package will not be loaded after June 1st without changes. There are a couple deprecations on the latest version of this package:

atom.workspaceView is no longer available. In most cases you will not need the view. See the Workspace docs for alternatives: https://atom.io/docs/api/latest/Workspace. If you do need the view, please use atom.views.getView(atom.workspace), which returns an HTMLElement.

Requiring View from atom is no longer supported. Please require atom-space-pen-views instead: {View} = require 'atom-space-pen-views' Add "atom-space-pen-views": "^2.0.3" to your package dependencies.

Visit https://gist.github.com/benogle/6d09e295c84b717ef9b4 and search for your package name to see what deprecations are being reported on this package.

See atom/atom#6867 for more info.

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (C:\Users\Victor\AppData\Local\atom\app-0.188.0\resources\app\src\atom.js:54:11)
FiletypeColorView.initialize (C:\Users\Victor\.atom\packages\filetype-color\lib\filetype-color-view.js:65:20)

Implement way to show diff in file tree

Before this package you can see what files are new and have changes as atom colors those (green/orange) for the git diff. With overriding colors it would be good to put an icon or an underline or something to signify the diff

Package.getStylesheetsPath is deprecated.

Store package style sheets in the styles/ directory instead of stylesheets/ in the filetype-color package

Package.getStylesheetsPath (/Applications/Atom.app/Contents/Resources/app/src/package.js:430:9)
Package.getStylesheetPaths (/Applications/Atom.app/Contents/Resources/app/src/package.js:441:32)

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
FiletypeColorView.initialize (/Users/waky/.atom/packages/filetype-color/lib/filetype-color-view.js:65:20)

Object.Object.defineProperty.get is deprecated.

Requiring View from atom is no longer supported.
Please require atom-space-pen-views instead:
{View} = require 'atom-space-pen-views'
Add "atom-space-pen-views": "^2.0.3" to your package dependencies.

Object.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app.asar/exports/atom.js:66:11)
Object.<anonymous> (/Users/nibushibu/.atom/packages/filetype-color/lib/filetype-color-view.js:8:32)
Module._compile (module.js:452:26)
Object..js (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)
Module.load (module.js:347:32)
Function.Module._load (module.js:302:12)

App not working

App not working, leads to 404 error, no changes in Atom, please help

Someone should clean up here...

Sorry but that's not like an issue tracker should be managed:
github_issuemanagmentdonewrong

@sommerper should close them and add the duplicate label.

Additionally there are many pull requests waiting to be merged, including the one (#36) which fixes most of the issues.
If the original authors does not want to merge them, someone should maybe consider forking this and keeping it up-to-date.

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
FiletypeColorView.initialize (/Users/bartvangemert/.atom/packages/filetype-color/lib/filetype-color-view.js:65:20)

Failed to load the filetype-color package

[Enter steps to reproduce below:]

  1. open atom in terminal

Atom Version: 0.190.0
System: Mac OS X 10.9.5
Thrown From: filetype-color package, v0.1.4

Stack Trace

Failed to load the filetype-color package

At Cannot read property 'prototype' of undefined

TypeError: Cannot read property 'prototype' of undefined
    at __extends (/Users/yriveiro/.atom/packages/filetype-color/lib/filetype-color-view.js:18:28)
    at /Users/yriveiro/.atom/packages/filetype-color/lib/filetype-color-view.js:32:5
    at Object.<anonymous> (/Users/yriveiro/.atom/packages/filetype-color/lib/filetype-color-view.js:246:3)
    at Module._compile (module.js:452:26)
    at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app/src/babel.js:162:21)
    at Module.load (module.js:347:32)
    at Function.Module._load (module.js:302:12)
    at Module.require (module.js:357:17)
    at require (module.js:376:17)
    at Object.<anonymous> (/Users/yriveiro/.atom/packages/filetype-color/lib/filetype-color.coffee:4:23)

Commands

Config

{
  "core": {
    "followSymlinks": true,
    "disabledPackages": [
      "emmet",
      "autocomplete",
      "go-plus",
      "Zen",
      "autocomplete-plus-async",
      "minimap",
      "minimap-find-and-replace",
      "minimap-git-diff",
      "symbols-tree-view"
    ],
    "themes": [
      "atom-dark-ui",
      "seti-syntax"
    ],
    "projectHome": "/Users/yriveiro/Development/github"
  },
  "filetype-color": {
    "enabled": "false"
  }
}

Installed Packages

# User
Atom-Syntax-highlighting-for-Sass, v0.5.0
atom-cli-diff, v0.11.0
atom-html-preview, v0.1.6
atom-jshint, v1.5.0
atom-lint, v0.20.1
autocomplete-paths, v1.0.2
autocomplete-plus, v2.9.0
autocomplete-snippets, v1.2.0
color-picker, v1.6.0
docblockr, v0.6.3
editor-stats, v0.17.0
file-icons, v1.5.3
filetype-color, v0.1.4
git-history, v2.3.0
git-log, v0.3.0
git-plus, v4.4.11
git-tab-status, v1.6.0
language-jade, v0.3.0
linter, v0.12.0
linter-php, v0.0.12
omni-ruler, v0.3.1
phpunit, v1.0.9
phpunit-snippets, v0.1.0
pretty-json, v0.3.2
script, v2.18.0
seti-syntax, v0.3.3
space-tab, v0.1.0
travis-ci-status, v0.13.0
vim-mode, v0.43.0
wakatime, v4.0.1
zentabs, v0.8.4

# Dev
No dev packages

Shortcut key

The readme states that the shortcut key to enable this is: ctrl+alt+cmd+b. There is no such cmd key on a Windows keyboard, so how can one enable this package?

Add auto toggle

Add in setting of package the option to auto toggle when open Atom.

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:54:11)
FiletypeColorView.initialize (/Users/Anvil/.atom/packages/filetype-color/lib/filetype-color-view.js:61:20)

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:54:11)
FiletypeColorView.initialize (/home/michel/.atom/packages/filetype-color/lib/filetype-color-view.js:65:20)

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (C:\Users\FGA\AppData\Local\atom\app-0.183.0\resources\app\src\atom.js:54:11)
FiletypeColorView.initialize (C:\Users\FGA\.atom\packages\filetype-color\lib\filetype-color-view.js:65:20)

`workspace` class is deprecated.

Use the atom-workspace tag instead of the workspace class.

C:\Users\Abdülhamit\.atom\packages\filetype-color\keymaps\filetype-color.cson:10:2

Uncaught TypeError: Cannot read property 'querySelectorAll' of null

If Tree View is hidden and filetype-color is enabled error is thrown while it switches from Settings pane to file pane and vice versa. Stack trace is attached below.

Atom ver.: 0.182.0
filetype-color ver.: 0.1.4

Stack Trace:
TypeError: Cannot read property 'querySelectorAll' of null
at FiletypeColorView.module.exports.FiletypeColorView.colorAll (/Users/cmlai/.atom/packages/filetype-color/lib/filetype-color-view.js:187:28)
at /Users/cmlai/.atom/packages/filetype-color/lib/filetype-color-view.js:161:26

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.