Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Make autocomplete scope aware for provider api #171

Closed

Description

@park9140

Ideally a given scope in a language would give us hints as to what providers to use.

For instance, the autocomplete-paths provider could automatically be enabled when a language denotes that a given point in a code has a path or filename scope.

Additionally, we should consider possibly allowing users to globally disable common scopes that they may or may not want autocomplete to engage. For example #107 could be solved by disabling autocomplete on the comment scopes

Activity

  1. joefitzgerald commented on Dec 18, 2014

    @joefitzgerald
    Contributor

    👍 Go-plus needs to be enabled for the entirety of the language-go grammar. Is this available as a scope?

  2. park9140 commented on Dec 18, 2014

    @park9140
    ContributorAuthor

    I believe this would just be source.go All the lines that match the go grammar get marked with it, generally it seems that you get a source.x where x is the language that is matched to a given line. In some cases files like ruby templates mix html and ruby syntax so you get different source.x scopes for different parts of the file.

    ✏️ wrote scope.x meant source.x

  3. joefitzgerald commented on Dec 18, 2014

    @joefitzgerald
    Contributor

    Quite right.

    scopeDescriptor = @editor.scopeDescriptorForBufferPosition(@originalCursorPosition)
    console.log(scopeDescriptor)

    screen shot 2014-12-18 at 12 14 46 am

  4. joefitzgerald commented on Dec 18, 2014

    @joefitzgerald
    Contributor

    This is definitely the direction we should head with this. And eliminate the coupling of AutocompleteManager <-> Editor.

  5. modified the milestone: 2.0 on Dec 31, 2014
  6. added a commit that references this issue on Jan 13, 2015
    8b47735
  7. added a commit that references this issue on Jan 26, 2015
    72fffa8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions