Commit Graph

78 Commits

Author SHA1 Message Date
smile13241324 350dbf6373 Move go "generate" prefix declaration to "go-gen-test" init 2019-04-07 08:43:18 +02:00
Seong Yong-ju 9941c60b5c Add missing prefixes in go-mode 2019-04-05 23:21:15 +02:00
Enze Chi 004d407908 Add toggle control for verbose go test output 2019-04-04 12:17:53 +02:00
Justin f8bb6997a9 Remove lsp-javascript-typescript package for lsp built in.
Remove lsp-go package for lsp built in.
Changed go/react/typescript lsp-*-enable hooks to lsp
Update go/typescript/rust layer docs for lsp-mode installation command.
Remove unused rust layer variable
2019-01-15 00:41:30 +02:00
Lupco Kotev 1d49cd7ed8 Add golangci-lint support 2018-08-20 23:03:45 +01:00
Ljupcho Kotev 81865e1ea2 Change backend name from default to go-mode 2018-08-16 00:39:17 +03:00
Lupco Kotev bb3e3b2103 Add lsp support for go 2018-08-16 00:39:17 +03:00
Jon Erik D Suero ff555d80b4 Add key binding to run gofmt manually 2018-08-01 17:54:27 -04:00
Jon Erik D Suero 166f6768ae go: add toggle for gofmt before save and turn it off by default 2018-08-01 17:52:03 -04:00
fiveNinePlusR 75f1d915a8 [CORE] synchronize the environment variables from the default shell 2018-06-14 20:12:26 -04:00
Josh Santos 7944ed2634 Fix environment variable setting for go and rust layers 2018-06-09 01:22:56 -04:00
syl20bnr b04cce06b2 go: defer loading of various packages 2018-06-09 01:11:41 -04:00
syl20bnr 9fc1883b4b go: fix bad quoting of go-packages-function 2018-06-09 01:10:03 -04:00
syl20bnr aedceddd92 go: cleanup layer sorting stuff and using idiomatic constructs 2018-06-09 01:09:11 -04:00
Cosmin Cojocar d47f9267e9 go: add support for go-impl in refactoring menu 2018-06-09 01:04:23 -04:00
syl20bnr f12b849993 go: sort packages.el and update README 2018-06-09 00:58:50 -04:00
Cosmin Cojocar 80dbae3825 go: add option in refactoring to fill a structure with default values 2018-06-09 00:51:33 -04:00
syl20bnr 7951d763e3 go: reformat spacemacs/go-packages-gopkgs
Use setq instead of customize
Put spacemacs//go-set-tab-width in funcs.el
2018-06-09 00:43:52 -04:00
Cosmin Cojocar 938155c50a Configure the go-packages-functions to use the gopkgs tool
This is a much faster option than the current native function.
2018-06-09 00:39:08 -04:00
syl20bnr 0fd13aef2b go: change test generation key bindings according to conventions 2018-06-09 00:36:32 -04:00
Cosmin Cojocar 359960ae27 Add support to generate go tests with go-gen-test 2018-06-09 00:36:32 -04:00
Miciah Masters e0b751bee3 Avoid non-idempotent use of push in init code
Replace push with add-to-list in layer init functions and related code.

Modify spacemacs|add-toggle to check for and update an existing toggle in
spacemacs-toggles and only create a new toggle if none already existed.

Replace a conditional push onto erc-packages with use of :toggle.

When initializing which-key, set which-key-replacement-alist to its default
or customized setting before adding all the Spacemacs replacements.  We
want to keep the stock replacements but avoid adding duplicates of the
Spacemacs replacements.

Replace the emacs-lisp-mode-hook lambda with a named function to avoid
adding duplicate hooks (which can add duplicate definitions of the
evil-surround pair).
2018-06-05 22:17:13 -04:00
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
brantou d9065de1cb Add go-tag to go-layer 2017-12-17 22:10:24 -05:00
Robbert van der Helm c61ae1a1c1 Add ivy support to the gtags layer
It would be much better to have a single function for each layer that
initializes ggtags, helm-gtags and counsel-gtags for a mode.
2017-12-17 22:03:01 -05:00
Andy Lindeman 11180699e6
Adds GOROOT to list of variables copied from shell environment
From <https://golang.org/doc/install> "Installing to a custom location"

> The Go binary distributions assume they will be installed in /usr/local/go
> (or c:\Go under Windows), but it is possible to install the Go tools to a
> different location. In this case you must set the GOROOT environment variable
> to point to the directory in which it was installed.
2017-07-29 22:30:10 +03:00
Eivind Fonn f4b53d2a4f Rename :depends to :requires 2017-07-03 09:54:53 +02:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
Eivind Fonn 08561d8631 core: implement :depends for package declarations
This replaces the older pattern
:toggle (configuration-layer/package-usedp ..)

This implementation ensures that :disabled-for honors dependent packages, i.e.
if package a depends on package b, which is owned by layer c, and layer c is
disabled for layer d, then neither package a nor b will be configured for layer
d. Previously, this was only true for package a, but not b.

This commit also fixes:

- configuration-layer/describe-package now shows which post-init and pre-init
  functions are disabled, if any
- Does not recreate all layer objects unconditionally when calling
  configuration-layer/discover-layers. Previously, this led to all layers being
  recreated after e.g. `SPC h SPC`, without any of the dotfile information.
  Since this information is now necessary for
  configuration-layer/describe-package, it’s important that we don’t clear the
  indexed layers when invoking this function.
2017-06-22 11:53:05 +02:00
Eivind Fonn e4185e4c61 Some refactoring of go layer 2017-05-25 13:20:36 +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
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
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
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 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
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
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