format typescript and javascript on save
This commit is contained in:
parent
0f47ba4699
commit
136d55c830
5
init.lua
5
init.lua
|
|
@ -699,7 +699,10 @@ require('lazy').setup({
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
-- You can specify filetypes to autoformat on save here:
|
-- You can specify filetypes to autoformat on save here:
|
||||||
local enabled_filetypes = {
|
local enabled_filetypes = {
|
||||||
-- lua = true,
|
lua = true,
|
||||||
|
javascript = true,
|
||||||
|
typescript = true,
|
||||||
|
typescriptreact = true,
|
||||||
-- python = true,
|
-- python = true,
|
||||||
}
|
}
|
||||||
if enabled_filetypes[vim.bo[bufnr].filetype] then
|
if enabled_filetypes[vim.bo[bufnr].filetype] then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue