chore: update config
This commit is contained in:
parent
584ba6e536
commit
cb2ff3574e
13 changed files with 270 additions and 204 deletions
36
lua/custom/plugins/formaters.lua
Normal file
36
lua/custom/plugins/formaters.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
return {
|
||||
'mhartington/formatter.nvim',
|
||||
config = function()
|
||||
vim.cmd([[
|
||||
augroup FormatAutogroup
|
||||
autocmd!
|
||||
autocmd BufWritePost * :silent FormatWrite
|
||||
augroup END
|
||||
]])
|
||||
local util = require "formatter.util"
|
||||
|
||||
local prettierd = require("formatter.defaults.prettierd")
|
||||
|
||||
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
||||
require("formatter").setup {
|
||||
-- Enable or disable logging
|
||||
logging = true,
|
||||
-- Set the log level
|
||||
log_level = vim.log.levels.WARN,
|
||||
-- All formatter configurations are opt-in
|
||||
filetype = {
|
||||
-- Formatter configurations for filetype "lua" go here
|
||||
-- and will be executed in order
|
||||
javascript = prettierd,
|
||||
typescript = prettierd,
|
||||
typescriptreact = prettierd,
|
||||
javascriptreact = prettierd,
|
||||
css = prettierd,
|
||||
json = prettierd,
|
||||
html = prettierd,
|
||||
graphql = prettierd,
|
||||
lua = require("formatter.filetypes.lua").stylua,
|
||||
}
|
||||
}
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue