Add neoformat plugin and update configuration

This commit is contained in:
Sheldon Lee 2024-01-11 23:45:24 +08:00
parent de3801f423
commit 041fd6bd70
3 changed files with 10 additions and 2 deletions

View File

@ -29,7 +29,7 @@ end)
-- (Optional) Configure lua language server for neovim -- (Optional) Configure lua language server for neovim
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
lsp.skip_server_setup({'ltex'}) -- lsp.skip_server_setup({'ltex'})
lsp.setup() lsp.setup()

View File

@ -44,6 +44,8 @@ return require('packer').startup(function(use)
} }
} }
use 'sbdchd/neoformat'
use 'lervag/vimtex' use 'lervag/vimtex'
use 'nvim-lua/plenary.nvim' use 'nvim-lua/plenary.nvim'

View File

@ -22,8 +22,14 @@ vim.opt.scrolloff = 8
-- 'no' disables signcolumn -- 'no' disables signcolumn
vim.opt.signcolumn = 'no' vim.opt.signcolumn = 'no'
--vim.api.nvim_create_autocmd('BufWritePre', {
-- pattern = { '*.tsx', '*.ts', '*.jsx', '*.js' },
-- command = 'silent! EslintFixAll',
-- group = vim.api.nvim_create_augroup('Eslint', {}),
--})
vim.api.nvim_create_autocmd('BufWritePre', { vim.api.nvim_create_autocmd('BufWritePre', {
pattern = { '*.tsx', '*.ts', '*.jsx', '*.js' }, pattern = { '*.tsx', '*.ts', '*.jsx', '*.js' },
command = 'silent! EslintFixAll', command = 'silent! Neoformat',
group = vim.api.nvim_create_augroup('Eslint', {}), group = vim.api.nvim_create_augroup('Eslint', {}),
}) })