Giter VIP home page Giter VIP logo

autocomplete-paths's Introduction

autocomplete+ paths suggestions Build Status

Gitter

View the changelog

Adds path autocompletion to autocomplete+ depending on scope and prefix. Supports custom scopes defined by the user.

autocomplete-paths

Features

  • Support for JavaScript, CoffeeScript, TypeScript, PHP, SASS, LESS, Stylus, CSS, C, C++, Lua, Ruby and Python
  • Very efficient thanks to caching and incremental cache rebuilds (incremental builds are disabled for Windows. Please use the Rebuild Cache command.)
  • Easily extendable

Installation

You can install autocomplete-paths using the Preferences pane.

Defining scopes

autocomplete-paths triggers whenever a scope matches the current cursor position and scope descriptor. Here is an example for a JavaScript-Scope that supports the ES6 'import' syntax as well as the CommonJS require() syntax and the RequireJS define() syntax:

{
  scopes: ['source.js'], // Only triggers in JS files
  prefixes: [
    'import\\s+.*?from\\s+[\'"]', // import foo from '
    'require\\([\'"]', // require('
    'define\\(\\[?[\'"]' // define([' or define('
  ],
  extensions: ['js', 'jsx', 'ts', 'coffee'], // Only shows JS / TS / Coffee files
  relative: true, // Inserts relative paths only - defaults to true
  includeCurrentDirectory: true, // Include './' in path - defaults to true
  projectRelativePath: false, // Includes full relative path starting after the project directory
  replaceOnInsert: [ // Replaces the file extensions on insert
    ['.jsx?$', ''],
    ['.ts$', ''],
    ['.coffee$', '']
  ]
}

You can add custom scopes by adding them to your config.cson file:

"autocomplete-paths":
  scopes: [
    { ... },
    { ... },
  ]

autocomplete-paths's People

Contributors

aminya avatar avaly avatar aviatesk avatar bennypowers avatar cbarrick avatar edlongman avatar gitter-badger avatar grig0ry avatar guoshencheng avatar joefitzgerald avatar jordanbtucker avatar kczer0 avatar leggsimon avatar marcoms avatar michaguenther avatar mikemcbride avatar moritzkn avatar renovate[bot] avatar saschagehlich avatar semantic-release-bot avatar steelbrain avatar uzitech avatar yongkangchen 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autocomplete-paths's Issues

Make File Extension Optional

There are times when I'm working in Node or LESS/SASS that I'd love for autocomplete paths to not include the file extension. Any chance for a checkbox in the setting that turns this on or off?

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function

Atom Version: 0.158.0
System: linux 3.13.0-43-generic
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. edit a python file

Stack Trace

At /home/username/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13

TypeError: undefined is not a function
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/home/username/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13:25)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/home/username/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:177:39)
  at /home/username/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

Atom.Object.defineProperty.get is deprecated.

atom.services is no longer available. To register service providers and
consumers, use the providedServices and consumedServices fields in
your package's package.json.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:64:11)
Object.activate (/Users/Brian/.atom/packages/autocomplete-paths/lib/autocomplete-paths.coffee:8:25)

Scrolling the popup dialog view can skew the Atom UI

Edit: My mistake, accidentally posted to Autocomplete-paths instead of main Autocomplete and see this has already been raised there. Closing this.

I don't know the specific source of this problem, so not sure if this is the correct place for this, but I'll try anyway:

Weird behaviour warning In the specific case when I have typed only a "/" the autocomplete dialog, as expected, shows (on OS X) a list of the complete top level file system. But when I use the cursor keys to scroll the view past the initial list (default 10th --> 11th item) the scroll itself behaves as expected, but the Atom UI seems to get shifted up off the top of the window by approximately the height of the dialog box (about a quarter of the total window height on my screen). So the tabs, the top of the editor view and top of the tree view all disappear off the top of the window and the status bar grows by the same amount from the bottom.

The same thing happens if I first mouse scroll the view down (everything ok so far) and then use the cursors to move the selection down by just one item forcing the current dialog box view to move like before. Same UI shift occurs.

** confused ** Is this just me or can anybody else reproduce this? With the caveat that I haven't been able to revert the UI to its original state without re-opening a new window.

Uncaught Error: ENOENT, no such file or directory '/mersive'

Uncaught Error: ENOENT, no such file or directory '/mersive'

Atom Version: 0.157.0
System: linux 3.17.4-1-ARCH
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. type '/'

Stack Trace

At fs.js:726

Error: ENOENT, no such file or directory '/mersive'
  at Error (native)
  at fs.statSync (fs.js:726:18)
  at Object.fs.statSync (/usr/share/atom/resources/atom/common/lib/asar.js:155:14)
  at PathsProvider.<anonymous> (/home/despairblue/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:50:17)
  at PathsProvider.module.exports.PathsProvider.findSuggestionsForPrefix (/home/despairblue/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:99:10)
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/home/despairblue/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:17:20)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/home/despairblue/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:177:39)
  at /home/despairblue/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function

Atom Version: 0.161.0
System: linux 3.13.0-43-generic
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At /home/dan/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13

TypeError: undefined is not a function
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/home/dan/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13:25)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/home/dan/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:177:39)
  at /home/dan/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

as sugested i did sudo update and upgrade :)

Performance issue on large projects

On an ionic+cordova project with 955 files in the www folder, there are slowdowns while typing with autocomplete-paths enabled.

Running atom 0.177.0 on ubuntu 14.04, with the following packages:

Linter atom-color-highlight autocomplete-emojis
autocomplete-paths autocomplete-plus cucumber
file-icons highlight-selected lcov-info
auto-indent linter-jshint linter-php
merge-conflicts minimap minimap-color-highlight
minimap-git-diff minimap-highlight-selected minimap-selection
phpunit

Slowdown only occurs with autocomplete-paths enabled, speeds back up when only this package is disabled.

Path segment doesn't complete on Enter, v 1.0.2

I have autocomplete plus, 2.2.0, set to complete suggestions on enter, and it works.

However, I added autocomplete-paths, and the paths are correctly suggested but do not complete on enter, it just dismisses the popup and inserts a return.

I can't use tab since it completes with Emmet. Which is why I set autocomplete plus settings to "enter"

Uncaught Error: ENOENT, no such file or directory ...

on OSX, I get this error with valid paths, and it happens as soon as I type "../"

in code:

require '../'

in console:

Uncaught Error: ENOENT, no such file or directory '/private/var/www/project/path' 

but if I continue typing the path, it correctly finds the subdirs.

require './filename' works

Additionally, why pop up the console on errors? Why not highlight that line like a linter or something to that effect?

error in path.js file crashing Atom

I'm finding an error in the following function in the path.js file that's causing repeated crashing.

// Skip empty and invalid entries
      if (!util.isString(path)) {
        throw new TypeError('Arguments to path.resolve must be strings');
      } else if (!path) {
        continue;
      }

I don't know if it's an issue on my end (Mac OS Mavericks user) or if the package is not playing well with other Atom Packages, but I just thought I would let you know. I'll look around and see if I can find more. Thanks for your work to provide your package to the community and I look forward to future developments.

atom.service is deprecated

atom.services is no longer available. To register service providers and
consumers, use the providedServices and consumedServices fields in
your package's package.json.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:64:11)
Object.activate (/Users/user/.atom/packages/autocomplete-paths/lib/autocomplete-paths.coffee:8:25)

Uncaught TypeError: Cannot read property 'registerProviderForEditor' of null

Uncaught TypeError: Cannot read property 'registerProviderForEditor' of null

Atom Version: 0.162.0
System: linux 3.13.0-43-generic
Thrown From: autocomplete-paths package, v0.9.0

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At /opt/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:126

TypeError: Cannot read property 'registerProviderForEditor' of null
  at /home/kev1n/.atom/packages/autocomplete-paths/lib/autocomplete-paths.coffee:27:22
  at /opt/atom/resources/app/src/workspace.js:270:16
  at /opt/atom/resources/app/src/workspace.js:327:18
  at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at PaneContainer.module.exports.PaneContainer.addedPaneItem (/opt/atom/resources/app/src/pane-container.js:379:27)
  at /opt/atom/resources/app/src/pane-container.js:366:26
  at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at Pane.module.exports.Pane.addItem (/opt/atom/resources/app/src/pane.js:334:20)
  at Pane.module.exports.Pane.activateItem (/opt/atom/resources/app/src/pane.js:313:14)
  at /opt/atom/resources/app/src/workspace.js:494:16
  at _fulfilled (/opt/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:787:54)
  at self.promiseDispatch.done (/opt/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:816:30)
  at Promise.promise.promiseDispatch (/opt/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:749:13)
  at /opt/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:557:44
  at flush (/opt/atom/resources/app/node_modules/pathwatcher/node_modules/q/q.js:108:17)
  at process._tickCallback (node.js:378:11)

