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.

Import scope is gone #166

@veger

Description

@veger

Description

The golang language used to have a entity.name.import.go scope, which could be used to see if the grammar was inside an import block:

import (
	"context"
	"errors"
	"fmt"
)

or

import "context"

But I cannot find this in the tree-sitter grammar rules (which seems to be used now?)

Is this expected, or forgotten to include?

My linter-spell-go package was using this to disable spell checking on import strings, that is how I noticed this issue.

Steps to Reproduce

  1. Open a golang file with some imports
  2. Move cursor to an import block
  3. Run Editor: Log Cursor Scope command

Expected behavior:

Scopes at Cursor
  source.go
  string.quoted.double
  entity.name.import.go

(or something like this, I cannot get the original anymore since it is gone)

Actual behavior:

Scopes at Cursor
  source.go
  string.quoted.double

Versions

$ atom --version
Atom    : 1.34.0
Electron: 3.1.1
Chrome  : 66.0.3359.181
Node    : 10.2.0

$ apm --version
apm  2.1.3
npm  6.7.0
node 11.9.0 x64
atom 1.34.0
python 2.7.15
git 2.20.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions