Giter Site home page Giter Site logo

atom-community / atom-ide-definitions Goto Github PK

View Code? Open in Web Editor NEW
25.0 3.0 4.0 591 KB

Definitions for Atom IDE

Home Page: https://atom.io/packages/atom-ide-definitions

License: Other

JavaScript 100.00%
atom-ide go-to-definition atom atom-package hacktoberfest

atom-ide-definitions's Issues

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

`getSuggestionForWord` method in ClickProvider seems to make every word hyperclick-able

I reported this as a side note in atom-community/atom-ide-vue#13, but the relevant code appears to be in this repository.

When I install atom-ide-definitions, atom-ide-vue, and hyperclick, together, every word in my .vue files becomes underlined and hyperclick-able. Here's a screenshot, where the scoped attribute is underlined (the cursor isn't captured by the screenshot, but it over the word), even though it will not have a definition anywhere in a typical Vue codebase.

Screen Shot 2020-01-06 at 11 05 38 AM

Looking at https://github.com/atom-ide-community/atom-ide-definitions/blob/master/lib/clickProvider.js#L11, the implementation of ClickProvider::getSuggestionForWord seems to return an object for every word that is sent to it, when cmd-hovering (for Mac) over code. Hyperclick will treat every symbol as clickable if getSuggestionForWord always returns a truthy object result, hence the behavior I'm seeing.

My assumption is that the click callback is provided (in the Vue example) but atom-ide-vue via options.clickHandler, but that the return value of the getSuggestionForWord function is not controllable by the Vue package. To me, it seems that the language-level atom-ide plugins need to be able to determine whether or not a token has a definition and only return an truthy result if it does.

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.