Set up typescript language server and add meld to git.

This commit is contained in:
Tom Alexander
2025-07-15 22:57:03 -04:00
parent 8847063948
commit 03f0721e1f
3 changed files with 40 additions and 51 deletions

View File

@@ -1,6 +1,12 @@
(require 'common-lsp)
(require 'util-tree-sitter)
(defun js-format-buffer ()
"Run prettier."
(interactive)
(run-command-on-buffer "prettier" "--stdin-filepath" buffer-file-name)
)
(use-package json-ts-mode
:ensure nil
:pin manual
@@ -113,10 +119,14 @@
("\\.js\\'" . js-ts-mode)
)
:commands (js-ts-mode)
:custom (
(js-indent-level 2)
)
:hook (
(js-ts-mode . (lambda ()
(when-linux
(eglot-ensure)
(add-hook 'before-save-hook 'js-format-buffer nil 'local)
)
))
)