Giter Club home page Giter Club logo

Comments (5)

ltbits avatar ltbits commented on June 16, 2024 1

Thanks! mostly use go for apis and backends atm, also toying with rust a little and trying to not dislike bloated swift as I want to generate some income with ios/macos development in near future.

from ecmascript-sublime.

bathos avatar bathos commented on June 16, 2024

It’s intentional that platform API names aren’t scoped. Some of them used to be.

Assuming we’re just looking at globals, for a regular window env, there are over 800 named global platform objects / instances, not counting intrinsics. The specific set changes depending on [SecureContext], being in different types of workers, etc. New items are added very frequently.

One can choose an arbitrary subset, like other JS scopers do, but this is pretty chaotic in practice. If one is writing for an env where those names exist, some platform object names will be highlighted and some won’t be, which makes it into just noise. The other problem occurs when you’re not writing for such an env, or a name is just shadowed. Many of the names of platform APIs are common in other contexts. For example, three I used to run into a lot being misidentified as builtins were history, location, document in non-platform contexts.

I’m not opposed to changing how we approach this if @blake-regalia feels differently, but from my POV this is sorta a bug in other syntax defs that this one fixes.

from ecmascript-sublime.

blake-regalia avatar blake-regalia commented on June 16, 2024

@coloraggio : DOM globals are not part of the language. The same goes for node.js globals. If we assume too much about the user's environment, it can end up getting in their way as @bathos put it and cause annoying/misleading/unwanted syntax highlighting for those identifiers. I see the value in highlighting globals, but the browser is not the only environment this language is commonly used in (see here) and without knowing the environment, we would end up polluting the id space. However, we are open to user feedback and will take suggestions into consideration, so thank you for the comment!

This appears to be an issue with the package not properly supporting built-in SublimeText color schemes (Monokai, Mariana, etc.)

Just to clarify, this package ships its own color schemes because it creates 'ultra high-definition' scopes for your code that go far beyond the default color schemes available in ST3. Using Monokai with this package would be like watching a technicolor movie through goggles that make you color blind.

from ecmascript-sublime.

ltbits avatar ltbits commented on June 16, 2024

Sorry for a late reply @blake-regalia @bathos. During this pandemic, I abandoned my 10y interpreted language writing career and moved to modern compiled ones recently for my own peace of mind, so above isn't an issue for me anymore and can be closed. Thanks for the package, still on my ST3 when I need to write js here and there.

from ecmascript-sublime.

bathos avatar bathos commented on June 16, 2024

np. It’s a good issue to have on file for others to discover if they’re looking for the same thing. Good luck with the new trajectory (but don’t leave us hangin! — which language(s)?)

from ecmascript-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.