helix icon indicating copy to clipboard operation
helix copied to clipboard

Apostrophe (') while editing MATLAB not interpreted correctly.

Open handdara opened this issue 1 year ago • 1 comments

Summary

In MATLAB the apostrophe can be used both to denote a string as well as perform conjugation/transposition on Matrices. The latter is not recognized in the syntax highlighting and leads to odd highlighting.

This is a common problem. Here is the same issue in another editor.

Reproduction Steps

This is very easy to reproduce, simply load up the following code in helix.

        K = [A+ Kse,     G   ;
                G.' ,  H + Kbt];
            
        nb = Kse*(v - [0;0;1]);
        mb = Kbt*u;

And you should get something that looks like image

Helix log

No response

Platform

linux

Terminal Emulator

zellij

Helix Version

helix 23.03 (c6228825)

handdara avatar May 17 '23 13:05 handdara

You should report this upstream: https://github.com/mstanciu552/tree-sitter-matlab

kirawi avatar May 17 '23 17:05 kirawi

Closed by https://github.com/helix-editor/helix/pull/7388 See https://github.com/helix-editor/helix/issues/7386#issue-1763456264

gabydd avatar Jun 23 '23 15:06 gabydd