summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/eshell/alias5
-rw-r--r--emacs/init.el26
2 files changed, 21 insertions, 10 deletions
diff --git a/emacs/eshell/alias b/emacs/eshell/alias
index d8b28c3..f52e140 100644
--- a/emacs/eshell/alias
+++ b/emacs/eshell/alias
@@ -1,3 +1,4 @@
-alias ff find-file $1
-alias gl git log --graph --all --oneline
+alias gs git status
alias ll ls -la $*
+alias gl git log --graph --all --oneline
+alias ff find-file $1
diff --git a/emacs/init.el b/emacs/init.el
index 03bfef3..4ff7fa0 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -575,21 +575,28 @@ given keymap or in the global keymap."
(if (not (eq major-mode 'makefile-gmake-mode))
(my/clean-prog-file (current-buffer)))))))
+(use-package eglot :demand t)
(use-package haskell-mode
:custom
(haskell-tags-on-save t)
(haskell-process-type 'cabal-repl)
:hook
(haskell-mode . interactive-haskell-mode))
-(use-package ocp-indent)
+;; (use-package ocaml-ts-mode)
+(use-package neocaml
+ :vc (:url "https://github.com/bbatsov/neocaml" :rev :newest)
+ ;; teach Eglot about neocaml
+ (add-to-list 'eglot-server-programs '((neocaml-mode :language-id "ocaml") . ("ocamllsp"))))
+(use-package ocp-indent
+ :after neocaml
+ :hook (neocaml-mode . ocp-setup-indent))
(let ((opam-share (ignore-errors (car (process-lines "opam" "var" "share")))))
(when (and opam-share (file-directory-p opam-share))
;; Register Merlin
(add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share))
(autoload 'merlin-mode "merlin" nil t nil)
;; Automatically start it in OCaml buffers
- (add-hook 'tuareg-mode-hook 'merlin-mode t)
- (add-hook 'caml-mode-hook 'merlin-mode t)
+ (add-hook 'neocaml-mode-hook 'merlin-mode t)
;; Use opam switch to lookup ocamlmerlin binary
(setq merlin-command 'opam)
;; To easily change opam switches within a given Emacs session, you can
@@ -718,7 +725,7 @@ changes."
(setq frame (next-frame frame))
(while (and (not (eq frame sframe))
(not (eq (frame-visible-p frame) t))
- (filter-f frame))
+ (funcall filter-f frame))
(setq frame (next-frame frame)))
(setq arg (1- arg)))
(while (< arg 0)
@@ -905,7 +912,7 @@ BEG and END define the region."
(progn ; default modeline config additions
(setq-default global-mode-string
- '("" (:eval (let ((str (concat (format " [%s] " (shorten-path default-directory)))))
+ '("" (:eval (let ((str (concat (format " [%s] " (my/shorten-path default-directory)))))
(add-face-text-property
0 (length str)
'(:weight bold :foreground "green2")
@@ -937,10 +944,9 @@ BEG and END define the region."
:demand t
:custom
(ispell-personal-dictionary "/home/tmu/.aspell.en.pws")
- :hook
- (text-mode . 'ispell-minor-mode)
:config
- (setq-default text-mode-hook (remove 'ispell-mode text-mode-hook)))
+ (advice-add 'ispell-mode :before 'debug)
+ (setq-default text-mode-hook (cons 'ispell-minor-mode (remove 'ispell-mode text-mode-hook))))
(electric-pair-mode 1)
@@ -959,6 +965,10 @@ BEG and END define the region."
(global-set-key (kbd "M-Q") 'auto-fill-mode)
(global-set-key (kbd "C-x w o") 'my/toggle-window-other-reachability)
+(advice-add 'mode-line-window-control :around
+ (lambda (f) (concat (funcall f)
+ (if (window-parameter nil 'no-other-window) "o" "")))
+ '(:name "other-window-indicator"))
;; (use-package single-header