Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with highlighting #3488

Open
Drsheppard01 opened this issue Oct 1, 2024 · 3 comments
Open

issue with highlighting #3488

Drsheppard01 opened this issue Oct 1, 2024 · 3 comments

Comments

@Drsheppard01
Copy link

Text of error:
Error parsing syntax file sh: interface conversion: interface {} is nil, not []interface {}

Commit hash: 2.0.14
OS: Chimera Linux (it uses Musl)
Terminal: Gnome Console 47.1

P.S. When I wrote this issue and checked the available versions, I tried the nightly build and the nightly build didn't have this problem.

Could you please make new release?

@Andriamanitra
Copy link
Contributor

I am unable to reproduce the error on 2.0.14. Does this happen even if you start micro with a clean config directory 1? If not, please share your sh syntax file (typically located under ~/.config/micro/syntax/) – there is likely a mistake in it.

Footnotes

  1. you can specify a temporary directory as the config directory by running micro -config-dir $(mktemp -d)

@niten94
Copy link
Contributor

niten94 commented Oct 2, 2024

I tried testing a bit but I think the error occured because sh.yaml in master was copied and used. Empty rules did not have to be defined anymore in regions when #3458 was merged after v2.0.14 was released so they have been removed in builtin syntax files. Syntax files in v2.0.14 can be seen in this link or when switching to the tag in the file list page:
https://github.com/zyedidia/micro/tree/v2.0.14/runtime/syntax

I was thinking that it may be better to add a notice about incompatibility that can be seen when looking at runtime files on GitHub, but README.md in directories cannot be easily seen when looking at files or directories with a lot of files.

@JoeKar
Copy link
Collaborator

JoeKar commented Oct 2, 2024

I tried testing a bit but I think the error occured because sh.yaml in master was copied and used. Empty rules did not have to be defined anymore in regions when #3458 was merged after v2.0.14 was released so they have been removed in builtin syntax files.

Indeed this sounds to be the most likely case.

I was thinking that it may be better to add a notice about incompatibility that can be seen when looking at runtime files on GitHub, but README.md in directories cannot be easily seen when looking at files or directories with a lot of files.

No, the README.md is not a good place for that and offers a high risk to be ignored.
Since the runtime files (colorschemes, plugins and syntax) files highly depend on the related SW interfaces it is better to add a kind of a interface version description into these files. On incompatible changes they should be incremented on both sides as well as checked for compatibility in SW. If they don't fit a precise error message is the better way to tell the user what's going wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants