Add neoformatter and format lua files
This commit is contained in:
parent
2e004f2295
commit
b9d1194133
6 changed files with 35 additions and 38 deletions
|
@ -2,48 +2,50 @@ local fn = vim.fn
|
|||
local cmd = vim.cmd
|
||||
|
||||
-- Install packer if it's not yet installed
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'
|
||||
local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim'
|
||||
local packer_not_installed = fn.empty(fn.glob(install_path))
|
||||
|
||||
if packer_not_installed > 0 then
|
||||
print('Packer is not installed, cloning it now...')
|
||||
cmd ('silent !git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
|
||||
print('Packer is not installed, cloning it now...')
|
||||
cmd('silent !git clone https://github.com/wbthomason/packer.nvim ' ..
|
||||
install_path)
|
||||
end
|
||||
|
||||
-- Configure packer
|
||||
cmd 'packadd packer.nvim'
|
||||
require('packer').startup(function()
|
||||
|
||||
-- The plugin manager itself
|
||||
use {'wbthomason/packer.nvim', opt = true}
|
||||
-- The plugin manager itself
|
||||
use {'wbthomason/packer.nvim', opt = true}
|
||||
|
||||
-- Colorscheme
|
||||
use 'joshdick/onedark.vim'
|
||||
-- Colorscheme
|
||||
use 'joshdick/onedark.vim'
|
||||
|
||||
-- Custom status and tabline
|
||||
use 'vim-airline/vim-airline'
|
||||
-- Custom status and tabline
|
||||
use 'vim-airline/vim-airline'
|
||||
|
||||
-- Tree explorer
|
||||
use 'scrooloose/nerdtree'
|
||||
-- Tree explorer
|
||||
use 'scrooloose/nerdtree'
|
||||
|
||||
-- Fuzzy finder
|
||||
use 'junegunn/fzf'
|
||||
use 'junegunn/fzf.vim'
|
||||
-- Fuzzy finder
|
||||
use 'junegunn/fzf'
|
||||
use 'junegunn/fzf.vim'
|
||||
|
||||
-- Do stuff as sudo
|
||||
use 'lambdalisue/suda.vim'
|
||||
-- Do stuff as sudo
|
||||
use 'lambdalisue/suda.vim'
|
||||
|
||||
-- Configs for built-in LSP
|
||||
use 'neovim/nvim-lspconfig'
|
||||
-- Configs for built-in LSP
|
||||
use 'neovim/nvim-lspconfig'
|
||||
|
||||
-- Completion framework
|
||||
use 'nvim-lua/completion-nvim'
|
||||
-- Completion framework
|
||||
use 'nvim-lua/completion-nvim'
|
||||
|
||||
-- Treesitter syntax highlight
|
||||
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
||||
-- Treesitter syntax highlight
|
||||
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
|
||||
|
||||
-- Formatter plugin
|
||||
use 'sbdchd/neoformat'
|
||||
end)
|
||||
|
||||
-- Install plugins if packer was not installed
|
||||
if packer_not_installed > 0 then
|
||||
cmd 'PackerInstall'
|
||||
end
|
||||
if packer_not_installed > 0 then cmd 'PackerInstall' end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue