aboutsummaryrefslogtreecommitdiff
path: root/runtime/plugin/editorconfig.lua
blob: 60eb861aaa4f363ab381775c208dd52cc3b56cdd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
if vim.g.editorconfig_enable == false or vim.g.editorconfig_enable == 0 then
  return
end

local group = vim.api.nvim_create_augroup('editorconfig', {})
vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead', 'BufFilePost' }, {
  group = group,
  callback = function(args)
    require('editorconfig').config(args.buf)
  end,
})