helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.96k stars 2.51k forks source link

Incorrect syntax highlighting of imports in Odin #11711

Open antek-bizon opened 2 months ago

antek-bizon commented 2 months ago

Summary

The package ... and import ... in Odin have incorrect highlighting because they use @namespace instead of @keyword.control.import, like Rust, Go, and others do. Additionally, some of the keywords could be categorized better, e.g., defer as @function.macro, and struct and other storage types as @keyword.storage.type.

Reproduction Steps

For a simple hello-world.odin and gruvbox theme:

package main

import "core:fmt"
import rl "vendor:raylib"

main :: proc() {
    fmt.println("Hello, world!")
}

Expected behavior:

obraz

What I actually got:

obraz

Helix log

No logs.

Platform

Linux Fedora 39

Terminal Emulator

wezterm 20240915_153243_2d0c5cdd

Installation Method

DNF package manager

Helix Version

helix 24.7 (079f5442)

antek-bizon commented 2 months ago

Here's my fixed version: link