-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
99 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
(setq read-process-output-max (* 1024 1024)) ;; 1mb | ||
;; sample `helm' configuration use https://github.com/emacs-helm/helm/ for details | ||
(use-package helm-xref) | ||
|
||
(use-package lsp-mode | ||
:ensure t | ||
:defer t | ||
:hook (lsp-mode . (lambda () | ||
(let ((lsp-keymap-prefix "C-c l")) | ||
(lsp-enable-which-key-integration)))) | ||
:init | ||
(setq lsp-keep-workspace-alive nil | ||
lsp-signature-doc-lines 5 | ||
lsp-idle-delay 0.5 | ||
lsp-prefer-capf t | ||
lsp-client-packages nil) | ||
:config | ||
(define-key lsp-mode-map (kbd "C-c l") lsp-command-map)) | ||
;; if you want to change prefix for lsp-mode keybindings. | ||
(helm-descbinds-mode -1) | ||
(which-key-mode) | ||
(add-hook 'c-mode-hook 'lsp) | ||
(add-hook 'c++-mode-hook 'lsp) | ||
(use-package yasnippet | ||
:config (yas-global-mode t)) | ||
|
||
(setq gc-cons-threshold (* 100 1024 1024) | ||
read-process-output-max (* 1024 1024) | ||
treemacs-space-between-root-nodes nil | ||
company-idle-delay 0.0 | ||
company-minimum-prefix-length 1 | ||
lsp-idle-delay 0.1) ;; clangd is fast | ||
|
||
(use-package lsp-mode | ||
:bind-keymap ("C-c l" . lsp-command-map)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,36 @@ | ||
(prelude-require-packages | ||
'(utop | ||
opam-switch-mode | ||
ocp-indent ocamlformat | ||
dune dune-format | ||
merlin merlin-company merlin-eldoc merlin-iedit)) | ||
|
||
;; (use-package ocp-index | ||
;; :config (unbind-key "C-c C-t" ocp-index-keymap) | ||
;; :bind (:map ocp-index-keymap | ||
;; ("C-c t" . ocp-index-print-info-at-point))) | ||
|
||
(use-package merlin | ||
:bind (:map merlin-mode-map | ||
("C-c m d" . merlin-document) | ||
("M-." . merlin-locate) | ||
("M-," . merlin-pop-stack)) | ||
:config (setq merlin-error-after-save t) | ||
:custom | ||
(merlin-error-after-save t) | ||
(merlin-completion-with-doc t) | ||
(merlin-locate-preference 1) | ||
(merlin-type-after-locate 1)) | ||
|
||
(use-package merlin-eldoc | ||
:after merlin | ||
:ensure t | ||
:custom | ||
(eldoc-echo-area-use-multiline-p t) ; use multiple lines when necessary | ||
(merlin-eldoc-max-lines 8) ; but not more than 8 | ||
(merlin-eldoc-type-verbosity 'min) ; don't display verbose types | ||
(merlin-eldoc-function-arguments nil) ; don't show function arguments | ||
(merlin-eldoc-doc nil) ; don't show the documentation | ||
:bind (:map merlin-mode-map | ||
("C-c m p" . merlin-eldoc-jump-to-prev-occurrence) | ||
("C-c m n" . merlin-eldoc-jump-to-next-occurrence)) | ||
:hook ((tuareg-mode reason-mode) . merlin-eldoc-setup)) | ||
|
||
(use-package ocamlformat | ||
:bind ("<backtab>" . ocamlformat)) | ||
|
||
(use-package dune-format | ||
:hook (dune-mode . dune-format-on-save-mode)) | ||
|
||
(use-package dune-watch) |