summaryrefslogtreecommitdiff
path: root/.config/nvim_pack/lsp/pyright.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim_pack/lsp/pyright.lua')
-rw-r--r--.config/nvim_pack/lsp/pyright.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/.config/nvim_pack/lsp/pyright.lua b/.config/nvim_pack/lsp/pyright.lua
new file mode 100644
index 0000000..aece9a7
--- /dev/null
+++ b/.config/nvim_pack/lsp/pyright.lua
@@ -0,0 +1,16 @@
+return {
+ cmd = { "pyright-langserver", "--stdio" },
+ filetypes = { "python" },
+ root_dir = function(filename)
+ return util.root_pattern(unpack(root_files))(filename) or util.path.dirname(filename)
+ end,
+ settings = {
+ python = {
+ analysis = {
+ autoSearchPaths = true,
+ diagnosticMode = "workspace",
+ useLibraryCodeForTypes = true
+ }
+ }
+ }
+}