Skip to content

Instantly share code, notes, and snippets.

@AlixShahid
Created November 7, 2021 05:30
Show Gist options
  • Select an option

  • Save AlixShahid/d876673d3d59ffb36bab52c755475d89 to your computer and use it in GitHub Desktop.

Select an option

Save AlixShahid/d876673d3d59ffb36bab52c755475d89 to your computer and use it in GitHub Desktop.
Medium-Setting Up Neovim for Web Development - 1
--If you want to automatically ensure that packer.nvim is installed on any machine you clone your configuration to,
--add the following snippet (which is due to @Iron-E) somewhere in your config before your first usage of packer:
local execute = vim.api.nvim_command
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', 'https://github.com/wbthomason/packer.nvim', install_path})
execute 'packadd packer.nvim'
end
return require('packer').startup{function()
-- Packer can manage itself
use 'wbthomason/packer.nvim'
end, config = {
-- Move to lua dir so impatient.nvim can cache it
compile_path = vim.fn.stdpath('config')..'/plugin/packer_compiled.lua'
}
}
@AlixShahid

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment