atom-community / atom-community/autocomplete-paths

How to make autocomplete working with twig files?

Open
#220 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
152
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm not able to autocomplete work into my twig files.
In my project I have this:
```
/images
/templates/.twig files
```

My config.cson (inspired by examples found in issues):
```
"autocomplete-paths":
scopes: [
{
scopes: [
"images"
]
prefixes: [
"include directory ~"
]
extensions: [
"png"
"jpg"
"jpeg"
"gif"
"twig"
]
replaceOnInsert: [
[
"(@[2-9]x)\\.png?$"
".png"
]
]
relative: true
includeCurrentDirectory: true
projectRelativePath: false
}
]
```

I would to autocomplete this kind of code:
` {% include directory ~ '/includes/dedicates_inc/inc_cdi_html.twig' %} `or for Sass Mixin:
`@include backgroundImage("PNG/liens@3x.png");`

thanks

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the missing completion with the shown config.cson and the example Twig and Sass paths. Check how the package interprets the configured scopes, prefixes, extensions, and relative paths; done means the requested Twig include and Sass image paths appear as completions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sass
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.