Comments (4)
Regarding the colors: A syntax highlighting package only sets scopes, colors are determined from the scope by the color scheme. Type annotations have scope support.type
which is blue in the default color scheme, ordinary functions have scope variable.function
which is not colorized in the default color scheme.
This package currently breaks convention by setting scope support.function
for all function calls, this scope is only intended for built-in functions (such as map
, filter
, range
). This is how it should be done.
I will try to adhere to conventions as much as possible (comparing with built-in languages such as c, python, javascript).
I'm currently rewriting some things that where a mess, a fix for these things will be part of that.
from julia-sublime.
Indeed, this has been annoying me as well. I already have some local changes for this. However, some things need to be discussed:
(The numbers in what follow refer to the text in the images below.)
- Color of
<:
? An inconsistency is made clear in 3. I see no obvious solution. Making the<:
red inside a type breaks the flow and looks really confusing. - Since types are used a lot, and function calls by default have the same color as types. I'm considering making it so that functions do not get highlighted by the default theme. This is how essentially any other language behaves. Not sure why the choice was made to make functions blue originally.
- Default color of macros? It is very blue in 5. If functions are no longer blue, should macros still be? I like the idea of giving one color to types exclusively. Macros white, or some other color?
What do you think?
Previous syntax version, default color
Suggested new version, default color
Suggested new version, using my custom color theme to show difference
A file that uses many "edge cases" is (multidimensional.jl)[https://github.com/JuliaLang/julia/blob/master/base/multidimensional.jl#L23]. It does not look too good in the current state. With my current changes line 23 becomes
from julia-sublime.
👍 for your custom color scheme. I like orange for macros. Maybe something slightly different than the sea green for function calls? Maybe keep the function calls blue (which is a pleasing color) and make the parametric types sea green (which is slightly less pleasing, but will probably appear less often this way?).
Anyways, I like the underlying logic - so you should go for it once your happy. Also don't forget typealias
!
from julia-sublime.
Fixed in #21.
from julia-sublime.
Related Issues (20)
- Syntax hangs HOT 3
- Bug: trying to open julia/base/reducedim.jl fails HOT 3
- Syntax highlighting completely broken on ST4 HOT 16
- Definition / goto is broken for function definitions prefixed with package name HOT 3
- Syntax highlighting bug HOT 1
- Unicode Completion in Search Bar HOT 18
- Unicode expansion for other file types HOT 2
- Can not work in Markdown code block HOT 3
- Scope and syntax highlighting issue in the sequence scope
- Fix order of match blocks for macro rule HOT 4
- Docstrings are treated as regular strings if they are indented HOT 4
- Multi-line Comments HOT 4
- Recognizing keyword argument in f(x; kwd) HOT 11
- Package Control.sublime-package installation - I am lost... HOT 1
- Syntax highlighting for function name starting with `struct` broken
- v 4133 and unicode tab completion HOT 3
- Syntax highlighting inside quote block
- Error loading syntax file
- Correct syntax highlighting for "import Foo as Bar"
- Vector transpose breaks highlighting HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from julia-sublime.