Skip to content

Commit 90754e4

Browse files
committed
Replace lsp-diagnostic-severity with lsp:diagnostic-severity?
Fixes #47
1 parent 436ed79 commit 90754e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lsp-treemacs.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
:type 'string)
107107

108108
(defun lsp-treemacs--match-diagnostic-severity (diagnostic)
109-
(<= (lsp-diagnostic-severity diagnostic)
109+
(<= (lsp:diagnostic-severity? diagnostic)
110110
(prefix-numeric-value lsp-treemacs-error-list-severity)))
111111

112112
(defun lsp-treemacs--diagnostics-match-selected-severity (diagnostics)
@@ -183,7 +183,7 @@
183183
ht->alist
184184
(-keep (-lambda ((file-name . file-diagnostics))
185185
(when (s-starts-with? root-folder file-name)
186-
(lsp-diagnostic-severity
186+
(lsp:diagnostic-severity?
187187
(-min-by (-lambda ((&Diagnostic :severity? left?)
188188
(&Diagnostic :severity? right?))
189189
(> (or left? 0) (or right? 0)))
@@ -206,7 +206,7 @@
206206
"Calculate FILE-DIAGNOSTICS statistics."
207207
(->> file-diagnostics
208208
(-filter #'lsp-treemacs--match-diagnostic-severity)
209-
(-group-by 'lsp-diagnostic-severity)
209+
(-group-by 'lsp:diagnostic-severity?)
210210
(-sort (-lambda ((left) (right)) (< left right)))
211211
(-map (-lambda ((severity . diagnostics))
212212
(propertize (f-filename (number-to-string (length diagnostics)))
@@ -245,7 +245,7 @@
245245

246246
(defun lsp-treemacs--diagnostic-icon (diagnostic)
247247
"Get the icon for DIAGNOSTIC."
248-
(cl-case (lsp-diagnostic-severity diagnostic)
248+
(cl-case (lsp:diagnostic-severity? diagnostic)
249249
(1 treemacs-icon-error)
250250
(2 treemacs-icon-warning)
251251
(t treemacs-icon-info)))

0 commit comments

Comments
 (0)