mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 22:47:18 +01:00
split up init.lua
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
return {
|
||||
'stevearc/conform.nvim',
|
||||
opts = {
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
notify_on_error = true,
|
||||
format_on_save = function(bufnr)
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
return {
|
||||
timeout_ms = 1000,
|
||||
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||
}
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
javascript = { { 'eslint_d', 'prettier' } },
|
||||
javascriptreact = { { 'eslint_d', 'prettier' } },
|
||||
typescript = { { 'eslint_d', 'prettier' } },
|
||||
typescriptreact = { { 'eslint_d', 'prettier' } },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user