Add neoformatter and format lua files
This commit is contained in:
parent
2e004f2295
commit
b9d1194133
6 changed files with 35 additions and 38 deletions
|
@ -1,5 +1,6 @@
|
|||
local map = function(type, key, value)
|
||||
vim.fn.nvim_buf_set_keymap(0, type, key, value, {noremap = true, silent = true})
|
||||
vim.fn.nvim_buf_set_keymap(0, type, key, value,
|
||||
{noremap = true, silent = true})
|
||||
end
|
||||
|
||||
-- Open/close nerdtree
|
||||
|
|
|
@ -7,7 +7,8 @@ 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)
|
||||
cmd('silent !git clone https://github.com/wbthomason/packer.nvim ' ..
|
||||
install_path)
|
||||
end
|
||||
|
||||
-- Configure packer
|
||||
|
@ -41,9 +42,10 @@ require('packer').startup(function()
|
|||
|
||||
-- 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
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = 'maintained',
|
||||
highlight = {
|
||||
enable = true
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true
|
||||
}
|
||||
highlight = {enable = true},
|
||||
indent = {enable = true},
|
||||
incremental_selection = {enable = true}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue