Bug 403901 - No constants highlighting for Julia
Summary: No constants highlighting for Julia
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-03 21:06 UTC by Nikita Sirgienko
Modified: 2019-06-15 09:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.60.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Sirgienko 2019-02-03 21:06:23 UTC
SUMMARY

KSyntaxHighlighting don't highlight constants, like "false", "Inf", "NaN", "nothing", "true". Is this so conceived? Just, in other supported languages, they are usually highlighted.
Comment 1 Nikita Sirgienko 2019-02-03 21:09:32 UTC
Also, it's not only about contants, functions also don't haghlighted: and syntax file haven't any functions names, unlike, for example, octave.xml, maxima.xml.
Comment 2 Dominik Haumann 2019-02-03 21:26:19 UTC
Can you please provide a patch that improves the highlighting file? We as developers cannot know all details of the ~300 highlighting files / languages. We repy on your support.
Comment 3 Nikita Sirgienko 2019-02-03 21:37:34 UTC
Theoretically, I could create keywordList for the constants with style dsConstant. But I am not sure, that this is improvment. What do you think?
Comment 4 Dominik Haumann 2019-05-19 16:04:41 UTC
@Nikita: Well, you propose to highlight constants - so I guess it is an improvement if you add a keyword list with all the constants to be highlighted.

If you add this list, we will commit this to the highlighting file.
Comment 5 Nibaldo G. 2019-06-10 07:54:53 UTC
I made a patch updating the syntax of Julia, if you could review it would be great: https://phabricator.kde.org/D21711
Comment 6 Nibaldo G. 2019-06-15 09:14:07 UTC
Git commit c91c2554215d578dd688d890f12011333189d578 by Nibaldo González.
Committed on 15/06/2019 at 09:13.
Pushed by ngonzalez into branch 'master'.

Julia: update syntax and add constants keywords

Summary:

Update Julia's syntax with some missing features, such as multi-line comments and strings, based on Julia's documentation. It also adds keywords of constants and types.

**Changes in julia.xml:**
* Add missing keywords. Add keywords of constants and modules.
* Numbers:
    * Allow underscores in numbers.
    * Add hexadecimal floating-point.
    * Add octales and binaries.
* Add multi-line comments.
* Add multi-line strings, raw strings, docs strings, byte arrays and Regex strings.
* Add command strings (with backstricks).
* Replace rules StringDetect with Detect2Chars in the detection of operators.

**Source:**
* Julia 1.1 Documentation: https://docs.julialang.org/en/v1.1/

Reviewers: #framework_syntax_highlighting, dhaumann, cullmann

Reviewed By: #framework_syntax_highlighting, cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D21711

A  +73   -0    autotests/folding/test.jl.fold
A  +80   -0    autotests/html/test.jl.html
A  +73   -0    autotests/input/test.jl
A  +73   -0    autotests/reference/test.jl.ref
M  +459  -40   data/syntax/julia.xml

https://commits.kde.org/syntax-highlighting/c91c2554215d578dd688d890f12011333189d578