Browse Source

Only include vim-pyenv plugin when pyenv is installed

master
Taylor Bockman 1 year ago
parent
commit
74db70fe1e
  1. 12
      lua/conf/langs/python.lua
  2. 4
      lua/conf/plugins.lua

12
lua/conf/langs/python.lua

@ -8,12 +8,12 @@ vim.api.nvim_create_autocmd(
{
pattern = "*.py",
callback = function()
local buf = vim.api.nvim_get_current_buf()
vim.api.nvim_buf_set_option(buf, "expandtab")
vim.api.nvim_buf_set_option(buf, "autoindent")
vim.api.nvim_buf_set_option(buf, "tabstop", 4)
vim.api.nvim_buf_set_option(buf, "softtabstop", 4)
vim.api.nvim_buf_set_option(buf, "shiftwidth", 4)
local buf = vim.api.nvim_get_current_buf()
vim.api.nvim_buf_set_option(buf, "expandtab")
vim.api.nvim_buf_set_option(buf, "autoindent")
vim.api.nvim_buf_set_option(buf, "tabstop", 4)
vim.api.nvim_buf_set_option(buf, "softtabstop", 4)
vim.api.nvim_buf_set_option(buf, "shiftwidth", 4)
end
}
)

4
lua/conf/plugins.lua

@ -70,6 +70,8 @@ Plug 'sheerun/vim-polyglot'
-------------------------
-- Pyenv Support
Plug 'lambdalisue/vim-pyenv'
if vim.fn.executable('pyenv') == 1 then
Plug 'lambdalisue/vim-pyenv'
end
vim.call('plug#end')

Loading…
Cancel
Save