Skip to content

Commit

Permalink
lsp-openscad: fix completion when using plists (#4120)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericgiquel authored Oct 27, 2023
1 parent 7bdac39 commit dbcc37f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions clients/lsp-openscad.el
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@
:major-modes '(scad-mode)
:priority -1
:initialized-fn (lambda (workspace)
;; OpenSCAD-LSP returns an empty list of
;; completion options at initialization
;; so completionProvider capability is {}
;; When using plists, this value is parsed as
;; null/nil so we need to force it to "t"
;; to enable completion
(let ((caps (lsp--workspace-server-capabilities workspace)))
(unless (lsp-get caps :completionProvider)
(lsp:set-server-capabilities-completion-provider? caps t)))
(with-lsp-workspace workspace
(lsp--set-configuration
(lsp-configuration-section "openscad"))))
Expand Down

0 comments on commit dbcc37f

Please sign in to comment.