Skip to content

Conversation

@jglasovic
Copy link
Owner

No description provided.

jglasovic and others added 9 commits June 23, 2025 21:51
Refactor venv manager modules to use plain tables instead of class-based
inheritance. Remove the unused PythonManager base class. Update all venv
manager implementations (local, poetry, pyenv) to use table-based
methods and direct function calls. This simplifies the codebase and
improves maintainability.
Move pyright, basedpyright, and pyrefly LSP configuration files from
lsp_config to a new language_servers module. Update their update_config
functions to accept python_path directly instead of virtualenv_path.
Add a language_servers/init.lua to centralize LSP exports for easier
management and future extensibility.
- Move logger.lua to common/logger.lua for better organization.
- Refactor common/os.lua to improve Windows detection and type hints.
- Refactor common/path.lua:
  - Add normalization support and _normalized field.
  - Change join to append, simplify path joining.
  - Improve remove_suffix logic and stat caching.
  - Enhance list to filter by type and return full paths.
  - Export Path via a callable module function.
- Move LSP integration logic to new modules: hooks.lua, lspconfig.lua,
  and native_lsp.lua for clearer separation of concerns.
- Remove lsp_config.lua in favor of language_servers module.
- Refactor setup.lua to delegate LSP setup to new modules.
- Update cache, config, python, and venv modules for improved
  modularity, naming, and config handling.
- Use common/logger.lua for logging throughout.
- Add support for disabling cache and auto venv via config.
- Improve environment variable handling for Darwin/Unix systems.
Introduce a modular selector system for choosing root directories and
virtual environments interactively. Add support for Telescope, fzf-lua,
fzf.vim, and native vim.ui as selection backends, auto-detecting the
best available. Refactor add_venv and remove_venv commands to use the
new selector interface for improved user experience and flexibility.
@jglasovic jglasovic changed the title refactor: full code refactor and interactive venv and root directory selection [WIP] refactor: full code refactor and interactive venv and root directory selection Jun 25, 2025
Moved all selector implementations from `selector/` to `selectors/` for
better naming consistency. Updated imports and initialization logic to
use the new `selectors` module. Removed the old `selector/init.lua` and
added `selectors/init.lua` with a `get()` function to retrieve the
available selector. This change improves code organization and clarity.
Refactored type annotations across the codebase to use plain Lua types
and updated all function signatures for clarity and correctness.
Removed legacy Path class and replaced with stateless functions.
Ensured all config and path-related functions have accurate type
declarations. This improves maintainability and type safety.
- Rename local venv manager module and references from `local` to
  `local_venv` for clarity and consistency.
- Refactor all venv manager modules to use `M` instead of manager-specific
  table names.
- Change root directory selection logic to pass a list of parent paths
  instead of a single directory, improving user experience in selectors.
- Update all selectors (fzf-lua, fzf.vim, telescope, nvim.ui) to accept
  and display a list of paths for root directory selection.
- Add utility to list parent directories up to root, home, or git repo.
- Minor prompt and code style improvements for consistency.
Replaces all instances of the 'custom_os' module import and usage with
'common_os' for consistency and clarity. Updates all affected files,
including commands, hooks, python, venv, and pyenv manager modules.
No functional changes introduced.
Removes the --local flag from the Poetry command that retrieves the
virtualenvs.path configuration. This ensures the correct global
virtualenvs path is returned, improving compatibility with different
Poetry setups.
- Revise README to clarify and expand the list of user commands, including
  new cache-related commands.
- Update configuration section to reflect new options and correct
  parameter names (`disable_auto_venv`, `disable_cache`).
- Improve formatting and descriptions for clarity.
- Minor code formatting improvements for logger messages and variable
  alignment.
@jglasovic jglasovic force-pushed the jglasovic/venv-selector branch from 1868003 to 54b9c78 Compare June 26, 2025 11:47
Moved the active_virtualenv function from venv.lua to venv-lsp.lua for
better encapsulation and to reduce unnecessary dependencies. Updated
references to use the new implementation and removed the old function
from venv.lua. This change simplifies the module interface and aligns
with the intended usage pattern.
Add documentation to the `active_virtualenv` function indicating that it
is useful for displaying the active Python virtual environment in the
statusline. This clarifies its intended usage for users integrating
virtual environment information into their editor UI.
@jglasovic jglasovic changed the title [WIP] refactor: full code refactor and interactive venv and root directory selection refactor: full code refactor and interactive venv and root directory selection Jun 28, 2025
@jglasovic jglasovic merged commit 300d2eb into main Jun 28, 2025
4 checks passed
@jglasovic jglasovic deleted the jglasovic/venv-selector branch June 28, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants