Last active
October 25, 2024 14:18
-
-
Save ashemedai/2e19cbe5ccfe7fd5adc1424ccd90afa3 to your computer and use it in GitHub Desktop.
Neovim provider configuration with version managers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Set up Python virtualenv if it exists | |
| -- Order of preference: uv, pyenv | |
| if vim.fn.isdirectory(vim.fn.expand("~/.virtualenvs/neovim/bin")) == 1 then | |
| vim.g.python3_host_prog = vim.fn.expand("~/.virtualenvs/neovim/bin/python") | |
| elseif vim.fn.isdirectory(vim.fn.expand("~/.pyenv/versions/neovim/bin")) == 1 then | |
| vim.g.python3_host_prog = vim.fn.expand("~/.pyenv/versions/neovim/bin/python") | |
| end | |
| -- Set up appropriate neovim-node-host | |
| -- Order of preference: fnm, nvm | |
| if os.getenv("FNM_DIR") ~= nil then | |
| vim.g.node_host_prog = vim.fn.expand(os.getenv("FNM_DIR") .. "/aliases/lts-latest/bin/neovim-node-host") | |
| elseif os.getenv("NVM_BIN") ~= nil then | |
| vim.g.node_host_prog = vim.fn.expand(os.getenv("NVM_BIN") .. "/neovim-node-host") | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment