Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atom-community/autocomplete-paths
Autocomplete Paths for Atom
https://github.com/atom-community/autocomplete-paths
atom autocomplete autocomplete-paths
Last synced: about 1 month ago
JSON representation
Autocomplete Paths for Atom
- Host: GitHub
- URL: https://github.com/atom-community/autocomplete-paths
- Owner: atom-community
- License: mit
- Created: 2014-04-11T13:48:13.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-10-14T00:53:37.000Z (over 1 year ago)
- Last Synced: 2024-12-23T07:38:56.467Z (about 1 month ago)
- Topics: atom, autocomplete, autocomplete-paths
- Language: JavaScript
- Homepage:
- Size: 2.31 MB
- Stars: 151
- Watchers: 12
- Forks: 62
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# autocomplete+ paths suggestions [![Build Status](https://travis-ci.org/atom-community/autocomplete-paths.svg?branch=master)](https://travis-ci.org/atom-community/autocomplete-paths)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/atom-community/autocomplete-paths?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[View the changelog](https://github.com/atom-community/autocomplete-paths/blob/master/CHANGELOG.md)
Adds path autocompletion to autocomplete+ depending on scope and prefix. Supports custom scopes defined by the user.
![autocomplete-paths](http://fs5.directupload.net/images/160215/5tdhz7c4.gif)
## 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](https://github.com/atom/node-pathwatcher/issues/70). 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:```js
{
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:
```coffee
"autocomplete-paths":
scopes: [
{ ... },
{ ... },
]
```