Commit graph

55 commits

Author SHA1 Message Date
Miloš Mošić b9f3ed61f4 [elixir] Enable evil-matchit in elixir mode 2019-10-19 10:47:28 +02:00
syl20bnr 9606dd344e [dap] Refactor configuration dap config in layers
* use local-vars-hook coupled to setup function for dap
* define new private layer variable `spacemacs--dap-supported-modes` to
  configure key bindings. This allows to move the key bindings definition from
  `funcs.el` to `packages.el`
* remove duplication of DAP key bindings in READMEs by pointing to the dap layer
  documentation
* alphabetically sort package configuration
2019-09-30 00:34:26 -04:00
mpanarin 135a1fd460 [elixir] layer improevements
- declare lsp layer dependency if elixir-backind is lsp
- "C-j" now properly indents line
- add toggle breakpoint for elixir-mode

update CHANGELOG.develop
2019-09-16 18:27:28 +02:00
mpanarin 3ee5aedbbf Add elixir-ls as a language backend for elixir 2019-09-01 00:33:39 +02:00
duianto ee811f7b13 Unify packages list parentheses style
problem:
some layer packages lists have the open and closing parentheses on the same line
as the first and last listed package, but most seem to have them on a separate
lines.

solution:
put the open and close parentheses on separate lines, except for lists with only
a single package, they are written on the same line as the variable name and
parentheses.

fix the lists indentation
2018-11-21 21:35:38 +00:00
lukasz.czaplinski 87028e77a5 Mark alchemist jump handler as async
Right now `alchemist-goto-definition-at-point` is marked as sync, which
sometimes shows message "No jump handler was able to find this symbol." before jumping to correct definition.

[`alchemist-goto--open-definition`](https://github.com/tonini/alchemist.el/blob/master/alchemist-goto.el#L215) calls alchemist server before jumping to definition, which I think justifies marking this as async.

I have very little experience with either Emacs, or Spacemacs, so let me
know if there's anything I can clarify and/or test before this commit gets
merged :)
2018-08-01 17:44:41 -04:00
Lyuben Petrov 86683ad558 Add phoenix layer
- First remove elixir's layer project prefix, since it was used only for
  one binding which would be better suited in tests prefix