/cc @atom/core

Atom.Object.defineProperty.get is deprecated.

atom.services is no longer available. To register service providers and
consumers, use the providedServices and consumedServices fields in
your package's package.json.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:64:11)
Object.activate (/Users/hammackj/.atom/packages/autocomplete-paths/lib/autocomplete-paths.coffee:8:25)

Preventing file tabs to open

When I install autocomplete-paths, atom does not open tabs for file anymore. It says: Error: Failed to execute 'registerElement' on 'Document': Registration failed for type 'select-list'

I do not see the tabs but when I open the Tabs plugin, disable and enable it, they appear. However they are still not usable, if I open a new file it won't show up.

If I uninstall autocomplete-path, tabs work again.

I am on MacOs Yosemite. I have autocomplete-plus installed and few unrelated plugins: Tasks, Language Latex, Language OpenScad, Latex. I am linking my .atom folder to another folder, but only this computer access it.

Error in console:

Failed to load package named 'autocomplete-plus' Error: Failed to execute 'registerElement' on 'Document': Registration failed for type 'select-list'. A type with that name is already registered.
  at Error (native)
  at Object.<anonymous> (/Users/jgrizou/dotfiles/mackup/.atom/packages/autocomplete-plus/lib/select-list-element.coffee:157:47)
  at Object.<anonymous> (/Users/jgrizou/dotfiles/mackup/.atom/packages/autocomplete-plus/lib/select-list-element.coffee:1:1)
  at Module._compile (module.js:468:26)
  at Object.requireCoffeeScript [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/coffee-cache.js:61:19)
  at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:318:12)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at Object.<anonymous> (/Users/jgrizou/dotfiles/mackup/.atom/packages/autocomplete-plus/lib/main.coffee:3:21)
  at Object.<anonymous> (/Users/jgrizou/dotfiles/mackup/.atom/packages/autocomplete-plus/lib/main.coffee:1:1)
  at Module._compile (module.js:468:26)
  at Object.requireCoffeeScript [as .coffee] (/Applications/Atom.app/Contents/Resources/app/src/coffee-cache.js:61:19)
  at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:318:12)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/src/package.js:599:34)
  at /Applications/Atom.app/Contents/Resources/app/src/package.js:182:28
  at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:159:15)
  at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app/src/package.js:173:12)
  at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:339:16)
  at PackageManager.module.exports.PackageManager.loadPackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:316:14)
  at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:602:21)
  at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:12:8)
  at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:23:4)
  at Module._compile (module.js:468:26)
  at Object.Module._extensions..js (module.js:486:10)
  at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:318:12)
  at Module.require (module.js:373:17)
  at require (module.js:392:17)
  at window.onload (file:///Applications/Atom.app/Contents/Resources/app/static/index.js:59:25)
 /Applications/Atom.app/Contents/Resources/app/src/package.js:186

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function

Atom Version: 0.159.0-d9a5e3c
System: linux 3.13.0-43-generic
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. Typing anything

Stack Trace

At /home/stramel/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13

TypeError: undefined is not a function
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/home/stramel/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13:25)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/home/stramel/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:177:39)
  at /home/stramel/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

Not working with autocomplete-php

Hi.
When i type "/" then not show anything when autocomplete-php is enable.
if i disable autocomplete-php then it everything good
Please fix it.
Thanks.

i using
Atom (0.210.0)
autocomplete-paths (1.0.2)
autocomplete-php (0.3.6)
on Ubuntu 15.04

Error if string starts with "/" on Windows (7)

Error:
Uncaught Error: EPERM, operation not permitted 'c:\73b4d6ee0f07a5fa3545e7f4'
stack:
fs.statSync fs.js:714
(anonymous function) paths-provider.coffee:50
module.exports.PathsProvider.findSuggestionsForPrefix paths-provider.coffee:46
module.exports.PathsProvider.buildSuggestions paths-provider.coffee:17
module.exports.AutocompleteView.runAutocompletion c:\Users\xxxxx.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:153
(anonymous function) c:\Users\xxxxx.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:1

