micro-editor / micro-editor/micro
Unknown snippets when inside other snippet
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description of the problem or steps to reproduce
Install snippets plugin: micro -plugin install snippets
Run command: micro test.c
Create main function using snippet: main, alt+s
Attempt to use printf snippet (pr, alt+s), get unknown snippet instead.
Using pr, alt+s outside main's curly braces: pr snippet works perfectly fine.
Am I doing something wrong, or is this a bug?
Specifications
Commit hash: 68d88b57
OS: Arch Linux
Terminal: foot
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.
Research direction
Reproduce the problem with the snippets plugin using micro test.c: expand main with alt+s, then try the printf snippet inside its braces and outside them. Start by tracing how the snippets plugin resolves names in the current editor context. Done means the printf snippet expands inside the generated main function as it does outside it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100