Skip to content

Commit 6af606b

Browse files
committed
feat(util): add some missing lsp-ht generic functs
1 parent c351137 commit 6af606b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lsp-ltex.el

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,20 @@ The editor need to send a completion request.")
287287
(cl-remove-if #'null args)
288288
" ")))))))
289289

290+
(defun lsp-ltex--plist-keys (plist)
291+
"Return the keys of PLIST."
292+
(let (keys)
293+
(while plist
294+
(push (car plist) keys)
295+
(setq plist (cddr plist)))
296+
keys))
297+
298+
(defun lsp-ltex--lsp-keys (table)
299+
"Similar to `lsp-get' and `lsp-put', it return the keys in TABLE."
300+
(if lsp-use-plists
301+
(lsp-ltex--plist-keys table)
302+
(hash-table-keys table)))
303+
290304
(defun lsp-ltex--serialize-symbol (sym dir)
291305
"Serialize SYM to DIR.
292306
Return the written file name, or nil if SYM is not bound."

0 commit comments

Comments
 (0)