add prisma support
This commit is contained in:
6 files changed
+36
No files matched your search
@@ -12,3 +12,4 @@
|
||||
/games/
|
||||
/tramp
|
||||
/eshell/
|
||||
/tree-sitter/
|
||||
@@ -193,3 +193,9 @@
|
||||
[submodule "site-lisp/graphviz-dot-mode"]
|
||||
path = site-lisp/graphviz-dot-mode
|
||||
url = https://github.com/ppareit/graphviz-dot-mode.git
|
||||
[submodule "site-lisp/prisma-ts-mode"]
|
||||
path = site-lisp/prisma-ts-mode
|
||||
url = https://github.com/nverno/prisma-ts-mode.git
|
||||
[submodule "tree-sitter-langs/tree-sitter-prisma"]
|
||||
path = tree-sitter-langs/tree-sitter-prisma
|
||||
url = https://github.com/victorhqc/tree-sitter-prisma.git
|
||||
@@ -89,6 +89,7 @@ If freezing sometimes, decrease it. If stuttering, increase it.")
|
||||
(require 'init-markdown)
|
||||
(require 'init-media)
|
||||
(require 'init-plantuml)
|
||||
(require 'init-prisma)
|
||||
|
||||
|
||||
(setq custom-file (expand-file-name "custom.el" creature/cache-dir))
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
;; -*- coding: utf-8; lexical-binding: t; -*-
|
||||
|
||||
(require 'init-package)
|
||||
|
||||
(add-pkg-in-pkg-dir "prisma-ts-mode")
|
||||
(autoload 'prisma-ts-mode "prisma-ts-mode" "" t)
|
||||
;; remember run `treesit-install-language-grammar' command to install `prisma'
|
||||
(add-to-list
|
||||
'treesit-language-source-alist
|
||||
(list
|
||||
'prisma
|
||||
(file-truename
|
||||
(file-name-concat
|
||||
(file-name-directory (or load-file-name buffer-file-name))
|
||||
"../tree-sitter-langs/tree-sitter-prisma"))))
|
||||
(add-to-list 'auto-mode-alist '("\\.prisma$" . prisma-ts-mode))
|
||||
|
||||
;; language server is `@prisma/language-server', install it by npm/pnpm/yarn.
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(prisma-ts-mode . ("prisma-language-server" "--stdio"))))
|
||||
|
||||
(add-hook 'prisma-ts-mode-hook #'eglot-ensure)
|
||||
|
||||
|
||||
(provide 'init-prisma)
|
||||
Submodule
+1
Submodule site-lisp/prisma-ts-mode added at a702998014.
Submodule
+1
Submodule tree-sitter-langs/tree-sitter-prisma added at eca2596a35.
Reference in new issue
Block a user