Skip to content

Commit

Permalink
feat(python): Switch pyright with basedpyright (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzaaft authored Jul 7, 2024
1 parent cf80ce2 commit 77999cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lua/astrocommunity/pack/python-ruff/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This plugin pack does the following:

- Adds `python` and `toml` Treesitter parsers
- Adds `pyright` and `ruff_lsp` language servers
- Adds `basedpyright` and `ruff_lsp` language servers
- Adds the following `null-ls` sources:
- [ruff](https://pypi.org/project/ruff/)
- Adds `debugpy` for debugging
6 changes: 3 additions & 3 deletions lua/astrocommunity/pack/python/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ return {
opts = {
---@diagnostic disable: missing-fields
config = {
pyright = {
basedpyright = {
before_init = function(_, c) c.settings.python.pythonPath = vim.fn.exepath "python" end,
},
},
Expand All @@ -25,7 +25,7 @@ return {
"williamboman/mason-lspconfig.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "pyright" })
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "basedpyright" })
end,
},
{
Expand All @@ -49,7 +49,7 @@ return {
optional = true,
opts = function(_, opts)
opts.ensure_installed =
require("astrocore").list_insert_unique(opts.ensure_installed, { "pyright", "black", "isort", "debugpy" })
require("astrocore").list_insert_unique(opts.ensure_installed, { "basedpyright", "black", "isort", "debugpy" })
end,
},
{
Expand Down

0 comments on commit 77999cc

Please sign in to comment.