summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-05-13 17:37:54 +0200
committerAlan Pearce2024-05-13 19:19:45 +0200
commit9525dddaa025a9a779730f029fe39091804bbf83 (patch)
tree6293b1f54b38e586654d2679d29a26591ae498f8
parent7f400a87a5068b9ae2f268c87c6927d5109238d3 (diff)
downloadnixfiles-9525dddaa025a9a779730f029fe39091804bbf83.tar.lz
nixfiles-9525dddaa025a9a779730f029fe39091804bbf83.tar.zst
nixfiles-9525dddaa025a9a779730f029fe39091804bbf83.zip
use taplo as a language server (and formatter) for toml files
-rw-r--r--user/emacs/init.el2
-rw-r--r--user/settings/development/base.nix1
2 files changed, 3 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 584a94ca..2f338b9a 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1029,11 +1029,13 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
             nim-mode-hook
             html-mode-hook
             nix-mode-hook
+            toml-ts-mode-hook
             haskell-mode-hook)
           #'eglot-ensure)
   :config (progn
             (when (assoc 'nix-mode eglot-server-programs)
               (setf (car (assoc 'nix-mode eglot-server-programs)) '(nix-mode nix-ts-mode)))
+            (nconc eglot-server-programs '((toml-ts-mode "taplo" "lsp" "stdio")))
             (advice-add 'eglot--message :before-while (lambda (formatstring &rest rest)
                                                         (s-starts-with-p "Connected!" formatstring)))
             (defun my/setup-eglot-eldoc ()
diff --git a/user/settings/development/base.nix b/user/settings/development/base.nix
index 7521c01f..b1c636ad 100644
--- a/user/settings/development/base.nix
+++ b/user/settings/development/base.nix
@@ -13,6 +13,7 @@
       nodePackages.vscode-json-languageserver
       nodePackages.yaml-language-server
       lua-language-server
+      taplo # toml
 
       license-cli
       just