Atom.Object.defineProperty.get is deprecated.

atom.services is no longer available. To register service providers and
consumers, use the providedServices and consumedServices fields in
your package's package.json.

Atom.Object.defineProperty.get (C:\Users\Felipe\AppData\Local\atom\app-0.177.0\resources\app\src\atom.js:64:11)
Object.activate (C:\Users\Felipe\.atom\packages\autocomplete-paths\lib\autocomplete-paths.coffee:8:25)

Uncaught Error: ENOENT, no such file or directory

While typing a path the plugin is causing the console to open with error like:
Uncaught Error: ENOENT, no such file or directory '/js'

The folder in question do exist, not sure what is causing it.

The path I was writing was:
<script src="build/js/parallax.js"></script>

Works bad with Jade

Seems like it does not recognize my project file structure.

I have:

  • templates
    • library.jade
    • main.jade
    • blocks
      • about.jade
      • customize.jade

And when I typing blo I have right suggestions:

2014-05-09 15 22 10

But when I type / after that I have root of my volume:

2014-05-09 15 22 33

So I cannot get content of my project's folder:

2014-05-09 15 22 42

Can't autocomplete symlinked paths

When Autocomplete Paths attempts to traverse a path which contains a symlink, it throws an error:

Uncaught Error: ENOENT, no such file or directory '/path/tryingt/to/complete' fs.js:681

Uncaught Error: ENOENT, no such file or directory '/usr/bin/chef-zero'

Uncaught Error: ENOENT, no such file or directory '/usr/bin/chef-zero'

Atom Version: 0.155.0
System: Mac OS X 10.10.1
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. Using autocomplete-packages to /usr/bin
  2. Have a link to a file that doesn't exist.
  3. Profit!
lrwxr-xr-x  1 root  wheel  25 Oct 29 16:22 chef-zero -> /opt/chefdk/bin/chef-zero
/opt/chefdk/bin] % ls
berks                chef-client          chef-solo            foodcritic           ohai                 ruby-rewrite
chef                 chef-service-manager chef-vault           kitchen              rubocop              shef
chef-apply           chef-shell           fauxhai              knife                ruby-parse

Stack Trace

At /Applications/Atom.app/Contents/Resources/atom/common/lib/asar.js:52

Error: ENOENT, no such file or directory '/usr/bin/chef-zero'
  at Error (native)
  at fs.statSync (fs.js:726:18)
  at Object.fs.statSync (/Applications/Atom.app/Contents/Resources/atom/common/lib/asar.js:155:14)
  at PathsProvider.<anonymous> (/Users/jhulten/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:50:17)
  at PathsProvider.module.exports.PathsProvider.findSuggestionsForPrefix (/Users/jhulten/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:99:10)
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/Users/jhulten/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:17:20)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/Users/jhulten/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:156:38)
  at /Users/jhulten/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function

Atom Version: 0.157.0
System: linux 3.13.0-43-generic
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At /home/raul/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13

TypeError: undefined is not a function
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/home/raul/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13:25)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/home/raul/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:177:39)
  at /home/raul/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

C-style comment launches autocomplete-paths

Writing a C-style comment (either // or /* */) opens autocomplete-paths.

This is especially annoying when ending a multiline comment with */, pressing enter (for a line change) and having it turn into */bin/.

It would be a lot more user-friendly if it didn't launch on // or */. The former also happens to be in http://, so this would fix that too.

Performance issue on files > 150-200 lines

Hey there,

recently had massive performance issues while typing and autocomplete-paths enabled.
Everything works fine after disabling the package.

The problem doesn't occur if i'm inside the first 100-150 lines.
After line 150-200 i'm getting a huge performance issue while typing.
While typing it stuck for a few hundred ms every few characters.

Only tested js-files.

Greetings from Berlin
tststs

Atom.Object.defineProperty.get is deprecated.

atom.services is no longer available. To register service providers and
consumers, use the providedServices and consumedServices fields in
your package's package.json.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:64:11)
Object.activate (/Users/davide/.atom/packages/autocomplete-paths/lib/autocomplete-paths.coffee:8:25)

Crashes on Windows every time I type a forward slash "\"

Here's the stack trace

Uncaught Error: EBUSY, resource busy or locked 'c:\hiberfil.sys' fs.js:681
fs.statSync fs.js:681
(anonymous function) c:\Users\Caleb\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:50
module.exports.PathsProvider.findSuggestionsForPrefix c:\Users\Caleb\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:46
module.exports.PathsProvider.buildSuggestions c:\Users\Caleb\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:17
module.exports.AutocompleteView.runAutocompletion c:\Users\Caleb\.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:140
(anonymous function) c:\Users\Caleb\.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:1

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function

Atom Version: 0.158.0
System: Mac OS X 10.10.1
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At /Users/jack/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13

TypeError: undefined is not a function
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/Users/jack/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13:25)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/Users/jack/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:177:39)
  at /Users/jack/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function

Atom Version: 0.158.0-6cd96c8
System: linux 3.13.0-43-generic
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. Typing

Stack Trace

At /home/stramel/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13

TypeError: undefined is not a function
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/home/stramel/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13:25)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/home/stramel/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:165:38)
  at /home/stramel/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

URL breaks paths.

While I was editing a package.json file, autocomplete-paths was spamming my console with the following error :

Uncaught TypeError: Cannot call method 'split' of undefined c:\Users\Robin\.atom\packages\autocomplete-paths\lib\utils\path.coffee:27
path.dirname c:\Users\Robin\.atom\packages\autocomplete-paths\lib\utils\path.coffee:27
module.exports.PathsProvider.findSuggestionsForPrefix c:\Users\Robin\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:22
module.exports.PathsProvider.buildSuggestions c:\Users\Robin\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:17
module.exports.AutocompleteView.runAutocompletion c:\Users\Robin\.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:120
(anonymous function) c:\Users\Robin\.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:1

The JSON was the following :

{
  "name": "forge-ursa-compat",
  "version": "0.0.1",
  "description": "URSA API backed with forge javascript RSA",
  "homepage": "http://github.com/roblabla"
}

When I add a letter to the homepage, it will bring the error. I am using a self-compiled windows build of Atom, commit c79ef04.

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function

Atom Version: 0.158.0
System: linux 3.13.0-43-generic
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At /home/dan/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13

TypeError: undefined is not a function
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/home/dan/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:13:25)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/home/dan/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:177:39)
  at /home/dan/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

/cc @atom/core

Uncaught Error: EBUSY, resource busy or locked 'c:\hiberfil.sys'

Uncaught Error: EBUSY, resource busy or locked 'c:\hiberfil.sys'

Atom Version: 0.161.0
System: Unknown Windows Version
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. I was just adding a comment (//) to styles.less

It froze for a few seconds until the error showed up.

Stack Trace

At fs.js:726

Error: EBUSY, resource busy or locked 'c:\hiberfil.sys'
  at Error (native)
  at fs.statSync (fs.js:726:18)
  at Object.fs.statSync (C:\Users\Alberto\AppData\Local\atom\app-0.161.0\resources\atom\common\lib\asar.js:155:14)
  at PathsProvider.<anonymous> (c:\Users\Alberto\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:50:17)
  at PathsProvider.module.exports.PathsProvider.findSuggestionsForPrefix (c:\Users\Alberto\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:99:10)
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (c:\Users\Alberto\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:17:20)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (c:\Users\Alberto\.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:156:38)
  at c:\Users\Alberto\.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:1:1

/cc @atom/core

Uncaught Error: EPERM, operation not permitted 'c:\Config.Msi'

Uncaught Error: EPERM, operation not permitted 'c:\Config.Msi'

Atom Version: 0.161.0
System: Microsoft Windows 8.1 Pro
Thrown From: autocomplete-paths package, v0.7.0

Steps To Reproduce

  1. open any js file
  2. try adding comment (e.g. "//" -> on the first "/" it errors)

Stack Trace

At fs.js:726

Error: EPERM, operation not permitted 'c:\Config.Msi'
  at Error (native)
  at fs.statSync (fs.js:726:18)
  at Object.fs.statSync (C:\Users\pkolev\AppData\Local\atom\app-0.161.0\resources\atom\common\lib\asar.js:155:14)
  at PathsProvider.<anonymous> (c:\Users\pkolev\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:50:17)
  at PathsProvider.module.exports.PathsProvider.findSuggestionsForPrefix (c:\Users\pkolev\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:99:10)
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (c:\Users\pkolev\.atom\packages\autocomplete-paths\lib\paths-provider.coffee:17:20)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (c:\Users\pkolev\.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:156:38)
  at c:\Users\pkolev\.atom\packages\autocomplete-plus\lib\autocomplete-view.coffee:1:1

/cc @atom/core

Customize path separator

https://github.com/atom-community/autocomplete-paths/blob/master/lib/paths-provider.coffee#L92

I'm currently stuck using Windows, but I'm writing code that runs through browserify, so even though window's path.sep is \ I need all of mine to be /. Every time I autocomplete a directory it escapes my quote and I have to remove and replace the trailing / before I can continue.

I linked to the line that I'm fairly sure controls this, but I'm not sure how it should be customized by the user. A global setting for atom? Is there a concept of per-project settings?

Getting an exception when closing html tags

When I type "</" I get an exception:

TypeError: Expecting a function in instanceof check, but got undefined
at c:\Users\Henry.atom\packages\minimap\lib\mixins\view-management.coffee:84:28
at c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\src\pane.js:155:16
at Emitter.module.exports.Emitter.emit (c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\node_modules\event-kit\lib\emitter.js:71:11)
at Pane.module.exports.Pane.addItem (c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\src\pane.js:338:20)
at Pane.module.exports.Pane.activateItem (c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\src\pane.js:317:14)
at c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\src\workspace.js:483:16
at _fulfilled (c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\node_modules\q\q.js:749:13)
at c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\node_modules\q\q.js:810:14
at flush (c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:378:11)
c:\ProgramData\chocolatey\lib\Atom.0.145.0\tools\Atom\resources\app\src\workspace.js:499
Uncaught Error: EBUSY, resource busy or locked 'c:\hiberfil.sys'

Uncaught Error: ENOENT, no such file or directory '/etc/blkid.tab'

From @masterviana on December 11, 2014 18:46

Uncaught Error: ENOENT, no such file or directory '/etc/blkid.tab'

Atom Version: 0.154.0
System: linux 3.13.0-43-generic
Thrown From: autocomplete-paths package

Steps To Reproduce

  1. ...
  2. ...

Stack Trace

At /opt/atom/resources/atom/common/lib/asar.js:52

Error: ENOENT, no such file or directory '/etc/blkid.tab'
  at Error (native)
  at fs.statSync (fs.js:726:18)
  at Object.fs.statSync (/opt/atom/resources/atom/common/lib/asar.js:155:14)
  at PathsProvider.<anonymous> (/home/vviana/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:50:17)
  at PathsProvider.module.exports.PathsProvider.findSuggestionsForPrefix (/home/vviana/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:99:10)
  at PathsProvider.module.exports.PathsProvider.buildSuggestions (/home/vviana/.atom/packages/autocomplete-paths/lib/paths-provider.coffee:17:20)
  at AutocompleteView.module.exports.AutocompleteView.runAutocompletion (/home/vviana/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:156:38)
  at /home/vviana/.atom/packages/autocomplete-plus/lib/autocomplete-view.coffee:1:1

Copied from original issue: atom/atom#4556

Error thrown when using Express.js middleware for public folder

When using middleware to access assets in the public folder in an Express.js app, the plugin throws an error for a path like

  script(src="../javascripts/thirdparty/jquery-1.11.0.js")

because the file according to fs is

  script(src="../public/javascripts/thirdparty/jquery-1.11.0.js")

"\" instead of "/"

Hi,
my issue is about separator, on each directory instead of "/" I got "" and in this case next directory or files are not recognized.
Windows 7, the newest version of Atom and plugin.

Atom.Object.defineProperty.get is deprecated.

atom.services is no longer available. To register service providers and
consumers, use the providedServices and consumedServices fields in
your package's package.json.

Atom.Object.defineProperty.get (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app/src/atom.js:64:11)
Object.activate (/Users/pairingdeveloper/.atom/packages/autocomplete-paths/lib/autocomplete-paths.coffee:8:25)

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.