micro-editor / micro-editor/micro
Weird error for broken syntax highlighting
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
I have this btldr.yaml syntax file:
filetype: btldr
detect:
filename: \\.btldr$
header: "^# "
rules:
- comment.line:
start: "^# "
end: $
rules:
- identifier.callable: "[^ ]+"
- comment.line:
start: "^> "
end: $
rules:
- type.keyword: "\\b(Aliases|See also|More information)\\b"
- constant.string.url: "\\bhttps://.+\\b"
- comment.line:
start: "^- "
end: $
rules:
- identifier.type:
start: "\\["
end: "\\]"
skip: "\\\\[\\[\\]]"
- identifier.builtin: "\bstd(in|out|err)\b"
But when I start micro with *.btldr file I obtain this error and I don't know how to fix issue:
Error parsing syntax file btldr: interface conversion: interface {} is nil, not []interface {}
My goal is to highlight brackets and everything inside them in lines beginning with dash. Even when I remove skip key micro still fails.
Specifications
Commit hash:
OS:
Terminal:
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 parser error with the provided btldr.yaml syntax file and a matching *.btldr file, then inspect how micro loads syntax definitions and reports this interface-conversion failure. Done means the syntax file loads without an error and brackets and their contents are highlighted on dash-prefixed lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100