Coder Social home page Coder Social logo

go-tmbundle's Issues

Syntax highlighting problem

var (
	factories      = make(map[string]func() (Collector, error))
	collectorState = make(map[string]*bool)
)

func registerCollector(collector string, isDefaultEnabled bool, factory func() (Collector, error)) {
  // ...
}

Note that everything is black after collectorState variables.

Support goimports

It would be nice to be able to use goimports in place of gofmt. Maybe with an environment variable?

`Can't find "gocode" on PATH` displayed when I press esc in a .go file

When I press esc in a .go file, I get:

Can't find “gocode” on PATH.

The current PATH is:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/X11/bin
/usr/local/sbin
/Users/daryls/programming/golang/go/bin

Please add the directory containing “gocode” to PATH in TextMate's
Shell Variables preferences.

Alternatively, the PATH can be retrieved from Terminal but this
requires a relaunch:

Set PATH and Relaunch.

Gocode completion stopped working

Since I've upgraded to OSX Mavericks, the gocode completion stopped working.
Gocode is installed, TextMate has both TM_GOCODE and PATH configured to reach the gocode binary.

I also have SublimeText 2 installed, it's gocode completion works fine.

Is there any way to debug this, console output, text mate bundle output?

Support TextMate 2

It'd be best to allow the bundle to be selected/installed from the Bundle preference pane of TM2. That would make installation even easier.

Indentation in TM2 differs from go fmt

go fmt uses tabs, and ctrl+shift+h uses spaces. I opened gomate.rb and found this:

    if ENV['TM_SOFT_TABS'] && ENV['TM_SOFT_TABS'] == 'YES'
      args.push('-tabs=true')
    else
      args.push('-tabs=false')
    end

Isn't the logic reversed here?

error @ build or run or compile

i am not sure if this is the best place to raise this....i get this error when i try to compile with a golang bundle. i hoping somebody can help me resolve this issue. prog compiles and works fine using command line -

:29:in require': no such file to load -- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder (LoadError) from :29:inrequire' from /Users/ns/Library/Application Support/TextMate/Bundles/Go.tmbundle/Support/goerrs.rb:3:in ' from :29:inrequire' from :29:in require' from /Users/ns/Library/Application Support/TextMate/Bundles/Go.tmbundle/Support/gomate.rb:5:in' from :29:in require' from :29:inrequire' from /tmp/temp_textmate.KoOLaG:3:in `'

missing file ?

/Users/user/Library/Application Support/TextMate/Bundles/go.tmbundle/Support/goerrs.rb:3:in `require': no such file to load -- /Applications/TextMate.app/Contents/SharedSupport/Support/lib/Build

I don't have a Build.rb in this directory.. are there any dependencies to other bundles?

jumping to error line is broken

When compiling (⌘K), if there's an error in compiler output, clicking on it's link jumps to the file in question, but not the offending line. It happens because the following TextMate link is generated:

txmt://open?line=&url=file:///Users/gunca/Desktop/test.go

TextMate Version 1.5.10 (1623)
Bundle version: tip

Command + R doesn't seem to do anything in Textmate 1

Not sure what I'm missing. Bundle seems to be installed correctly. Syntax highlighting works. Made sure that /user/local/go/bin is in the path. However Command+R doesn't make window pop up. Nothing happens. Any clue what might be the problem?

Rewrites 2-spaces as tabs on save

My global Textmate 2 preferences are tabSize = 2, softTabs = true. This bundle rewrites the 2-spaces as tabs on save. For troubleshooting, disabling Go > Themes or Go > Language Grammars > Go stops the rewrites on save. Other language bundles function correctly.

Compiler error not linkified if message contains a ":"

The following Go compiler error doesn't get turned into a source code link:

rest.go:255: syntax error: unexpected name, expecting semicolon or newline or }

The problem is that Go::link_errs sees that there are three : characters on the line and tries to interpret what's between the second and third :s as a column number, which doesn't work.

link_errs should probably not be counting colons like this. Instead it should use a single regex that optionally recognizes a column number if it's present.

Couldn't find g

Hi,
I tried using the bundle to give go a try but I cannot make it works. Go is installed by homebrew and I have all the go* binaries in my path but when I hit Apple+R all I get is an error "Couldn't find g" with all the locations in the search PATH printed below.

I tried to find where the error occured in the code without luck (the path followed is not easy to find with one executable calling another and another including another one xD).

Any idea what could go wrong ?

Function head across lines is not recognized as a function

The following examples will illustrate the issue because github uses your go-tmbundle for syntax highlighting:

One line function head:

func OneLiner(w io.Writer, r io.Reader) {}

Across lines function head:

func OneLiner(
  w io.Writer, 
  r io.Reader,
) {}

Add a "Build" command

The "Compile" command (Cmd-K) is only useful for single-file executables. When building a package, or even a multi-file executable, it'll fail with undefined-symbol errors because it only tries to compile the one source file being edited.

A "Build" command that runs "go build" in the current file's directory would be more useful. The sdefresne fork of this repo already has it; hopefully it's easy to move over.

Indentation

I get an indentation error when pressing return after the last "}" when writing a function.

Keep up the good work!

Won't Run if the .go File is in a Folder with a Space in the Name

I'm not sure what stage it fails at, but it treats the part of the filename before the space as the entire filename.
For instance, if the .go file resides in
/Users/kelsey/One Two/
, the Run command fails with
: fatal error: open /Users/kelsey/One:: No such file or directory

gofmt -tabwidth not supported in go1.3

When formatting a Go file in TextMate with this bundle, I get:

flag provided but not defined: -tabwidth
usage: gofmt [flags] [path ...]
-cpuprofile="": write cpu profile to this file
-d=false: display diffs instead of rewriting files
-e=false: report all errors (not just the first 10 on different lines)
-l=false: list files whose formatting differs from gofmt's
-r="": rewrite rule (e.g., 'a[b:len(a)] -> a[b:]')
-s=false: simplify code
-w=false: write result to (source) file instead of stdout

This seems to be caused by this line:

args.push("-tabwidth=#{ENV['TM_TAB_SIZE']}")

I didn't see this error with go1.2.

$ go version
go version go1.3 darwin/amd64

Double-click selection is wonky

Selection behavior of double-clicking in Go code is weird and annoying in some contexts:

  • Anywhere in a function parameter list, it selects the entire parameter list (to just inside the parens.)
  • In an initializing assignment, like foo := bar(), double-clicking foo also selects the space after it.
  • In a top-level variable declaration, like var foo = 0, double-clicking foo also selects the space before it.

This must be due to some subtlety of the language-grammar file, but I don't know nearly enough about those to be able to diagnose the problem.

strings cannot contain comments

It appears that strings, and I guess runes too, but they are only single characters, do not create custom syntax blocks as the language specifies. E.g. this should not be a comment:

"https://example.com"

Use goimports on save if available

Since goimports is a superset of gofmt functionality, (perhaps optionally) using it instead of gofmt on save not only formats code, but handles imports as well.

Auto-complete (Escape) fails with: Can't find “gocode” on PATH

The current PATH is:

/usr/bin
/bin
/usr/sbin
/sbin
Please add the directory containing “gocode” to PATH in TextMate's Shell Variables preferences.

Alternatively, the PATH can be retrieved from Terminal but this requires a relaunch: 

Do I need to set up a PATH (not mentioned in README) or is it a bug in the bundle? I installed go via brew.

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.