summaryrefslogtreecommitdiffstats
path: root/init.el
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2023-04-26 13:20:52 +0100
committerYann Herklotz <git@yannherklotz.com>2023-04-26 13:21:34 +0100
commitaac9c079d32cbd1be07c008d7cbb7a3894908cfb (patch)
tree52a87fd83b4e0164f54faf2bcf5cc1aa15c88682 /init.el
parentc6bac61fcd467dedd1b3696771058abbb5c7d498 (diff)
downloadymh-emacs-aac9c079d32cbd1be07c008d7cbb7a3894908cfb.tar.gz
ymh-emacs-aac9c079d32cbd1be07c008d7cbb7a3894908cfb.zip
Update eglot configuration and add nnhackernews
Diffstat (limited to 'init.el')
-rw-r--r--init.el26
1 files changed, 17 insertions, 9 deletions
diff --git a/init.el b/init.el
index e4e2462..0bce9ea 100644
--- a/init.el
+++ b/init.el
@@ -1044,15 +1044,20 @@ https://yannherklotz.com"))
:bind (:map eglot-mode-map
("C-c f d" . eglot-format))
:config
- (add-to-list 'eglot-server-programs
- '(prolog-mode
- . ("swipl" "-g" "use_module(library(lsp_server))." "-g"
- "lsp_server:main" "-t" "halt" "--" "stdio")))
- (add-to-list 'eglot-server-programs
- '(dafny-mode . ("dafny" "server"
- "--manual-lemma-induction"
- "--warn-missing-constructor-parentheses"
- "--warn-shadowing"))))
+ (when (executable-find "swipl")
+ (add-to-list 'eglot-server-programs
+ '(prolog-mode
+ . ("swipl" "-g" "use_module(library(lsp_server))." "-g"
+ "lsp_server:main" "-t" "halt" "--" "stdio"))))
+ (when (executable-find "dafny")
+ (add-to-list 'eglot-server-programs
+ '(dafny-mode . ("dafny" "server"
+ "--manual-lemma-induction"
+ "--warn-missing-constructor-parentheses"
+ "--warn-shadowing"))))
+ (when (executable-find "haskell-language-server-wrapper")
+ (add-to-list 'eglot-server-programs
+ '(haskell-mode . ("haskell-language-server-wrapper" "--lsp")))))
(use-package elec-pair
:config
@@ -1168,6 +1173,9 @@ https://yannherklotz.com"))
:config
(server-start))
+(use-package nnhackernews
+ :ensure t)
+
(setq gc-cons-threshold (* 1024 1024 10))
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))