Code Monkey home page Code Monkey logo

javascript-completions's Introduction

Hi 👋, I'm Lorenzo Pichilli

A Heroku Architecture Designer and a Software Engineer mostly focused on Web (Full Stack) and Mobile Development. JavaScript, TypeScript & Flutter enthusiast 💙.

pichillilorenzo

Latest Blog posts

Connect with me:

lorenzopichilli lorenzo-pichilli 4637638 lorenzopichilli @pichillilorenzo

 pichillilorenzo

Support me and my projects

Donate with PayPal

javascript-completions's People

Contributors

bakman2 avatar pichillilorenzo avatar shigeki1120 avatar

Stargazers

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

Watchers

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

javascript-completions's Issues

Huge lag

I don‘t know what's happend.
After I removed the JavaScript-Completions and installed back, there is a huge lag caused by something in JavaScript-Completions plugin between each letter I enterd, I can't write a whole word.

Disable specific completions

Hello,
how can I disable specific completions?
E.g. I'd like to have apply, bind, call, toString, length completions, but without Function ( paramsAndBody_..: string )?
I'd like to be solution without editing the Packages/JavaScript Completions/sublime-completions/Function.sublime-settings file

Remove comments

Unfortunately, your plugin does not work for me, it is caused by comments.
Comments are not allowed in json files, may result in unpredictable behaviour.

Array, String and RegExp/array-string-and-regexp.sublime-completions:
   17      },
   18  
   19:     // Properties
   20:     // RegExp
   21      {
   22        "trigger": "global\tRegExp",
   ..
   44      },
   45  
   46:     // String
   47      {
   48        "trigger": "length\tString",
   ..
   50      },
   51  
   52:     // Array
   53      {
   54        "trigger": "length\tArray",
   ..
   56      },
   57  
   58:     //Methods
   59:     // RegExp
   60      {
   61        "trigger": "exec(${0:string})\tRegExp",
   ..
   71      },
   72      
   73:     // String
   74      {
   75        "trigger": "replace(${0:regexp|substr}, 'string')\tString",
   ..
  152        "contents": "valueOf()"
  153      },
  154:     // Array
  155      {
  156        "trigger": "join(${0:separator})\tArray",

Date/date.sublime-completions:
    9      },
   10  
   11:     // Properties
   12      {
   13        "trigger": "length\tDate",
   ..
   15      },
   16  
   17:     // Methods
   18      {
   19        "trigger": "now()\tDate",

DOM/Blob/blob.sublime-completions:
    9      },
   10  
   11:     // Properties
   12      {
   13        "trigger": "size\tBlob",

DOM/Document/document.sublime-completions:
  305      },
  306  
  307:     // Methods
  308      {
  309        "trigger": "document.caretPositionFromPoint(${0:x}, y)\tDocument",

DOM/Element/element.sublime-completions:
    4    "completions":
    5    [
    6:     // Properties
    7      {
    8        "trigger": "accessKey\tElement",
    .
   82      },
   83  
   84:     // Methods
   85      {
   86        "trigger": "getElementsByClassName(${0:names})\tElement",

DOM/Event/event.sublime-completions:
    4    "completions":
    5    [
    6:     // Properties
    7      {
    8        "trigger": "bubbles\tEvent",
    .
   43      
   44  
   45:     // Methods
   46      {
   47        "trigger": "preventDefault()\tEvent",
   ..
   57      },
   58  
   59:     // Events
   60      {
   61        "trigger": "abort\tEvent",

DOM/EventTarget/event-target.sublime-completions:
    4    "completions":
    5    [
    6:      // Methods
    7      {
    8        "trigger": "addEventListener(${0:type}, listener)\tEventTarget",

DOM/File/file.sublime-completions:
   13      },
   14  
   15:      // Properties
   16      {
   17        "trigger": "lastModifiedDate\tFile",
   ..
   36      },
   37  
   38:     //Methods
   39      {
   40        "trigger": "abort()\tFileReader",

DOM/Node/node.sublime-completions:
    4    "completions":
    5    [
    6:     // Properties
    7      {
    8        "trigger": "baseURI\tNode",
    .
   70      },
   71  
   72:     //Methods
   73      {
   74        "trigger": "appendChild(${0:aChild})\tNode",

DOM/Range/range.sublime-completions:
    4    "completions":
    5    [
    6:      // Properties
    7      {
    8        "trigger": "collapsed\tRange",
    .
   30      },
   31      
   32:     // Methods
   33      {
   34        "trigger": "cloneContents()\tRange",

DOM/Text/text.sublime-completions:
    9      },
   10  
   11:     // Properties
   12      {
   13        "trigger": "wholeText\tText",
   ..
   15      },
   16  
   17:     // Methods
   18      {
   19        "trigger": "splitText(${0:offset})\tText",

DOM/TreeWalker/treewalker.sublime-completions:
    4    "completions":
    5    [
    6:     // Properties
    7      {
    8        "trigger": "currentNode\tTreeWalker",
    .
   22      },
   23  
   24:     // Methods
   25      {
   26        "trigger": "firstChild()\tTreeWalker",

DOM/URL/url.sublime-completions:
    4    "completions":
    5    [  
    6:      // Properties
    7       {
    8        "trigger": "hash\tURLUtils",
    .
   54      },
   55  
   56:      // Methods
   57      {
   58        "trigger": "URL.createObjectURL(${0:file|blob})\tURL",

DOM/Window/window.sublime-completions:
    4    "completions":
    5    [
    6:     // Properties
    7      {
    8        "trigger": "window\tWindow",
    .
  266      },
  267  
  268:     // Methods
  269      {
  270        "trigger": "window.alert(${0:message})\tWindow",

DOM/Worker/worker.sublime-completions:
    9      },
   10  
   11:     // Properties
   12      {
   13        "trigger": "onerror\tWorker",
   ..
   19      },
   20  
   21:     // Methods
   22      {
   23        "trigger": "postMessage(${0:Message}, transferList)\tWorker",

Function/function.sublime-completions:
    9      },
   10  
   11:     // Properties
   12      {
   13        "trigger": "length\tFunction",
   ..
   15      },
   16  
   17:     // Methods
   18      {
   19        "trigger": "apply(${0:thisArg})\tFunction",

Number/number.sublime-completions:
    9      },
   10  
   11:     // Properties
   12      {
   13        "trigger": "Number.MAX_VALUE\tNumber",
   ..
   31      },
   32  
   33:     // Methods
   34      {
   35        "trigger": "toExponential(${0:fractionDigits})\tNumber",

Object/object.sublime-completions:
   13      },
   14  
   15:     // Properties
   16      {
   17        "trigger": "length\tObject",
   ..
   20  
   21  
   22:     // Methods0
   23      {
   24        "trigger": "delete(${0:Object})\tObject",





"Can I use" feature not working

Hi, the "can I use" feature doesn't work for me. Executed via the context menu or the keymap both do nothing. Changing the cursor position or selecting the word doesn't help either. The debug console prints:

File "C:\Users\Felix\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\_generated_2016_09_26_at_21_37_12.py", line 926, in run
    can_i_use_data = can_i_use_file.get("data")
AttributeError: 'NoneType' object has no attribute 'get'

Can't use Context menu options

Is it a bug or something?
Although i have selected the text, Surround With options still don't show up. So the Sort array option is.

image

When i restart sublime text, like the first 1 second i right click and see context menu. But after that, it seem hide and i can't see it anymore like above.

image

Multiple Completions shown

I doubt this is a real issue as it's probably something I'm not understanding or have misconfigured.

Should there be so many?

available completions

Is this a bug?

Hi.

'Auto-complete' it does not work after the update.
(ex. DOM selectors, array functions, etc..)

node js must die

  • Incredibly huge size of the plugin.
  • Can I USE don't always work.

Omit arguments

Hi, just curious how I can change the settings to just autocomplete the function name, without listing out all the arguments inside that function. Thanks a lot

menu not going away

I've updated the Javascript completion tools and it's not getting rid of the menu in the toolbar.

{
  "enable_can_i_use_menu_option": false
}

screen shot 2016-11-12 at 8 00 35 pm

"updating npm dependencies" every startup

"updating npm dependencies" every startup if installed Javascript-Completions, it disappeared after removed this plugin, so, How can I close "updating npm dependencies" if I need to ues this plugin?

No Completion window

Hello,
It seems like I don't get the completion window whenever I write code. Rather weird, even when its installed and enabled.

Currently running,
npm: 6.4.1
node: 8.10.0

Re-open and tried reinstalling ST3.

Make Sublime unresponsive on start

Hello,

This plugin is awesome but it make Sublime unresponsive for 1 or 2s when you start Sublime.
Can this be fixed please ?

Thanks !

Move plugin's main menu from root

Please move default plugin main menu topics from the root.
Nice enough place is a Tools submenu.

For those who wants to do this by it's own hands - modify the file
<Packages>/JavaScript Completions/Main.sublime-menu:

[{
  "id": "tools",
  "children": [{
    "caption": "JavaScript Completions Tools",
    "mnemonic": "J",
    "id": "javascript_completions_tools",
    "children": [{
        "caption": "Search on \"Can I use\" list",
        "command": "can_i_use",
        "args": { "from": "main-menu" }
      },
      { "caption": "-" },
      {
        "caption": "JSDoc",
        "id": "jsdoc",
        "children": [{
            "caption": "Generate Documentation",
            "command": "generate_jsdoc"
          },
          {
            "caption": "Add jsdoc-settings.json to the current project folder",
            "command": "add_jsdoc_settings_to_curr_project_folder"
          },
          { "caption": "-" },
          {
            "caption": "Go to JSDoc Site",
            "command": "open_url",
            "args": { "url": "http://usejsdoc.org/" }
          }
        ]
      },
      { "caption": "-" },
      {
        "caption": "Go to Node.js site",
        "command": "open_url",
        "args": {
          "url": "https://nodejs.org",
          "platform": "Windows"
        }
      },
      { "caption": "-" },
      {
        "caption": "GitHub Project",
        "command": "open_url",
        "args": { "url": "https://github.com/pichillilorenzo/JavaScript-Completions" }
      }
    ]
  }]
}]

P.S.: Use Preferences->Browse packages to locate Packages folder

Awesome 'Can I use'

Hello @pichillilorenzo, just didn't find out any other way how to directly (here, public) say 'Awesome, thank you!' 👍 That new function 'Can I use' is really amazing and so usefull. Keep doing so good stuff with your plugin. Thank You!

Extra space in the function body

When I use autocompletion for function declarations, it adds an extra space before the comment in the function body. Didn't want to bother you with such a trivial matter, but have not figured out how to fix it.

Autocomplete list at the end of the line

Hi,
I have some annoying issue with my ST3 JavaScript Completions package. So, whenever I hit space even If I haven't write anything yet I get JS autocomplete list with bunch of different functions and every time when I want to go to the next line I can't because there is that autocomplete list and I need to click esc button first to remove that list and than click enter so I can move on to the next line. It is pretty annoying when code is a bit longer, every time at the end of the line I need to click esc and than enter.

I don't want to remove that plugin, it's quite useful but I haven't this problem until today. I tried to reinstall that package but I still have the same problem.

Here is an example how it looks. My cursor is at the end of the line, after semicolon.
js-st

Custom Completions not working

Hello,
I had created my .sublime-completions file and since I've installed the JavaScript Completions my custom completions don't execute.
When I'm ignoring JavaScript Completions my completions work again.
How we can manage this to work simultaneously?

This is my .sublime-completions file:
`
{

"scope": "source.js",
"completions": [
    { "trigger": "_function with name (MY)", "contents": "function ${1:function_name}(${2:argument}) {\n\t${0:/*body...*/}\n}${3:;}" },
    { "trigger": "_function without name (MY)", "contents": "function(${1:argument}) {\n\t${0:/*body...*/}\n}${2:;}" },
    { "trigger": "for (MY)", "contents": "for(${2:i} = ${1:Things}.length - 1; ${2:i} >= 0; ${2:i}--){\n\t${3:${1:Things}[${2:i}]}${0}\n}" }
]

}
`

To prevent sublime autocompleter popup after semicolon(;) at the end of line

screenshot from 2017-10-18 11-20-07
screenshot from 2017-10-18 11-18-44
After ;, i.e at the end of each line when I press enter , I get word 'prototype' is added() by the auto completer.I i press shift+enter then acts as normal enter without any autocomplete. added. How can I stop auto-completion after a semi-colon?
and this is the list of packages I have installed..If any of these packages causing problem plz help me out

Key "?" not working

I'm trying to use the "key"? " but the plugin does not allow.

I used the log of the sublime to debug, hasten the following message:
"
File "C: \ Program Files \ Sublime Text 3 \ sublime_plugin.py", line 818, in run_
return self.run (edit)
File "C: \ Users \ admin \ AppData \ Roaming \ Sublime Text 3 \ Packages \ JavaScript Completions \ _generated_2017_04_09_at_16_06_42.py", line 951, in run
can_i_use_data = can_i_use_file.get ("data")
AttributeError: 'NoneType' object has no attribute 'get'
";

node.js upgrading on xp

the latest version of node for xp - 5.9.1, after the automatic upgrade to 6.6 it does not start. please disable updates for legacy platforms.

map(function(index, elem){})

When i use this package in ST3, i typed map and return this:

map(function(index, elem) {
    return something;
})

It's always confusing me,could you fix it?

Permissions break "Can I Use" feature

  • Sublime Text 3143 on Windows x64
  • starting ST with admin rights doesn't change anything
  • completions work fine

Error on starup:

Exception in thread DownloadCanIuseJsonData:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "C:\Users\*****\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\_generated_2017_04_09_at_16_06_42.py", line 783, in donwload_can_i_use_json_data
    os.rename(path_to_test_can_i_use_data, path_to_can_i_use_data)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\*****\\AppData\\Roaming\\Sublime Text 3\\Packages\\JavaScript Completions\\helper\\can_i_use\\can_i_use_data.json'

Error when calling the can i use function via the context menu:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 818, in run_
    return self.run(edit)
  File "C:\Users\*****\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\_generated_2017_04_09_at_16_06_42.py", line 951, in run
    can_i_use_data = can_i_use_file.get("data")
AttributeError: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 389, in run_callback
    expr()
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 620, in <lambda>
    run_callback('on_hover', callback, lambda: callback.on_hover(v, point, hover_zone))
  File "C:\Users\*****\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\_generated_2017_04_09_at_16_06_42.py", line 211, in on_hover
    str_selected = result.get("region_string_stripped")
AttributeError: 'NoneType' object has no attribute 'get'

Sublime freezing at startup

Every time on running of ST, JavaScript-Completions checks Node.js version, this cause ST freezing for 4 - 5 seconds.

key maping what is super? and hover_description not really working

First of all I just want to thank you for this awesome plugin I have been trying to find something similar to this for a very very long time.

Few suggestions:
You might want to add installation instructions on your doc, because not everyone is familiar with Sublime's Package Control. And also let them know after installing the package its best to restart sublime.

When you don't restart after installation a lot of things don't work for example 'find javascript description' result in 'not found' and perference>package settings> JavaScript completions> settings(default) will show a blank page. I installed and deleted your packages so many times I almost gave up, so be sure to note everyone to start sublime.

Problems:

  1. "enable_on_hover_description": true, I have made sure its set to true... but doesn't seem to work. Does it just takes a little time? or there is some settings I need to do...

  2. in the keymap what is "keys": ["ctrl+super+d"], I have tried command key but doesn't work.

Thank you again

Global autocompletions aren't loaded

I can't get the Global autocompletions working. It's turned on by default, but it doesn't work. I turned off all my other plugins, but it still fails.

Thank you

I wanted to take a moment to say thanks for all of your work JS Completions over the years. This is one of my favorite plugins, and I love how it works so much better than what's offered for editors like VS Code.

I know you've moved on to JS Enhancements, and I wanted to let you know how sad I am about this plugins deprecation.

It turns Sublime Text into a JavaScript IDE like!

That is, unfortunately, not something I want.

As a fellow OSS project owner, I 100% support your decision to take your project that you create for free in whatever direction you want, and wish you nothing but the best of luck.

But I did also want to ask/plead/beg you not to stop developing this one, if at all possible. And if not, I completely understand.

Thanks again!

Hide the "JavaScript Completions Tools" menu

Hello,

It will be very great if we had the possibility to hide the "JavaScript Completions Tools" menu. On my laptop on Fedora 25 that make the window too wide to use the "snap" windows (2 windows side by side) feature.

Thanks !

(Not working) 'Create class from object literal'

Hi - thanks a lot for this plugin.

I've just installed it and the 'create class from object literal' feature isn't working. Here's what I get in the console output after trying on a valid literal:

`Traceback (most recent call last):
File "C:..\Sublime text\sublime_plugin.py", line 818, in run_
return self.run(edit)
File "C:..\Sublime text\Data\Packages\JavaScript Completions_generated_2017_03_05_at_21_51_28.py", line 1129, in run
object_literal = json.loads(node.eval("JSON.stringify("+object_literal+")", "print"))
File "C:..\Sublime text\Data\Packages\JavaScript Completions\node\main.py", line 37, in eval
raise Exception(lines)
Exception: [eval]:1

JSON.stringify({

           ^

SyntaxError: Unexpected end of input

at createScript (vm.js:53:10)

at Object.runInThisContext (vm.js:95:10)

at Object.<anonymous> ([eval]-wrapper:6:22)

at Module._compile (module.js:571:32)

at Immediate.<anonymous> (bootstrap_node.js:390:29)

at runCallback (timers.js:666:20)

at tryOnImmediate (timers.js:639:5)

at processImmediate [as _immediateCallback] (timers.js:611:5)

`

disabling of `enable_on_hover_description` doesn't work

I wanna disable on hover description but when I changed in package settings in package settings > javascript completions> settings - default to false. it doesn't happened anything. after that I copy this option and paste in settings - user but still doesn't work.

How can I disable on hover description?

image

Thank you so much.

It can work but No prompt.

It can work but No prompt show me.
The Error:

Error: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\_generated_2017_04_09_at_16_06_42.py", line 776, in donwload_can_i_use_json_data os.rename(path_to_test_can_i_use_data, path_to_can_i_use_data) PermissionError: [WinError 32] El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso:'C:\\Users\\Administrator\\AppData\\Roaming\\Sublime Text 3\\Packages\\JavaScript Completions\\helper\\can_i_use\\can_i_use_data.json'

ValueError: Unterminated string starting at: line 1 column 1146878 (char 1146877)

Exception in thread DownloadCanIuseJsonData:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "./python3.3/threading.py", line 858, in run
File "D:\Program Files\Sublime Text 3\Data\Packages\JavaScript Completions_generated_2016_09_26_at_21_37_12.py", line 756, in donwload_can_i_use_json_data
json_file = json.load(json_file)
File "./python3.3/json/init.py", line 271, in load
File "./python3.3/json/init.py", line 316, in loads
File "./python3.3/json/decoder.py", line 351, in decode
File "./python3.3/json/decoder.py", line 367, in raw_decode
ValueError: Unterminated string starting at: line 1 column 1146878 (char 1146877)

disabled some snippets

Hi, there are a way to disabled some snippets.

I can't use my variables because there are so many completions from package. I would like to disable some and list what I need. There are a config file or other way?

Can I use key binding on windows

In docs there is a warning:

If you’re developing a package, keep this in mind:

  • Ctrl+Alt+ should never be used in any Windows key bindings.

And in this package ctrl+alt+w is used for Can I use feature here.

Critical mistakes in files

I've installed this package for Sublime Text 2 now and noticed that main completions aren't working. I noticed that only “description” completions are working. After some investigations, disabling Emmet and even SublimeCodeIntel (I thought they can affect work of this package) the problem was still.

And you know what's the trick? In your source files (.sublime-completions) you left comma “,” after every last JSON-object :) Result — bad syntax in your important files, everything is not working. I didn't look at every file, but definitely some of them with bad syntax. Quickly fix it!

Non-standard JSDoc configuration file

What is the logic in using a non-standard configuration file? For example, one of the options included in the jsdoc-settings.json file:

{
  "destination_folder": "out",
}

In a 'standard' JSDoc config file this would be:

{
    "opts": {
        "destination": "./out/"
    }
}

Intuitively, shouldn't the JavaScript Completions Tools 'Generate Documentation' command simply invoke JSDoc with the '-c' switch for a standard file name? Like so:

jsdoc -c jsdoc-settings.json

In it's current state, invoking JSDoc with the '-c' switch with JavaScript-Completions requires a config file that specifies yet another config file by the "jsdoc_conf_file" property.

Snippets and other completions gone

Hello there

After installing the plugin I can't use my own JS snippets anymore, they are completely gone. I also don't get any other auto completions anymore like variable names from within the file. What exactly is going on here? I'm having the same problem with the 'JavaScript Ultimate' plugin.

Sublime Text 3 Build 3103
OSX 10.11.4 El Capitan

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.