Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lsp-pyright-library-folders-fn for workspace library folders #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lsp-pyright.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
:type '(repeat string)
:group 'lsp-pyright)

(defcustom lsp-pyright-library-folders-fn nil
"Function which returns a list of library folders."
:type 'function
:group 'lsp-pyright)

(defcustom lsp-pyright-disable-language-services nil
"Disables all language services except for \"hover\"."
:type 'boolean
Expand Down Expand Up @@ -239,6 +244,7 @@ Current LSP WORKSPACE should be passed in."
;; configuration of each workspace folder later separately
(lsp--set-configuration
(make-hash-table :test 'equal))))
:library-folders-fn lsp-pyright-library-folders-fn
:download-server-fn (lambda (_client callback error-callback _update?)
(lsp-package-ensure 'pyright callback error-callback))
:notification-handlers (lsp-ht ("pyright/beginProgress" 'lsp-pyright--begin-progress-callback)
Expand All @@ -262,6 +268,7 @@ Current LSP WORKSPACE should be passed in."
;; configuration of each workspace folder later separately
(lsp--set-configuration
(make-hash-table :test 'equal))))
:library-folders-fn lsp-pyright-library-folders-fn
:notification-handlers (lsp-ht ("pyright/beginProgress" 'lsp-pyright--begin-progress-callback)
("pyright/reportProgress" 'lsp-pyright--report-progress-callback)
("pyright/endProgress" 'lsp-pyright--end-progress-callback))))
Expand Down