Add `detect_from_pattern` function
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start by locating the existing extension, file_name, and shebang detection entry points in plenary.nvim; the issue does not name a file or test. Done means pattern-based rules can classify paths such as templates/*.yaml as gotmpl while preserving the existing detection rules.
Written by the indexing model from the issue text.
Description
It would be nice to add to the existing extension, file_name, shebang new function based on patterns. Something like that:
return {
extension = {
['jl'] = 'julia',
},
file_name = {
['.bashrc'] = 'bash',
},
shebang = {
['/usr/bin/node'] = 'javascript',
},
pattern = {
['.*/templates/.%.yaml'] = 'gotmpl',
}
}
For example, I have a set of Helm Charts that I can't change by specifying a modeline, and I can't specify a name because it matches a valid yaml files which is not a yaml-based go-templates.
Something like this:
kubenurse/
├── Chart.yaml
├── templates
│ ├── NOTES.txt
│ ├── _helpers.tpl
│ ├── daemonset.yaml
│ ├── ingress.yaml
│ ├── rbac.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
└── values.yaml
- Dominant language
- Lua
- Stars
- 3.5k
- Forks
- 340
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-lua/plenary.nvim
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
nvim-lua/plenary.nvim#682 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
nvim-lua/plenary.nvim#680 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
nvim-lua/plenary.nvim#675 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
nvim-lua/plenary.nvim#672 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
nvim-lua/plenary.nvim#671 · 1 comment ·
All issues in nvim-lua/plenary.nvim
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
[Eco] Egg Config Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
pterodactyl/game-eggs#634 ·
-
Feature Request
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Questie/QuestieTrace#33 ·