-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.el
41 lines (32 loc) · 1.15 KB
/
setup.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
(require 'lsp)
;; (setq lsp-log-io t)
;; use (lsp-workspace-show-log)
;; (setq lsp-disabled-clients '(sqls))
;; (setq exec-path (append exec-path '("/home/al/src/rsls")))
;; (add-to-list 'lsp-language-id-configuration '(sql-mode . "sql"))
;; (lsp--client-disabled-p 'sql-mode 'sqls)
(defcustom lsp-rsls-executable "rsls"
"rsls executable path."
:group 'lsp-rsls
:risky t
:type 'file)
(defcustom-lsp lsp-rsls-databases []
"sqlite database filenames/URIs."
:group 'lsp-rsls
:lsp-path "rsls.databases"
:type '(repeat string))
;; TODO: formatting options
;; (lsp-register-custom-settings '(("rsls.databases" lsp-rsls-databases)))
;; (remhash 'rsls lsp-clients)
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection (lambda () lsp-rsls-executable))
:major-modes '(sql-mode)
:priority -1
:initialized-fn (lambda (workspace)
(with-lsp-workspace workspace
(lsp--set-configuration
(lsp-configuration-section "rsls"))))
:activation-fn (lsp-activate-on "sql")
:server-id 'rsls
:synchronize-sections '("rsls")))