Coder Social home page Coder Social logo

Comments (8)

mtoader avatar mtoader commented on June 9, 2024

I haven't push a build with type complete on the idea plugins repository which means it can't work (unless you built it yourself :)).

About the Go to type: what works is the Ctrl + B shortcut when positioned on a type name inside a source file. I think you expected a Ctrl + N / Ctrl + Shift + N / Ctrl + Alt + Shift + N shortcut to work. Sadly that doesn't work.

I'll retest to make sure it works properly with the latest releases.

from go-lang-idea-plugin.

akaspin avatar akaspin commented on June 9, 2024

I'm tried Ctrl+B. No luck. "Cannot find declaration..."

from go-lang-idea-plugin.

mtoader avatar mtoader commented on June 9, 2024

Please tell me again your setup:

  • IDEA version
  • plugin version
  • go release version
  • os version

and tell me if you are able to compile a simple Hello World application.

If you are able to compile (meaning your setup is correct) then this is how it should work:

create a file with the following content

package x

import "fmt"

type X fmt.GoStringer

func main() {
var x X
var y fmt.Scanner
}

First check that the fmt.Scanner, fmt.GoStringer and X ( from the var x X declaration ) are green.
Second if put your cursor on any one of those tokens and hit Ctrl + B (using default keymap) you should jump to that type definiton: for example: from X you should jump to the type X type declaration and from fmt.GoStringer you should jump in a new open file named print.go with the cursor positioned at a declaration starting with: "type GoStringer interface {"

Now this might not work if you don't have a proper go sdk ( with sources ) but all the sdk's i saw have sources and i don't see how you couldn't :).

from go-lang-idea-plugin.

mtoader avatar mtoader commented on June 9, 2024

Ah .. and you have no place to jump to for basic types: int, uint{8,16,32,64}, etc :).

from go-lang-idea-plugin.

akaspin avatar akaspin commented on June 9, 2024

So. Some things. works. I recompile Go from tip (6326:a71c43c52bf6). Install Go Language Plugin 0.2.6 on Intellij IDEA Ultimate 95.538.

Test file with comments:

package x

import "fmt" // Autocomplete works

// Autocomplete not works
type X fmt.GoStringer // Green. Ctrl+B works.
type Y fmt.Formatter // Green. Ctrl+B works.
type Z fmt.Form // Green. But its error!

func main() {
    var x X var y fmt.Scanner
    // Ctrl+B from X works
    // fmt.Scanner is black and ends with error marker (semicolon.or.newline...)
    // Ctrl+B not works
}

from go-lang-idea-plugin.

mtoader avatar mtoader commented on June 9, 2024

Ok :)

I haven't worked on highlighting issues with types resolving yet so the fmt.Form issue is expected.

the fmt.Scanner seems like a parsing error.

Thanks for the report.

from go-lang-idea-plugin.

akaspin avatar akaspin commented on June 9, 2024

Oh. I forget about system.

  • Windows 7 x64
  • GOOS=windows
  • GOARCH=386
  • GOBIN=c:\go\bin
  • GOROOT=c:\go

Can you tell me - what Go components are critical for editing (not compiling or running - I do it under debian). For example: I can put some packages inder go/src/pkg but can't compile them under Windows. Is it critical?

from go-lang-idea-plugin.

mtoader avatar mtoader commented on June 9, 2024

two things:

  • the sources under $GOROOT/src/pkg/xxx/ (the enable go to type and type completion)
  • and a file named xxx.a under $GOROOT/pkg/ (if you want to be able to complete the package names inside the import declarations).

from go-lang-idea-plugin.

Related Issues (20)

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.