summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLLoyderino <adrijan.bjedov@gmail.com>2025-06-05 10:39:16 +0200
committerLLoyderino <adrijan.bjedov@gmail.com>2025-06-05 10:39:16 +0200
commit401edf221328916b48abffc91fe630e2d88df658 (patch)
treef23d1ec216c03d0c557583d438741c9c96681270
parent4127cc3356e72a5a3ba4cbd8d497be962359761e (diff)
WIP LSP configuration settings
-rw-r--r--README.md10
-rw-r--r--init.el44
2 files changed, 54 insertions, 0 deletions
diff --git a/README.md b/README.md
index ab28ff7..302bea9 100644
--- a/README.md
+++ b/README.md
@@ -12,3 +12,13 @@ This setup is tested on Emacs 30.1, this means some packages are already built-i
Additionally the theme custom module assumes you are running Gnome
+## Goodies to check out
+
+### Tab management
+
+```elisp
+;; Tab history
+(tab-bar-history-mode t)
+(global-set-key (kbd "M-[") 'tab-bar-history-back)
+(global-set-key (kbd "M-]") 'tab-bar-history-forward)
+```
diff --git a/init.el b/init.el
index 90df93d..500dced 100644
--- a/init.el
+++ b/init.el
@@ -59,3 +59,47 @@
(use-package nix-ts-mode
:mode "\\.nix\\'")
+;; Web development
+(use-package web-mode)
+
+;; Angular
+(define-derived-mode angular-mode web-mode "angular")
+
+;; TODO: automatic ngserver path evaluation
+;; (with-eval-after-load 'eglot
+;; (let ((ngserver-path (executable-find "ngserver")))
+;; (when ngserver-path
+;; (add-to-list 'eglot-server-programs
+;; '(angular-mode . ("ngserver"
+;; "--stdio"
+;; "--tsProbeLocations"
+;; "./node_modules/typescript/lib"
+;; "--ngProbeLocations"
+;; ngserver-path))))))
+
+(with-eval-after-load 'eglot
+ (add-to-list 'eglot-server-programs
+ '(angular-mode . ("ngserver"
+ "--stdio"
+ "--tsProbeLocations"
+ "./node_modules/typescript/lib"
+ "--ngProbeLocations"
+ "/etc/profiles/per-user/lloyd/bin/ngserver"))))
+
+
+(add-hook 'angular-mode-hook 'eglot-ensure)
+
+;; ;; Astro (depends on web-mode)
+;; (define-derived-mode astro-mode web-mode "astro")
+;; (setq auto-mode-alist
+;; (append '((".*\\.astro\\'" . astro-mode))
+;; auto-mode-alist))
+
+;; (with-eval-after-load 'eglot
+;; (add-to-list 'eglot-server-programs
+;; '(astro-mode . ("astro-ls" "--stdio"
+;; :initializationOptions
+;; (:typescript (:tsdk "./node_modules/typescript/lib"))))))
+
+;; (add-hook 'astro-mode-hook 'eglot-ensure)
+