Commit graph

77 commits

Author SHA1 Message Date
zer09 c504496b12 Update README.org 2017-05-28 15:03:33 +02:00
Eivind Fonn e4185e4c61 Some refactoring of go layer 2017-05-25 13:20:36 +02:00
Eivind Fonn adca985dd9 Update go layer documentation 2017-05-25 13:19:50 +02:00
Eivind Fonn b7370f454e Add godoctor
Thanks to TinySong
2017-05-25 13:19:32 +02:00
Ian Clark 249c3b87b0 Configurable extra arguments to go test
ADD:
  - layers/+lang/go/config.el Added new variable `go-use-test-args` to allow
    specifying additional arguments being passed to `go test.

CHANGE:
  - layers/+lang/go/packages.el Updated `go-run-tests` to automatically concat
    the new variable `go-use-test-args` to args passed to `go test`.
2017-05-24 11:52:10 +02:00
JAremko 6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03:00
JAremko f805d0ebd9 Fix spacefmt test on deleted files
Also fix some links
[ci skip]
2017-04-28 23:29:43 -04:00
firemiles b8c17cf3c5 docs: Install goimports from new repository. 2017-04-28 22:50:12 -04:00
dineshbhosale 0c91ad7acb Go : Update documentation for fixing autocomplete issues
Workaround for https://github.com/syl20bnr/spacemacs/issues/7784
2017-04-20 23:03:34 -04:00
Denis Bernard 9468599ea4 Improve go test output buffer behavior.
- Use compilation-start to get highlighting of compilation or runtime errors.
- Configure output window in popwin and window-purpose (so that it can be closed
  with C-g for example).
- Configurable buffer name.
2017-04-17 23:07:49 -04:00
d12frosted 2ce65095ba use go-rename from MELPA 2017-04-17 20:03:53 -04:00
Remco Verhoef 8a69e08365 added dollar to match only function name
the check.f and run functions use regular expressions, without the dollar sign it will run not only function _2, but also _21, etc.
2017-04-17 17:52:47 -04:00
tinysong 550eddd368 update go layer README.md 2017-04-11 23:57:57 -04:00
Muneeb Shaikh 1d82d8a0f8 Fix #8653
Use `buffer-base-buffer` to get base-buffer of an indirect buffer.
2017-04-09 17:38:05 -04:00
syl20bnr 78f098ae46 Revert go-coverage to SPC m g c and move create-tages to SPC m g C
SPC m g C is only used in Clojure whereas SPC m g c is used in various layers.
This is simpler to just move create tags to SPC m g C and move the clojure
bindings to SPC m g c (since it is not used in the clojure layer).
2017-03-30 22:07:16 -04:00
JAremko 0fc5a729ff Rebind go-coverage to gC 2017-03-30 22:07:16 -04:00
Denis Bernard 1f7c8d095d Fix void reference to go--position-bytes in go-rename 2017-03-24 22:29:53 +03:00
Steven Allen 48c12d48d0 Partially tame exec-path-from-shell
1. Make it possible to exclude the package (fix the go and rust layers).
2. Import variables all at once (avoid spawning multiple login shells).
3. Import variables early (during the "pre" package loading stage).
4. Centralize the platform check by using a package toggle in the
   `spacemacs-base`.
5. Avoid importing already defined variables (except `PATH`/`MANPATH`).

Relates to #8537.

TODO: We can probably trim the platform list to macos only.
2017-03-24 14:23:38 +03:00
syl20bnr f45ce1a88e syntax-checking: rename function add-flycheck-hook to enable-flycheck
spacemacs/add-flycheck-hook was not really hooking anything, change the name
to better reflect what it does.
Also changed the push for a add-to-list to avoid duplicates.
2017-03-19 12:40:36 -04:00
d12frosted bb3e5c8289
fix go layer headers 2017-02-01 16:06:00 +02:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
Eivind Fonn f94ca2a8cc go-guru on MELPA 2016-10-26 09:48:24 +02:00
YeJun Su 2f263e998c
Remove check for GOPATH when init go-guru
go-guru.el has been moved to https://github.com/dominikh/go-mode.el

FYI, 69f6f5b782
2016-10-18 10:47:40 +03:00
Jim Deville 194113a6eb update docs with go-guru info 2016-10-17 13:36:40 +02:00
Eric Drechsel f609a25585 go: replace deprecated oracle with guru
change to prefix for guru commands from `mr` to `mf`
to separate from rename commands. Better prefix?

Fixes #6772.
2016-10-17 13:36:31 +02:00
Stephen Sugden 119972ab81 Fix usage of gorename on symlinked projects
I often work on Go projects under a symlink, e.g. ~/Code/project points to
$GOPATH/src/github.com/grncdr/...

This works fine 99% of the time, but gorename doesn't follow symlinks in order
to get the "truename" of a file, so it will complain about
~/Code/project/somefile.go not belonging to any package. This fixes that
situation by ensuring that gorename is only passed the true filename.
2016-10-17 13:33:35 +02:00
syl20bnr 9066d073b2 Fix (void-variable spacemacs-jump-handlers-....)
Move the variable definitions to config.el and eval-after-load the
key binding on SPC m g g.
2016-09-04 22:31:47 -04:00
Eivind Fonn 5a869764dd Further improve gtags layer
- Add option to disable by default
- Use local-vars hook to allow per-project enable/disable
- Don’t enable helm-gtags-mode (no need)
- Move emacs bindings from helm-gtags-mode-map to ggtags-mode-map
2016-08-22 15:11:25 +02:00
Eivind Fonn 928983da47 Refactor jump to definition
This commit defines:

- spacemacs-default-jump-handlers: a list of functions that can jump to
  definition in ALL modes.

- spacemacs-jump-handlers-MODE: a list of functions that can jump to
  definition in MODE.

- spacemacs-jump-handlers: a buffer-local list of functions that can
  jump to definition. This is made up of the values of the two previous
  variables whenever a given major mode is activated.

- spacemacs/jump-to-definition: a function that tries each function in
  spacemacs-jump-handlers in order, and stops when one of them takes us
  somewhere new.

- spacemacs|define-jump-handlers: a macro that
  * defines spacemacs-jump-handlers-MODE, possibly filled with initial
    functions
  * defines a function that is added to the hook of the given MODE
  * binds “SPC m g g” of that MODE to spacemacs/jump-to-definition

This is an attempt to harmonize all the different approaches to jumping.
Specifically,

- Existing intelligent jump packages that work for only a single mode
  should go to the beginning of spacemacs-jump-handlers-MODE. E.g.
  anaconda for python, ensime for scala, etc.

- Packages like gtags that work for several modes (but potentially not
  all) and which is dumber than the intelligent jumpers should go the
  the END of spacemacs-jump-handlers-MODE.

- Packages like dumb-jump that work for all modes should go to
  spacemacs-default-jump-handlers.

In all cases the order of the jump handlers in each list should be from
most to least intelligent.

Fixes #6619
2016-08-22 15:08:25 +02:00
Christian E. Hopps b22702bc9e Expand gtags use to many more languages 2016-07-17 17:31:59 +02:00
syl20bnr a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
sooheon 15e6290151 Make check for company-mode explicit, not implicit
People may have company-mode installed without necessarily using the
auto-completion layer.
2016-05-27 00:32:05 -04:00
JAremko 4f37acdfae add go coverage key bindings
fix copypasta
2016-05-11 20:50:16 -04:00
Eivind Fonn 3561b4dcf9 Fix go/README.org 2016-05-05 12:47:04 +02:00
JAremko 11e696ad06 add var go-use-gometalinter 2016-05-04 08:34:32 +03:00
syl20bnr d94b17d57b go: use :toggle for flycheck-gometalinter package
Turn the maybe function into an always since the package
flycheck-gometalinter is installed only if gometalinter is found.
2016-04-29 22:58:23 -04:00
JAremko ae512ee8f1 Use gometalinter if present. 2016-04-29 22:52:05 -04:00
NJBS 32466ca272 Update go README to include goimports prereq
see #5855
2016-04-28 15:40:26 +02:00
Matt Jaffee f0f2034a53 support underscores in Go test functions
When trying to run a single test function with LEADER m t t in a Golang
test file, spacemacs failed to find functions which had underscores in
their names. This commit simply adds an underscore to the regular
expression which spacemacs uses when searching for the current test
function.
2016-04-17 00:37:47 -04:00
syl20bnr 07852abad5 Format documenation files with doc-fmt tool 2016-04-12 23:31:38 -04:00
Fabien Dubosson 80195d15c7 Justify a paragraph in the go README 2016-04-05 12:28:11 +02:00
james sangho nah 1773cca021 Fix minor typo in Go README 2016-04-05 12:22:01 +02:00
syl20bnr 74fb719b44 go: make go-tab-width a regular layer variable 2016-04-04 22:36:51 -04:00
james sangho nah 4129264302 go: new variable `go-tab-width' 2016-04-04 22:34:17 -04:00
syl20bnr 3b0c1fd93d Convert org doc files with doc-fmt 2016-03-30 22:59:55 -04:00
syl20bnr 6e0a76f8ca go: set location property of go-oracle to site
instead of local
it had no bad side effect but `site` is the correct value for a package
that comes from somewhere else on the system.
2016-03-27 12:22:14 -04:00
Carlos Galdino 874e67b6ec Show function signature for Golang buffers.
This fixes #4368.
2016-02-16 23:59:51 -05:00
Eivind Fonn e9f8377b92 Tweak flycheck loading process 2016-01-31 23:04:48 -05:00
Xue Fuqiao 4958f7fc10 Fix "the point" problems
Point is a proper name when it refers to the current editing location.
Moreover, point designates a place *between* two characters (or before the first
character, or after the last character), rather than a particular character.

References:

* http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00414.html
* https://www.gnu.org/software/emacs/manual/html_node/elisp/Point.html#index-point
2016-01-31 21:48:52 +01:00