Autocomplete provider based on atom autocomplete-plus package.
Linux | MacOS | Windows |
---|---|---|
ctrl + space
. Uncheck manual-suggest
configuration setting to get suggestions at typing.allowed-scopes
configuration setting. Default selectors cover pretty much languages but is extensible by adding more scope selectors.Note to developers
If you find any selector combination that's missing or can improve this package make a PR with your add to allowed-scopes configuration setting.
Default providers are the very basic path suggestion providers on this package given path suggestions for paths relative to current file and working out of the box on all allowed scopes.
Default
./
or parent ../
directories.~/
./
targeting to base path configured within root-base-path
setting.
When not in a project, suggestions fallback to FileSystem root directory shown files with appropriate permisions.
Default
.string.quoted', '.text .string', '.text.html.basic'
.Atom-path-intellisense is not only based on default providers. Decoupling path suggestions mechanism from autocomplete-plus provider API gives the advantage of writing extended providers that cover more specific contexts and can be formatted in their own way.
We refer as extended providers to providers targeted to a specific language or more specific scope selectors and context.
Extended
Node.js path provider gives suggestions for Node.js module imports.
JavaScript
, CoffeeScript
and TypeScript
files at .string.quoted
scope selector.require()
and ES6 module import
statements.node_modules
directory) and modules relative to current file..js
extension.See more of extended providers ...
Install from atom´s settings/packages tab or run following command on a terminal:
apm install atom-path-intellisense
This package exports following configuration settings to config.cson
file:
allowed-scopes
Scope selectors (can be comma- separated) for which suggestions are shown. Apply to default suggestion providers. Other providers specify more specific selectors.
See: Scope Selectors Reference
string
'.source .string, .source.css.scss, .source.shell, .text .string, .text.html.basic'
enable-debug
Enable / disable debug options.
Atom's dev mode
$ atom --dev .
overrides this setting astrue
.
boolean
true
if Atom's dev mode $ atom --dev .
is enabled.false
otherwise.manual-suggest
If enabled (recomended), suggestions are provided by pressing ctrl + space
. Uncheck to get suggestions at typing.
boolean
true
provider-strategy-all
If enabled, All suitable providers that can resolve suggestions are called with no priority consideration. (A bit lower operation).
boolean
false
root-base-path
Path for root dir on relative paths /
.
Special values are:
system
: Targets to FileSystem root dir.project
: Targets to current project root dir.
When not in a project, suggestions fallback to FileSystem root directory shown files with appropriate permisions.
Windows and Unix paths are accepted depending on OS.
On Windows, absolute unix path/
is resolved to system partition:C:
in most cases. Eg:/Windows/
is resolved toC:\\Windows
.
string
project
Example of config.cson:
"*":"atom-path-intellisense":"allowed-scopes": ".source .string, .source.shell, .text .string, .text.html.basic""enable-debug": false"manual-suggest": true"provider-strategy-all": false
Atom
selectors.js
.autocomplete-plus
scope-helpers.js
.autocomplete-paths
specs
ones.Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.