Open rijulkap opened 2 weeks ago
You should share your lsp config and let us know how you are going about activating your venv. Are you doing that manually? Using a plug-in? I just ask because I can not reproduce this on Windows (where I work on the daily with wezterm and python)
Good point.
I've configured powershell to activate my venv on every new instance. I currently use a a neovim plugin via lazy (lspconfig) to configure my LSP server. The configuring values are left as default.
Here's a snippet of relevant config code:
{
'neovim/nvim-lspconfig',
dependencies = {
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
{ 'folke/neodev.nvim', opts = {} },
},
config = function()
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
local servers = {
pyright = {}
}
require('mason').setup()
local ensure_installed = vim.tbl_keys(servers or {})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
require('mason-lspconfig').setup {
handlers = {
function(server_name)
local server = servers[server_name] or {}
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server)
end,
},
}
}
Do you use Powershell as your default shell within Wezterm?
Can you show the push script too? Any chance you have the plugin venv-selector installed?
As for your question I use pwsh.exe with wezterm but not powershell.exe
I use Anaconda to manage my python envs. My Conda environment is set up within powershell using the 'conda init' command.
#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
If (Test-Path "C:\Users\***\miniconda3\Scripts\conda.exe") {
(& "C:\Users\***\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | ?{$_} | Invoke-Expression
}
#endregion
Nope, i do not have the that plugin installed, and I too am using pwsh.exe, not powershell.
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
I've been experimenting with using Neovim (0.10) with Wezterm for writing python code.
When the python LSP (stable Pyright 1.1.367) used attaches to my current neovim buffer, the Wezterm current working directory also seems to change.
Wezterm then detects the current foreground process and changes it to also changes to node.exe (which is what pyright runs on). Spawning a new tab now causes the new tab to open in the directory pyright is installed in.
Opening a terminal in neovim causes it to open in the correct directory (the original cwd, and not the node directory)
This does not seem to be the case on Linux machines as using the same config on WSL seems to work as intended.
To Reproduce
Configuration
Expected Behavior
The new tab is created in the original current working directory. The cwd variable from the config above is the original cwd
Logs
No response
Anything else?
No response