Skip to content

Commit eab946c

Browse files
committed
pyright: fix venv discovery
1 parent 28d669b commit eab946c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

fnl/mods/lsp/lsp.fnl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@
205205
:live_mode true}}}}
206206
:plugins {:rope_autoimport {:enabled true}}}
207207
:pyright {:filetypes [:python]
208+
:before_init (fn [_ config]
209+
(let [python (.. config.root_dir "/.venv/bin/python")]
210+
(when (= 1 (vim.fn.executable python))
211+
(tset config.settings.python :pythonPath python))))
208212
:settings {:python {:analysis {:autoSearchPaths true
209213
:extraPaths ["src"]
210214
:useLibraryCodeForTypes true

0 commit comments

Comments
 (0)