Coder Social home page Coder Social logo

adobe-research / brackets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adobe/brackets

16.0 16.0 4.0 44.51 MB

An open source code editor for the web, written in JavaScript, HTML and CSS.

Home Page: https://twitter.com/brackets

License: MIT License

JavaScript 99.42% Ruby 0.11% Shell 0.11% PHP 0.36%

brackets's People

Contributors

cantrell avatar cfjedimaster avatar chrisbank avatar couzteau avatar dangoor avatar denniskehrig avatar eztierney avatar garthdb avatar gruehle avatar iwehrman avatar jasonsanjose avatar jbalsas avatar jdiehl avatar joelrbrandt avatar jrowny avatar lkcampbell avatar mikechambers avatar mynetx avatar njx avatar peterflynn avatar pritambaral avatar pthiess avatar raymondlim avatar redmunds avatar ryanstewart avatar soswow avatar tommalbran avatar tvoliter avatar walfgithub avatar websitedeveloper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

brackets's Issues

HintUtils.maybeIdentifier excludes valid javascript identifiers

Noticed in the pull request to brackets main:

adobe#3439

This is obviously not a regression from current behavior, but I do wonder if this
code is going to fail on valid identifiers. Ahh, I see. It does fail some in that if I
have a variable called façade, if I type faç the hinting stops until I hit the a.
Anyhow, it's a minor point and nothing to fix now."

Jump to definition not working for var exported from a module

Open the JavaScriptCodeHints as your project folder.

Open ScopeManager.js.

Scroll to near the end of the file and select any of the member references on HintUtils in the _ternWorker.addEventListener callback function, e.g. line 476 has:

    } else if (type === HintUtils.TERN_JUMPTODEF_MSG) {

With the cursor somewhere inside TERN_JUMPTODEF_MSG, press Cmd+J on Mac (or Ctrl+J on Win).

It doesn't jump to the definition of the exported var. However, jump to definition works for exported function members.

If you try to write code and get hints for members of HintUtils, Tern does seem to know about these exports.

Inconsistent information for module hints

(Found this in the version currently in the Brackets pull request adobe#3439.)

  1. File > Open Folder and open the root of the Brackets repo
  2. Open the file src/editor/EditorManager.js
  3. Place the cursor immediately below the list of require statements at the top
  4. Type ViewUtils. - hints show addScrollerShadow, removeScrollerShadow
  5. Delete ViewUtils. and type PerfUtils.

Result: Hints show addScrollerShadow, removeScrollerShadow again, instead of the hints for PerfUtils. If you close and reopen the file and then type PerfUtils., you get more appropriate hints.

Expose go-to-definition from JavaScriptCodeHints extension.

Brackets has an existing feature called Go-To-Definition via Cmd-T, but it is more so a find function feature and doesn't support arbitrary variables.

It would be great to have a new key binding that looked at the current cursor position and determined the relevant identifier, and then went to its definition, including across multiple files. It should support variables and functions.

Hinting of String literals

In the legacy JavaScriptCodeHints extension, string literal values were tracked and historical values were hinted in new string literals.

Improve guess proposals when type is not known

When a type is known, don't show guesses.
When a type isn't known, show guesses immediately.
As the user starts typing, only proposals matching the substring (case insensitively, with intra-string matching) are shown. The sub-matching list switches over to guesses once type proposals run out.

Find a function's invocations

This is more of a wish than an issue, but I've wanted for some time a command that exposes all the invocations of a particular function definition. Something like the inverse of Go To Definition or Quick Edit. This may be outside the purview of the hinter, but the functionality found therein would probably be useful for such a feature.

jumping to an object created with {} not working correctly.

  1. past following code in brackets:

var base = {foo: 10, bar: 20, foo2: { a: 10, b : "test" }};
base.foo2.a = 11;
base.foo2.b = "hello";
base.foo = 10;
2. put cursor on base.foo line, "foo", try to jump to
--> no response

  1. put cursor on base.foo2.a line: "foo2", try to jump to
    -->it jumps to the "{ a: 10, b : "test" }", the code section is color highlighted.

Expect:
for case 2, it should put cursor on "foo", for case 3, put cursor on "foo2".

Consider deprioritizing identifiers that come from .json definition files instead of sources

Given identifiers are sorted by depth to help people keep track of the variables they are most likely to be working with, when users have their own globals in a .js file, it would be nice to consider these separate from the .json built-ins for the purposes of completion hint groups, even though they're all ultimately globals.

This may require additional information from Tern.JS.

Hints appear immediately after comma in object literal

At the top level of a file in a JS project that will generate some heuristic hints, type: { foo: bar,

Result: Code hints pop up after the comma. There are two problems with this: (1) it's not clear to me that hints are appropriate here since I'm about to type another key, so there should be no completions; (2) the first item in the hint is selected, so when I hit Return it inserts that item, which is not what I want here since I usually create a newline after a comma.

Should be able to configure require roots

It would be nice to have a way to configure module roots, possibly in a settings panel. For Brackets, I initially thought the module-based hinting wasn't working because I usually set my project root to be the root of the brackets repo. It all started working properly once I figured out to open the src folder.

Reload sometimes required to get .prototype proposals

//Define a functional object to hold persons in javascript
var Person = function (name) {
this.name = name;
};

//Add dynamically to the already defined object a new getter
Person.prototype.getName = function () {
return this.name;
};

//Create a new object of type Person
var john = new Person("John");

john. // Hint here only shows name, not getName() function. On reloading, it shows up.

Function signature hints showing ?

//Define a functional object to hold persons in javascript
var Person = function (name) {
this.name = name;
};

//Add dynamically to the already defined object a new getter
Person.prototype.getName = function () {
return this.name;
};

//Create a new object of type Person
var john = new Person("John");

john.getName( // hint here shows ?

Investigate integrating Brackets StringMatch as algorithm for partial hint proposal matching

Kevin commented in brackets-dev google groups forum:

"I've actually wondered how it would be to use Brackets' StringMatch for code hints, but haven't had a chance to try it out. It would likely be easy for you to plug in.

Some background:
http://www.blueskyonmars.com/2013/03/26/brackets-quick-open-thats-no-regex/

and the code itself:
https://github.com/adobe/brackets/blob/master/src/utils/StringMatch.js"

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.