20
20
:type '(string ))
21
21
22
22
(defcustom lsp-clients-matlab-server " /usr/local/apps/matlabls/out/index.js"
23
- " Path to the MATLAB language server.
23
+ " Path to the MATLAB language server, index.js.
24
+
25
+ For an overview and detailed install instructions, see:
26
+ https://github.com/mathworks/Emacs-MATLAB-Mode/blob/doc/\
27
+ matlab-language-server-lsp-mode.org
28
+
24
29
To setup,
25
- - Download the language server (clone or unzip):
26
- - git clone https://github.com/mathworks/MATLAB-language-server.git
27
- or
28
- - Download zip from https://github.com/mathworks/MATLAB-language-server
29
- and unzip.
30
- - In the downloaded directory,
31
- npm install
32
- npm run compile
33
- npm run package # optional JavaScript minimization
34
- - Set lsp-clients-matlab-server to the download directory, or
35
- copy the ./out and ./matlab/ directory trees to an install location, e.g.
36
- cp -r ./out/ /usr/local/apps/matlabls/out/
37
- cp -r ./matlab/ /usr/local/apps/matlabls/matlab/
38
- then set `lsp-clients-matlab-server' to the install location."
30
+ 1. Download the language server (clone or unzip):
31
+ git clone https://github.com/mathworks/MATLAB-language-server.git
32
+ or Download and unzip a release from
33
+ https://github.com/mathworks/MATLAB-language-server
34
+ 2. In the clone or unzip directory,
35
+ npm install
36
+ npm run compile
37
+ npm run package # optional JavaScript minimization
38
+ 3. Set lsp-clients-matlab-server to the download directory, or
39
+ copy the ./out and ./matlab/ directory trees to an install location, e.g.
40
+ cp -r ./out/ /usr/local/apps/matlabls/out/
41
+ cp -r ./matlab/ /usr/local/apps/matlabls/matlab/
42
+ then set `lsp-clients-matlab-server' to the install location."
39
43
:group 'lsp-matlab
40
44
:type '(string ))
41
45
@@ -74,9 +78,6 @@ causing hangs."
74
78
:group 'lsp-matlab
75
79
:type '(boolean))
76
80
77
- ; ; Tell lsp-mode about MATLAB language
78
- (add-to-list 'lsp-language-id-configuration '(matlab-mode . " MATLAB" ))
79
-
80
81
(defun matlabls-command ()
81
82
" Return matlabls launch command LIST."
82
83
(let ((cmd (flatten-tree `(, lsp-clients-matlab-nodejs
@@ -120,7 +121,7 @@ causing hangs."
120
121
121
122
(lsp-register-client
122
123
(make-lsp-client :new-connection (lsp-stdio-connection #'matlabls-command )
123
- :major-modes '(matlab-mode)
124
+ :major-modes '(matlab-ts-mode matlab- mode)
124
125
:ignore-messages '(" readFile .*? requested by MATLAB but content not available" )
125
126
:server-id 'matlab-ls
126
127
:language-id " MATLAB"
@@ -130,8 +131,10 @@ causing hangs."
130
131
(lsp-configuration-section " MATLAB" ))))
131
132
:notification-handlers ; ; See src/notifications/NotificationService.ts
132
133
(ht (" telemetry/logdata" #'ignore )
133
- (" mvmStateChange" #'ignore )
134
- (" matlab/connection/update/server" #'ignore ))))
134
+ (" matlab/connection/update/server" #'ignore )
135
+ (" matlab/sections" #'ignore )
136
+ (" mvmPromptChange" #'ignore )
137
+ (" mvmStateChange" #'ignore ))))
135
138
136
139
(provide 'lsp-matlab )
137
140
; ;; lsp-matlab.el ends here
0 commit comments