Commit graph

79 commits

Author SHA1 Message Date
akkuankka ed12b1118f
ocaml: Allow new OPAM command-line syntax (#15011)
As of new OPAM (OCaml package manager) v2.1, `opam config var share` is
no longer supported. Instead, the syntax is `opam var share`. To allow
both, this checks first with the new syntax, then if that doesn't work,
the old is tried. If neither produce any output, it fails as normal.

edit: Fix formatting.
2021-09-01 19:02:37 +00:00
Maximilian Wolff 4039ad5852
[dune] Remove obsolete auto-mode-alist declaration
as the package is taking care of this already.
Fixes #14650
2021-06-16 22:13:09 +02:00
Aaron Zeng e15dbdc036
[ocaml] Fix name of layer variable in defvar (#14736) 2021-05-04 00:34:51 -04:00
n-raymond 1136a61645 [ocaml] Fix variable name to make ocamlformat properly working on save 2021-05-03 22:11:32 +02:00
Aaron Zeng 433f6729e7
[ocaml] Fix typo (#14692) 2021-04-21 14:37:55 -04:00
Aaron Zeng 7e03196280
[ocaml] Fix for merlin package split (#14691) 2021-04-21 13:38:18 -04:00
syl20bnr 97cd83e169 Apply GPLv3 terms explicitly to all elisp files 2021-03-25 22:59:32 -04:00
syl20bnr d55a9e2e67 Update header for year 2021 2021-03-25 22:59:32 -04:00
Aaron L. Zeng 1cbc752463 [ocaml] Add ocamlformat package and configure format-on-save 2020-10-22 23:28:41 +02:00
Robert O'Connor 82ba73a1c0
update copyright to 2020 2020-09-23 21:25:01 +02:00
Maximilian Wolff e50890c490
[ocaml] Revise latest improvement to layer 2020-08-13 21:45:59 +02:00
Edwin Török 350a6ecdb8
lang/ocaml: fix flycheck-ocaml activation
We should always define the 2 flycheck initialization functions:
Spacemacs will call them as needed only when enabling syntax checking.
Previously flycheck wasn't getting activated at all.

Only activate `flycheck-ocaml` when a `.merlin` file is present.
It would work when there isn't but there is a high chance that you will
get a lot of errors displayed because it could not find any of the used
modules (`.merlin` specifies module paths).
OCaml projects usually do have a `.merlin` file
(either hand crafted or generated by the build system).

Signed-off-by: Edwin Török <edwin@etorok.net>

lang/ocaml: add merlin-eldoc and merlin-imenu support

This displays the type and documentation of thing under point
and highlights occurrences automatically when idle. Could be achieved by appropriate use of
keyboard shortcuts already set up by this module.

However `merlin-eldoc` can also display the expected type of function call parameters,
which merlin itself wouldn't.

`merlin-imenu` allows jumping to top level modules/functions/etc. bound
by default to `SPC j i`.

Signed-off-by: Edwin Török <edwin@etorok.net>

lang/ocaml: add merlin-iedit multiple cursor refactoring

bound to `, r e`.

Signed-off-by: Edwin Török <edwin@etorok.net>

fixup! lang/ocaml: add merlin-iedit multiple cursor refactoring

fixup! lang/ocaml: fix flycheck-ocaml activation

fixup! lang/ocaml: add merlin-eldoc and merlin-imenu support
2020-08-13 20:29:30 +02:00
emacspace c7c348a676 documentation formatting: Sun May 26 20:58:52 UTC 2019 2019-05-27 01:23:35 +03:00
Anton-Latukha f6660f82d4
Switch to the new layers generator 2019-05-15 21:08:21 +03:00
Anton-Latukha ba074bc908 layers: lang: new structure: general: add pure, multi-paradigm (&js) 2019-05-15 21:04:48 +03:00
syl20bnr c471d91757 [ocaml] Sort key bindings 2019-05-12 21:57:17 -04:00
Lyman B. Gillispie af55934995 [ocaml] Add support for dune via dune-mode.
Dune is a popular build-tool for OCaml projects, the `dune` package adds:
 - Adds syntax highlighting
 - Template insertion
 - Some testing/compilation functions
2019-05-12 22:22:13 +02:00
JAremko 77c680160e Add placeholder tags 2019-05-05 20:40:47 +03:00
Artur Juraszek 033e960c94 Keyword flycheck-ocaml with :toggle instead of using a when 2019-04-30 18:50:39 +02:00
Bernhard Schommer 31bff63404 [ocaml] Fix typo in diagnostic message. 2019-04-24 16:33:00 +02:00
hasan356 5606f4e258 Fixes #5158
Backspace in tuareg-mode does not delete the character.
2019-04-07 11:04:06 +02:00
emacspace 45276bd96f documentation formatting: Wed Dec 5 03:03:03 UTC 2018 2018-12-04 22:06:14 -05: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
emacspace 901f35849a documentation fixes: Tue Oct 23 14:18:21 UTC 2018 2018-10-23 23:38:16 +03:00
JAremko cd39f80c24 Reformat documentation 2018-10-11 00:13:43 +03: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 3731d0d3fc Move major specific error key bindings to SPC m E prefix
Also add a convention for it.
2018-03-03 16:45:00 -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
Dave Aitken bd77db5d84 ocaml: mention ocaml flycheck/merlin configuration in README 2018-01-28 22:51:26 -05:00
Dave Aitken 2be4dd2795 ocaml: enable flycheck-ocaml 2018-01-28 22:48:47 -05:00
Rudi Grinberg 8f685035bf enable flycheck for tuareg mode rather than merlin mode
merlin mode doesn't actually exist
2018-01-21 09:34:59 -05:00
Levi Roth 5857e853ad Fix OPAM share directory in OCaml layer
This commit uses process-lines instead of shell-command-to-string, as
seen in ocaml/merlin#547.

This fixes an issue on Windows where the external command fails,
resulting in a broken load-path.
2018-01-17 22:19:10 -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
JAremko 06301b2212 Improve exporting/testing 2017-08-18 20:50:21 +03:00
jimyl c8740530bf fix misused function, `merlin' is a package not a layer 2017-07-24 00:29:18 +08: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
Bernhard Schommer 2c193614f7 Ocaml layer init without opam.
Currently the ocaml layer requires opam in order to work. However
opam is only really required for an easy installation of the
required ocaml binaries. The only place where opam is used
instead is to add the merlin files of the merlin installed
via opam instead of the merlin files from melp.

This commit introduces a fallback if opam is not installed but
ocamlmerlin is installed, since the melpa package of merlin
is already installed through packages.
2017-05-24 12:28:58 +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
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
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
Rudi Grinberg 889b68110c OCaml layer: add ignored extension
Add cmti extension to list of ignored completion exts
2016-10-17 13:55:17 +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
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
km e39df3d17f Add binding for merlin-occurrences
Also fix typo for binding prefix
2016-08-22 21:03:53 +02: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