Replies: 3 comments
-
You can try activating your virtual environment and then running Otherwise, you may have to pass flags to the 'pylsp' server command. |
Beta Was this translation helpful? Give feedback.
-
Hello @orbitalquark . Thanks for your response. When I activate a virtual environment before executing It looks like it might be a problem with More context for the curiousNote: I'm using Checking at the logs, the initialization of the LSP Server sends/receive the exact same json. (Checked it with https://www.jsondiff.com/) Executing
Executing
However, when sending a Go To Definition to the LSP, it returns nothing when the Executing
Executing
|
Beta Was this translation helpful? Give feedback.
-
Hello! Just to circle back here. I think what was causing the error was an issue in my path. I think and old instalation of Also, I read about how to configure environments in -- LSP
local lsp = require('lsp')
lsp.log_rpc = true
lsp.server_commands.python = function()
config = {
pylsp = {
plugins = {
jedi = {
environment = './.venv/'
},
}
}
}
return 'pylsp', config
end
So, long story short: activating the virtual environment before running textadept should do the trick. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hello all!
First of all, thanks for doing Textadept! I'm exciting to give it a try!
I work mostly with python and I'm trying to configure the LSP server to take into consideration my virtual environments instead of the global Python installation.
I'm currently using pylsp and the default configuration works as expected:
However, I would like the LSP to work with the python and the packages I have in my virtual enviroments. On
nvim
I solve this by just activating it before executingnvim .
to open the project.Any suggestions on how can I achieve a similar result with Textadept? I always use a
.venv
folder in my project (next to my.git
folder), so I'm wondering if there is any way to code something in myinit.lua
file.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions