Comments (15)
I'm on Gitter btw.
from julia-sublime.
Great! Had not thought about this. First highlighted line: We definitely want all of MyModule.MyType
to be highlighted as a type. However, when calling or defining MyModule.myfunc
, don't you think that only the function should be highlighted (as a function call/blue or new function/green)?
from julia-sublime.
I sort of think of MyModule.whatever
as a single unit, and hence think the same color would work well. I guess I don't feel super strongly as long as it is consistent for a function call and definition.
from julia-sublime.
I tend to think of MyModule.whatever
as separate entities :) Clearly this is largely personal preference. Therefore will try to follow convention on as much as possible. After looking at other languages (built-ins like c, python, javascript), the convention is to set the scope of the module/type/object containing the function as variable.other
and the function itself as variable.function
for function calls. Redefining functions in modules is not common in other languages, but as you say this should behave the same to the choice for function calls.
I'm currently rewriting some things that where a mess, a fix for these things will be part of that.
Note that all function calls except the core Base
exported functions will become white. Because I will attempt to follow sublime convention, this is how all other languages behave, it feels weird to deviate from this. Scream loudly you think this is bad. Note that all function calls will get the scope variable.function
, so that they can be colorized in a custom color scheme.
from julia-sublime.
Hmm sounds interesting. I'll have to try it out to see - but I agree that convention seems to make sense.
from julia-sublime.
A lot has happened and stuff have been fixed. Pave a look in #21 and see what you think. If you're up to it it would be great if you could use develop
for some days and see if it's okay. Note that the tests cover all issues that have been opened (and the tests are passing :))
from julia-sublime.
Happy to try it out -- I'm not too familiar with Sublime's package system. How would I checkout the development branch?
from julia-sublime.
Assuming Linux (otherwise other path): Sublime packages are put in ~/.config/sublime-text-3/Packages/
, I guess you will see Julia or Julia-sublime in there. You'd need to remove that, to not confuse package control you should remove (uninstall or deactivate) via Package Control from within sublime. Then, into the Packages folder, do
$ git clone https://github.com/JuliaEditorSupport/Julia-sublime.git
$ git checkout develop
opening the syntax_test_julia.jl
would be a good way to see the new highlighting, the most interesting things happen at lines starting with 234, function definitions.
from julia-sublime.
Is the Mac equivalent path /Users/alex/Library/Application Support/Sublime Text 3/Packages/User
? This doesn't look right...
Do you know if it would be possible to alter Package Control settings to follow develop
rather than master
? https://packagecontrol.io/docs/settings
from julia-sublime.
Yeah that's right, but don't go into user, one level up. You can also get to the package dir by cmd-shift-P --> Browse Packages
Unfortunately package control cannot be configured to change branch.
from julia-sublime.
Unfortunately package control cannot be configured to change branch.
That's pretty lame.
I'm not seeing a Julia folder... Just this weird bz2
folder.
from julia-sublime.
Ah, my bad: Package control installs packages into /Users/.../Library/Application Support/Sublime Text 3/Installed Packages/
But you should not touch those files. Do cmd+shift+p remove package instead
from julia-sublime.
Ok - I did that and then added this repository through package manager... But I can't seem to set syntax highlighting to Julia... Do I need to activate it or something?
The relevant bit of my Package Control.sublime-settings
file now looks like:
"installed_packages":
[
"Package Control",
"UnicodeMath"
],
"repositories":
[
"https://github.com/JuliaEditorSupport/Julia-sublime"
]
from julia-sublime.
You cannot install manually in this way via package control. "repositories" refers to a special type of config file, like the default package control repository https://github.com/wbond/package_control_channel/tree/master/repository
Manual git clone (or just zip download) would be easiest.
from julia-sublime.
I think the way Modules are highlighted on develop
looks great.
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"
- Error loading syntax file "Package/Julia/Julia.sublime-syntax" HOT 8
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.