@@ -91,28 +91,48 @@ require("venv-lsp").setup()
9191
9292### Commands
9393
94- - ` :VenvLspAutoDisable ` — Disable automatic virtual environment detection.
95- - ` :VenvLspAutoEnable ` — Enable automatic virtual environment detection.
96- - ` :VenvLspAddVenv ` — Manually add a ` <root dir path> ` → ` <virtual environment path> ` mapping.
97- (You will be prompted to enter the root dir path and venv path.)
98- - ` :VenvLspRemoveVenv ` — Remove the manually set ` <root dir path> ` → ` <virtual environment path> ` mapping.
99- (You will be prompted to select the root path to remove.)
94+ The following user commands are provided by ` venv-lsp ` :
95+
96+ - ` :VenvLspAddVenv `
97+ Prompt to add a virtual environment mapping for a project root.
98+
99+ - ` :VenvLspRemoveVenv `
100+ Prompt to remove a virtual environment mapping.
101+
102+ - ` :VenvLspCacheDisable `
103+ Disable the virtual environment cache.
104+
105+ - ` :VenvLspCacheEnable `
106+ Enable the virtual environment cache.
107+
108+ - ` :VenvLspAutoDisable `
109+ Disable automatic virtual environment detection.
110+
111+ - ` :VenvLspAutoEnable `
112+ Enable automatic virtual environment detection.
113+
114+ - ` :VenvLspCacheFile `
115+ Open the cache file in the editor.
116+
100117
101118## Configuration
102119
103120You can pass a config table to ` setup() ` to customize behavior:
104121
105122``` lua
106123require (" venv-lsp" ).setup ({
107- disabled_auto_venv = false , -- (default) Set to true to disable automatic venv detection
108- cache_json_path = vim .fn .stdpath (" cache" ) .. " /venv_lsp/cache.json" , -- (default) Custom path for venv cache file
124+ cache_json_path = vim .fn .stdpath (' cache' ) .. ' /venv_lsp/cache.json' , -- (default) Custom path for venv cache file
125+ disable_cache = false , -- (default) Set to true to disable reading/writing cached venv in json file (still uses in-memory cache)
126+ disable_auto_venv = false , -- (default) Set to true to disable automatic venv detection
109127})
110128```
111129
112- - ` disabled_auto_venv ` : (boolean) If true, disables automatic virtual environment detection and activation.
130+ - ` disable_auto_venv ` : (boolean) If true, disables automatic virtual environment detection and activation.
131+ Default: ` false `
132+ - ` disable_cache ` : (boolean) If true, disables reading/writing cached venvs in the JSON file (still uses in-memory cache).
113133 Default: ` false `
114134- ` cache_json_path ` : (string) Path to the JSON file used for caching venv locations per project.
115- Default: ` utils.path_join( vim.fn.stdpath(" cache"), 'venv_lsp', ' cache.json') `
135+ Default: ` vim.fn.stdpath(' cache') .. '/venv_lsp/ cache.json' `
116136
117137## How it works
118138
@@ -183,7 +203,8 @@ MIT License
183203
184204## TODO
185205
186- - [ ] Support ` pipenv ` venvs
206+ - [ ] Add venv search as in [ vscode-python] ( https://github.com/microsoft/vscode-python/tree/2faa16417084e4b3f9a448127f361dcb336d3ce6/src/client/pythonEnvironments/common/environmentManagers )
207+ - [ ] fzf.vim, fzf-lua, telescope.nvim support for venv search
187208- [ ] Support for ` jedi-language-server `
188209- [ ] Support for ` pylsp `
189210- [ ] Support for ` pylyzer `
0 commit comments