WerWolv / ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
https://imhex.werwolv.net
GNU General Public License v2.0
42.92k stars 1.89k forks source link

[Feature] Pattern Editor Code Autocompletion #1336

Open ketukil opened 11 months ago

ketukil commented 11 months ago

What feature would you like to see?

I would like to request a code autocomplete feature for the code editor. This feature would suggest relevant code snippets as the user is typing, which would help to speed up development and reduce errors. Code autocomplete is a common feature in many modern code editors and IDEs. It can be a very helpful tool for developers, especially when working with large or complex patterns. Code autocomplete can help to reduce the amount of time that developers spend typing code, and it can also help to catch errors early on.

How will this feature be useful to you and others?

Benefits:

There are a number of benefits to having a code autocomplete feature in the code editor. These benefits include:

Drawbacks:

There are a few potential drawbacks to having a code autocomplete feature in the code editor. These drawbacks include:

Overall, I believe that the benefits of having a code autocomplete feature in the code editor outweigh the drawbacks. I would encourage you to consider implementing this feature in a future release.

Request Type

Additional context?

No response

paxcut commented 11 months ago

Although I would agree with you in general, the truth is that the current pattern editor source code makes writing such extension pretty difficult. As proof of this notice how the editor lacks other simpler common features as a text search utility or a context menu. These are not missing because the editor has been neglected, but because the Dear ImGui text editor (which is what the pattern editor is) is pretty hard to work with.

But there is an alternative. There exists a Visual Studio Code extension that features

Features

    [X] Semantic syntax highlighting
    [X] Go to definition (Experimental. Don't expect it to work in the following scenarios)
        names defined in a namespace
    [X] Find references (Experimental. Don't expect it to work in the following scenarios)
        names defined in a namespace
    [ ] Inlay hints
    [ ] Completion
    [X] Run code on imhex

find it here https://marketplace.visualstudio.com/items?itemName=calcoph.hexpat-language-server

no autocompletion but it is probably easier to implement there than in the pattern editor.

github-actions[bot] commented 1 week ago

This issue is marked stale as it has been open for 11 months without activity. Please try the latest ImHex version. (Avaiable here: https://imhex.download/ for release and https://imhex.download/#nightly for development version) If the issue persists on the latest version, please make a comment on this issue again

Without response, this issue will be closed in one month.

paxcut commented 1 week ago

This feature is planned for once the syntax highlighting extension is completed and merged.