-
Notifications
You must be signed in to change notification settings - Fork 8
/
lsp-prisma.el
53 lines (47 loc) · 1.81 KB
/
lsp-prisma.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
;;; lsp-prisma.el --- Description -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2021 Harshit Pant
;;
;; Author: Harshit Pant <https://github.com/pantharshit00>
;; Maintainer: Harshit Pant <[email protected]>
;; Created: February 18, 2021
;; Modified: February 18, 2021
;; Version: 0.0.1
;; Keywords: Symbol’s value as variable is void: finder-known-keywords
;; Homepage: https://github.com/pimeys/emacs-prisma-mode/
;; Package-Requires: ((emacs "24.3"))
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;; Description
;;
;;; Code:
(require 'lsp-mode)
(defgroup lsp-prisma nil
"LSP support for Prisma using official lsp"
:group 'lsp-mode
:link '(url-link "https://github.com/pimeys/emacs-prisma-mode"))
(lsp-dependency 'prisma-language-server
'(:system "prisma-language-server")
'(:npm :package "@prisma/language-server"
:path "prisma-language-server"))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection (lambda ()
`(,(lsp-package-path 'prisma-language-server)
"--stdio")))
:major-modes '(prisma-mode)
:server-id 'prismals
:activation-fn (lambda (file-name _mode)
(string= (f-ext file-name)
"prisma"))
:download-server-fn (lambda (_client callback error-callback _update?)
(lsp-package-ensure
'prisma-language-server
callback
error-callback))
))
(add-to-list 'lsp-language-id-configuration '(prisma-mode . "prisma"))
(provide 'lsp-prisma)
;;; lsp-prisma.el ends here