Skip to content

TODO list #1

Description

@klesun

Normal Priority

  • Should stop suggesting the var name from the following line as a key:
    image

  • Should provide property name completion in object destructuring assignment.

  • Should allow using different operation in local var jsdoc, like taking an element from array, not just calling it.

  • Should support typescript ReturnType<>

  • flatMap after flatMap - arg type not infered
    image

  • Should not suggest private class fields in typescript

  • When completing keys with special characters (like space) or numbers, should make it obj['some Key'] instead obj.Some Key. (webstorm does that for typescript keys)

  • Completion should work here: (flatMap() result; store.pricingBlockList[0]... does not seem to provide completion either, even though store.pricingBlockList.map(a => a)... does)
    image

  • Completion should work here: (result of function passed to a functiion)
    image

  • Make it possible to specify some directories to distinct modules with same names in jsdoc:

    * @param linearFare = require('Galileo/Pricing/LinearFareParser.js').parse()
    
  • Support and complete lodash get keys. Should suggest: bookingClass, segmentNumber here
    image
    and here as well
    image

  • Completion should work here: (lodash groupBy)
    image

  • Completion should work here: (again lodash map)
    image

  • Would be cool to be able to go to string by value in === expression like in php plugin.

  • It would be nice if current scope var completion worked as well, example: @param gdsData = parseCmdRs()

  • GoTo require() in the docs, pls

  • GoTo does not work here even though completion does:
    image
    image

  • Complete var names in @param a = at('SomeFile.js').someVar

  • Make @param a = at('File.js').varName support vars defined inside methods and anonymous functions (it currently only goes inside functions defined like var someVar = () => {...}).Also, please, exclude require() vars from completion options.

  • Completion still takes 800 ms even though there were just 300 expressions. I suspect that major part of CPU is spent on stuff like VarRes::findVarUsages. Should optimize it somehow if this is the case. I also have suspicion about JSScopeNamesCache.getOrCreateNamesForScope...
    Upd.: 300 ms gets taken by VarRes::findVarUsages. Could optimize that with reference search or some kind of caching like a hashmap per file or psi with var name as key.

  • When both this plugin and deep-assoc-completion are loaded, make /** @var hotel = DataFormats::getHotelById() */ provide completion using the type resolution from the other plugin.

  • Private func completion should work when you pass this function to .map(someFunc), .filter(someFunc), etc... by reference instead of directly calling it with .map(a => someFunc(a)).

  • Make it possible to specify return type as well in the docs like this: /** @return {Promise} makeSessionRecord() */

  • Replace hardcoded map, reduce, then, etc... completion logic with generics from built-in d.ts files.

  • Go To express route on Ctrl + B at string literal matching the route. Take that routes are defined in server.js or WebRoutes.js.

  • String value === completion.

  • Add inference from promise-sql SELECT * FROM {$tableName}

  • It would be nice to have path completion in the doc. Especially cool would be that when you type @param db = from('Db.es6') you got './backend/Utils/Db.es6' completion from all files with such name. Actually, this completion would be useful when you type real require('') as well

  • It would be handy, if in node project instead of import Db from "../Db.es6"; auto-import added const Db = require('../Db.es6');. Just an action that would convert them will be fine too.

Low Priority

  • When completing a method, should add parentheses in the end, since it's more often that you want to call a method, than to pass it somewhere.

  • When choosing what module to use in "Require by var name" intention - put @deprecated ones in the bottom of the list.

  • Guessed built-in completion options still corrupt the deep completion:
    image

  • I have a genius idea - when you Ctrl + B on a AMD define() module in func args, GoTo the path it corresponds to:

    define([
        'application',
        'abstract/dom_builder',
        'abstract/helper',
        'abstract/user',
        'page/common/constants',
    ], function(App, Dom, Helper, User, Constants) {

    Or maybe it's even possible to highlight them as references with Refernce Provider?

  • Should infer this.field type
    (Upd.: this would be rather troublesome since IDEA does not provide API to resolve all this usages in a class. Also, the completion would work here if you explicitly declared state as a cass field above the constructor)

    constructor () {
        this.state = {
            formData : {
                userOffices : [1, 5, 7],
                advancePurchase : {
                    units : "days",
                    amount : 0
                }
            }
            open : false
        };
    }
    
    render () {
        const {formData} = this.state;
        const {advancePurchase} = formData;
    
        console.log( formData.   <== zdesj suggest (advancePurchase, userOffices) );
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions