mirror of
https://github.com/neovim/neovim.git
synced 2026-05-02 12:04:58 +00:00
feat(editorconfig): add builtin EditorConfig support
This commit is contained in:
11
runtime/plugin/editorconfig.lua
Normal file
11
runtime/plugin/editorconfig.lua
Normal file
@@ -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,
|
||||
})
|
||||
Reference in New Issue
Block a user