Skip to content

Commit

Permalink
switch from pyright to python-lsp-server
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyagreco committed Sep 16, 2024
1 parent 718041d commit bf677bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
10 changes: 4 additions & 6 deletions .config/nvim/lua/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ return {
-- python
-- https://github.com/astral-sh/ruff-lsp
lspconfig.ruff_lsp.setup(coq_setup({}))
-- ruff_lsp doesn't do "go to definition" well, so use pyright too
-- pyright config: https://github.com/microsoft/pyright/blob/main/docs/configuration.md
-- command line args: https://microsoft.github.io/pyright/#/command-line
lspconfig.pyright.setup(coq_setup({
cmd = { "pyright-langserver", "--stdio", "--project", PYRIGHT_CONFIG_FILE },
}))
-- ruff_lsp doesn't do "go to definition" at all (source: https://github.com/astral-sh/ruff-lsp/issues/57#issuecomment-1399540768), so use python-lsp-server too
-- lspconfig docs: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pylsp
-- LSP docs: https://github.com/python-lsp/python-lsp-server
lspconfig.pylsp.setup(coq_setup({}))

-- lua
lspconfig.lua_ls.setup({
Expand Down
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# https://microsoft.github.io/pyright/#/configuration
[tool.pyright]
reportGeneralTypeIssues = "warning"


# https://github.com/astral-sh/ruff?tab=readme-ov-file#configuration
[tool.ruff.lint]
select = [
Expand Down

0 comments on commit bf677bf

Please sign in to comment.