summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix2
-rw-r--r--lsp/basedpyright.lua23
-rw-r--r--lua/config/lsp.lua2
3 files changed, 27 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index a978d4c..5319107 100644
--- a/flake.nix
+++ b/flake.nix
@@ -153,6 +153,8 @@
nixfmt-rfc-style
];
+ python = [ basedpyright ];
+
qml = [ kdePackages.qtdeclarative ];
rust = [
diff --git a/lsp/basedpyright.lua b/lsp/basedpyright.lua
new file mode 100644
index 0000000..79ff625
--- /dev/null
+++ b/lsp/basedpyright.lua
@@ -0,0 +1,23 @@
+return {
+ cmd = { "basedpyright-langserver", "--stdio" },
+ filetypes = { "python" },
+ root_markers = {
+ "pyrightconfig.json",
+ "pyproject.toml",
+ "setup.py",
+ "setup.cfg",
+ "requirements.txt",
+ "Pipfile",
+ ".git",
+ },
+
+ settings = {
+ basedpyright = {
+ analysis = {
+ autoSearchPaths = true,
+ useLibraryCodeForTypes = true,
+ diagnosticMode = "openFilesOnly",
+ },
+ },
+ },
+}
diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua
index 059b754..8596654 100644
--- a/lua/config/lsp.lua
+++ b/lua/config/lsp.lua
@@ -12,6 +12,8 @@ vim.lsp.enable({
"nixd",
+ "basedpyright",
+
"qmlls",
"rust-analyzer",