Git Product home page Git Product logo

Comments (15)

ViktorQvarfordt avatar ViktorQvarfordt commented on May 24, 2024 1

I'm on Gitter btw.

from julia-sublime.

ViktorQvarfordt avatar ViktorQvarfordt commented on May 24, 2024

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.

ahwillia avatar ahwillia commented on May 24, 2024

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.

ViktorQvarfordt avatar ViktorQvarfordt commented on May 24, 2024

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.

ahwillia avatar ahwillia commented on May 24, 2024

Hmm sounds interesting. I'll have to try it out to see - but I agree that convention seems to make sense.

from julia-sublime.

ViktorQvarfordt avatar ViktorQvarfordt commented on May 24, 2024

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.

ahwillia avatar ahwillia commented on May 24, 2024

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.

ViktorQvarfordt avatar ViktorQvarfordt commented on May 24, 2024

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.

ahwillia avatar ahwillia commented on May 24, 2024

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.

ViktorQvarfordt avatar ViktorQvarfordt commented on May 24, 2024

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.

ahwillia avatar ahwillia commented on May 24, 2024

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.

screen shot 2016-08-11 at 12 57 16 pm

from julia-sublime.

ViktorQvarfordt avatar ViktorQvarfordt commented on May 24, 2024

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.

ahwillia avatar ahwillia commented on May 24, 2024

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.

ViktorQvarfordt avatar ViktorQvarfordt commented on May 24, 2024

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.

ahwillia avatar ahwillia commented on May 24, 2024

I think the way Modules are highlighted on develop looks great.

from julia-sublime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.