- Move `alchemist-project-find-test` to test prefix
- Add `phoenix` prefix and declare bindings
2018-07-24 00:34:38 +03:00
Perry Fraser fb855fec67 Add elixir format keybind (#10812)
* Add elixir format keybind

* fix formatting

* Move elixir-format keybind to init-elixir-mode
2018-06-07 00:07:28 -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 41e546f040 Move all use-package hook declaration to pre-init functions
Had to create dummy init functions at some places since the owner of a package
is the last layer that defines the init function of a package. And a package
can be installed only if it has an owner.
2018-01-10 23:57:18 -05:00
Muneeb Shaikh 443c6bd80d sml: lazy load sml lang for org-babel
Fix #9979
2018-01-09 23:43:42 -05:00
syl20bnr c3e65f53e7 elixir: remove unecessary org config for org babel
The config is in ob-elixir
2018-01-05 22:27:43 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -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
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
Swaroop C H 735321eda3 [elixir] Add missing Alchemist commands and key bindings
Commands and key bindings found via `alchemist-refcard` command.

I've tried to adhere to Spacemacs conventions but where I couldn't find relevant
conventions, I followed Alchemist's key bindings.

Also, delete alchemist-refcard - approved by @syl20bnr at
https://github.com/syl20bnr/spacemacs/pull/8746#issuecomment-301326850
2017-05-26 10:49:35 +02:00
Swaroop C H c376b3c98b [elixir] Update fn names - update to new names and remove extinct fns 2017-04-19 23:05:20 -04: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
denin 52ea26a052
elixir: add support for credo
There was no flycheck-credo package in the layer.
Although it was described in documentation, how to install credo.
This commit fixes documentation and adds flycheck-credo package.
2017-02-03 11:09:07 +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
Michal Muskala 831b01fd8e
Prevent from inserting too many "end"s in Elixir
Closes #8030
2016-12-23 14:02:52 +02:00
Aaron Jensen 96022308d1 elixir: flycheck on idle
`flycheck-mix` now uses `flycheck-buffer-saved-p` so it is safe to
flycheck on idle: https://github.com/tomekowal/flycheck-mix/pull/2
2016-10-17 20:07:23 +02:00
Robert O'Connor 22809a8dfa Fix a typo introduced in 42a33f3ae8 2016-10-17 08:00:33 +03:00
syl20bnr 42a33f3ae8 elixir: add support for org-babel
Closes #1918
2016-10-16 22:25:04 -04: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
syl20bnr c6a6c41d92 Replace hooks by regular list for jump lists
Hook semantic is to be used with run-hooks API and run all hooks
sequentially, jump list semantic is different since the running
functions are not guaranteed to be executed so we prefer using regular
list API to manage jump-lists.
2016-09-04 12:28:40 -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
Aaron Jensen 141be7f8c2 elixir: fix smartparens hook
Fixes #6660
2016-07-25 19:36:07 +09:00
Christian E. Hopps b22702bc9e Expand gtags use to many more languages 2016-07-17 17:31:59 +02:00
syl20bnr 89dc1af9a6 Remove spacemacs/add-to-local-vars-hook and use (format ...)
It is better to directly hook function using the conventional hook
functions.

Replace usage of (concat ...) by a (format ...) from which is more
readable.
2016-06-26 14:04:13 -04:00
d12frosted 6798af57e3 implement API for local-vars-hook 2016-06-26 13:51:11 -04:00
Tomasz Kowal 194813961b Replace local elixir-flycheck-mix-compile package with flycheck-mix from melpa 2016-06-07 23:37:53 -04:00
syl20bnr a2308d9b30 elixir: remove not maintained packages
credo and test results flycheck checkers
2016-06-01 21:25:02 -04:00
syl20bnr a019d0a15c elixir: don't use flycheck-mode-hook for checkers 2016-06-01 11:28:10 -04:00
syl20bnr 4996f5248c elixir: add flycheck support for test results 2016-05-31 22:15:19 -04:00
syl20bnr 5b97df814e elixir: add flycheck support for credo 2016-05-31 21:51:49 -04:00
syl20bnr dd572af071 elixir: add flycheck support for mix compile 2016-05-31 21:34:51 -04:00
syl20bnr 8fc53ae311 elixir: fix major mode face in mode-line
when a file is opened.
2016-05-31 20:21:50 -04:00
syl20bnr 5af1e453c6 elixir: fix smartparens setup 2016-05-31 13:49:09 -04:00
syl20bnr 303e76b769 remove remaining packages-funcs.el and packages-config.el 2016-05-27 00:32:05 -04:00
Mario Mainz c476c03360 Remove ruby-end-mode and use smartparens instead
ruby-end-mode does not always behave correctly. An example for that is
if statements, which don't have an end statement if they are written on
one line. Also, it feels dirty to use a Ruby package to implement Elixir
syntax behaviour.
Smartparens has functionality to define pairs for certain major modes.
This adds smartparens pairs for the "do" keyword and the arrow (->)
operator, so that the "end" keyword is automatically inserted and
properly indented on enter.
2016-02-14 23:13:05 -05:00
Eivind Fonn e29ac21345 Register all REPLs and make SPC m ' bindings 2016-01-31 23:39:25 -05:00
syl20bnr 5a061b3813 core: new layer files packages-config.el and packages-funcs.el
Start to isolate the list of packages. Also we want to define packages
function at the top level of an elisp file in order to not prevent
emacs from knowing where the functions are defined.

This commit has a POC made with elfeed and elixir layers.
2016-01-31 00:03:04 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
Eivind Fonn 02585f72a2 Fix ruby-end hook removal 2016-01-03 15:49:38 +01:00
Darian Moody a221be59a6 Add leader support for alchemist-mix-rerun-last-test
A command in Alchemist which allows a user to rerun the last test ran.

See https://github.com/tonini/alchemist.el#testing for command docs.
2015-12-11 02:08:23 -05:00
Tim Buchwaldt 724efaaa79 Add new alchemist-iex-reload-module functionality
Since https://github.com/tonini/alchemist.el/commit/395e6717
calling `alchemist-iex-reload-module` reloads the module in
the current buffer via `r(Module)`

(Also my first contribution to spacemacs, hope I'm holding it right)

Update Readme to reflect changes to packages.el
2015-12-11 01:36:16 -05:00