all repos — nixfiles @ 9525dddaa025a9a779730f029fe39091804bbf83

System and user configuration, managed by nix and home-manager

use taplo as a language server (and formatter) for toml files
Alan Pearce alan@alanpearce.eu
Mon, 13 May 2024 17:37:54 +0200
commit

9525dddaa025a9a779730f029fe39091804bbf83

parent

7f400a87a5068b9ae2f268c87c6927d5109238d3

2 files changed, 3 insertions(+), 0 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -1029,11 +1029,13 @@ lua-mode-hook             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 ()
M user/settings/development/base.nixuser/settings/development/base.nix
@@ -13,6 +13,7 @@ nodePackages.dockerfile-language-server-nodejs       nodePackages.vscode-json-languageserver
       nodePackages.yaml-language-server
       lua-language-server
+      taplo # toml
 
       license-cli
       just