Commit Graph

40 Commits

Author SHA1 Message Date
Henrik Lissner
a14e3afc10
Fix async lookup handlers for tuareg-mode #2394 2020-02-02 03:16:53 -05:00
Henrik Lissner
a9402cfb55
Fix #2373: bring back package pinning
This needs some serious refactoring...
2020-01-25 19:02:00 -05:00
Henrik Lissner
a5ff21f212
Merge pull request #2353 from facelesspanda/lang/eliom
lang/ocaml: support eliom files
2020-01-20 02:28:48 -05:00
Henrik Lissner
4cc14389e8
PIN ALL THE PACKAGES 2020-01-14 22:32:11 -05:00
Henrik Lissner
12094788d7
Fix references to :tools fly{spell,check} 2020-01-14 03:04:26 -05:00
Clement Busschaert
fd130a9c2e
[ocaml] support eliom files
Eliom/eliomi is ocsigen's extensions for its files using the eliom ppx.

More info at http://ocsigen.org/eliom/6.6/manual/ppx-syntax
2020-01-11 18:39:14 +01:00
Rudi Grinberg
78ca397439 Do not quit utop buffers automatically 2019-12-08 16:17:39 +07:00
Henrik Lissner
64222c69c8
Fix wrong-number-of-arguments on newline-and-indent
And ensure all custom comment-line-break-function functions its
argument requirements.
2019-11-12 15:24:02 -05:00
Rudi Grinberg
b19178280d lang/ocaml: disable merlin when lsp is active (#1939)
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2019-10-23 01:38:13 -04:00
Rudi Grinberg
bdeb02ddc2 Fix tuareg-find-alternate-file binding
This binding should be available whenever tuareg is loaded. Previously,
it would loaded only after merlin.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2019-10-13 20:36:49 +09:00
Rudi Grinberg
14b5e545c4 Remove detection for .merlin files
These files are generated and hence this detection fails if they haven't
been generated yet. Merlin is essential for basically all OCaml
development so there's no need for this extra check.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
2019-10-13 11:26:49 +09:00
Henrik Lissner
a736158dae
lang/ocaml: update README 2019-09-13 22:04:53 -04:00
Henrik Lissner
2d365619cd
General refactor & cleanup, across the board 2019-09-13 22:00:34 -04:00
Henrik Lissner
a3e262c7ac
💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
Henrik Lissner
76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
Henrik Lissner
b90dede1ab
💥 Replace package.el/quelpa with straight #374
There are a few kinks to iron out, but for the most part it's done. Doom
Emacs, powered by straight. Goodbye gnutls and elpa/quelpa issues.

This update doesn't come with rollback or lockfile support yet, but I
will eventually include one with Doom, and packages will be (by default,
anyway) updated in sync with Doom.

Relevant threads: #1577 #1566 #1473
2019-07-22 02:30:40 +02:00
Henrik Lissner
52dc5001bc
lang/ocaml: refactor & reformat
This ensures that users' after! blocks have precendence over ocaml
packages.
2019-07-08 22:08:59 +02:00
Henrik Lissner
56393420e5
lang/ocaml: ensure * in block comments are padded
(*
 * <-- ensures there is at least one space here
 *)
2019-07-08 22:08:59 +02:00
Henrik Lissner
d0412b7f56
lang/ocaml: start lsp as late as possible
Gives the user more opportunity to customize lsp et co with
file/dir-local variables or mode hooks.
2019-07-08 21:24:36 +02:00
Henrik Lissner
c399c07694
Add :tools lsp checks for +lsp flag
Also:
- Reorganizes some :lang modules' packages.el file.
- Adds setuptools check in lang/python
- Adds javac check in lang/java
- Removes the depends-on! macro
2019-04-24 18:16:05 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
Henrik Lissner
eb3c569e1d
Replace +lsp|init with lsp! autodef 2019-03-02 01:34:19 -05:00
Henrik Lissner
69ed1a4a99
feature/{syntax-checker,spellcheck} -> tools/fly{check,spell} 2019-02-22 00:25:30 -05:00
Henrik Lissner
cb923eadcc
Add basic LSP support
Still needs to be documented, but includes support for the following
languages:

+ C/C++/ObjC
+ Go
+ Java
+ Javascript
+ OCaml
+ PHP
+ Python
+ Ruby
+ Scala
+ Swift
+ HTML/CSS

Relevant to #460, #716, #1186
2019-02-21 19:13:35 -05:00
Henrik Lissner
3f195614d9
Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
Edwin Török
4029bd7dd0 lang/ocaml: drop bad imenu initialization 2018-10-31 00:03:26 +00:00
Edwin Török
a1ca5b2850 lang/ocaml: update README
Signed-off-by: Edwin Török <edwin@etorok.net>
2018-10-17 00:13:20 +01:00
Edwin Török
a4a42d3141 lang/ocaml: enable merlin-imenu and merlin-iedit (part of merlin)
merlin-imenu works nicely with `SPC / i`.

merlin-iedit is a refactoring tool that locates all occurences of an
identifier in scope and you can use multiple cursors to edit.
integration with evil-multiedit could be better.

There is also a merlin-xref backend, but since we got the individual
def/lookup/etc. already bound not sure if it is worth using it.

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-10-17 00:06:20 +01:00
Edwin Török
cdd39b20a5 lang/ocaml: add merlin-eldoc type and doc on hover display
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.

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-10-17 00:06:20 +01:00
Edwin Török
50b324b683 lang/ocaml: always initialize merlin, but wait for a .merlin file for flycheck
Signed-off-by: Edwin Török <edwin@etorok.net>
2018-10-17 00:06:20 +01:00
Henrik Lissner
5ceb64705f
lang/ocaml: remove ocamlformat comment
It doesn't apply anymore
2018-10-16 14:02:55 -04:00
Henrik Lissner
d1d9cffcc8 lang/ocaml: major refactor
+ Load flyspell-mode a little later, to allow file/dir-local variables
  to customize flyspell.
+ Ensure setters (in merlin's config) are used as late as possible, by
  making merlin's (and all the other packages) config run after tuareg
  is loaded.
+ As discussed, installing packages locally is a bit unreliable, so I'm
  commenting out the +ocaml-site-lisp flag, and rely solely on packages
  from MELPA.
+ Add optional ocamlformat check in doctor.el and conditionally load the
  ocamlformat package (if editor/format is enabled).
+ Add docstrings to init hooks.
2018-10-16 02:49:21 -04:00
Edwin Török
064579e33e Improve ocaml language support
See README.org.

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-10-15 20:37:58 +01:00
Henrik Lissner
d8b1e469bc
Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
secondwtq
ee49b5ff29 Fix typo in OCaml module. 2018-05-28 11:30:17 +08:00
Henrik Lissner
09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
Henrik Lissner
9d81bc5a8b
Major refactor: use-package-always-defer = nil & use :hook
Possibly breaking change: packages are no longer deferred by default.

Addresses #286
2017-12-08 23:14:11 -05:00
Valentin Robert
53e3670d9a lang/ocaml: adding ml4, mli, mlp to recognized extensions 2017-07-27 11:33:10 -07:00
Henrik Lissner
94f9d05c3a
lang/ocaml: refactor 2017-06-28 12:26:49 +02:00
Valentin Robert
f7ce419265 Added lang/ocaml 2017-06-27 11:39:15 -07:00