Giter Club home page Giter Club logo

go-projectile's Introduction

Synopsis

Go Projectile is a set of Go language related add-ons for the Emacs Projectile mode.

Configuration

(require 'go-projectile)

Usage

After running projectile-switch-project (C-c p s) the features of go-projectile will be (optionally) enabled.

Managing GOPATH

Rather than have a global GOPATH set in your .bashrc or similar, go-projectile makes it easier for each project to have their own GOPATH automatically configured. Upon switching to a projectile project, the GOPATH environment variable will be set appropriately, see go-projectile-switch-gopath. The go-projectile-set-gopath function can also be called directly, without using projectile-switch-project.

Go tools

Most of the Emacs Go packages have hard or soft dependencies on programs installed via go get, such as gocode, godef, etc. You can install the complete set of go-projectile-tools using: M-x go-projectile-install-tools And update the tools using: M-x go-projectile-update-tools These tools are installed within their own GOPATH, configurable via the go-projectile-tools-path variable.

Searching

Run vc-git-grep on *.go in the $GOPATH/src/ directory of the current buffer using go-projectile-git-grep (C-c p G).

Useful for use within multi-language projects and/or repositories that include vendored packages.

Importing projects

Create a new projectile project via go-projectile-get (C-c p N). This function will 'go get' an existing repo and switch to the new project.

Refactoring

Renaming of Go identifiers is available via go-rename (C-c p w).

Very basic refactoring is made available via go-projectile-rewrite (C-c p W). It is just a wrapper around gofmt -r, where go-projectile tries to help generate the rewrite pattern based on the cursor's location. The rewrite rule will only apply to '*.go' files in the current project, excluding patterns listed in `go-project-files-ignore'.

go-projectile's People

Contributors

dougm avatar kat-co avatar syohex avatar frobware avatar bdarnell avatar bbigras avatar dsvensson avatar hmahmood avatar jsmestad avatar

Watchers

 avatar

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.