diff options
| author | Gregory Anders <greg@gpanders.com> | 2023-01-03 09:13:18 -0700 |
|---|---|---|
| committer | Gregory Anders <greg@gpanders.com> | 2023-01-03 10:28:55 -0700 |
| commit | ab9a2c49253413dbbb31756a3eeddb354a663035 (patch) | |
| tree | 6b00254efb14df3734f4b14d35ee8dc2eef9d2db /runtime/plugin | |
| parent | 5eed3e741b39a7e52888b0400ba63a2ea70f4dac (diff) | |
| download | rneovim-ab9a2c49253413dbbb31756a3eeddb354a663035.tar.gz rneovim-ab9a2c49253413dbbb31756a3eeddb354a663035.tar.bz2 rneovim-ab9a2c49253413dbbb31756a3eeddb354a663035.zip | |
feat(editorconfig): add builtin EditorConfig support
Diffstat (limited to 'runtime/plugin')
| -rw-r--r-- | runtime/plugin/editorconfig.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/plugin/editorconfig.lua b/runtime/plugin/editorconfig.lua new file mode 100644 index 0000000000..60eb861aaa --- /dev/null +++ b/runtime/plugin/editorconfig.lua @@ -0,0 +1,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, +}) |