Compare commits

...

2 Commits

Author SHA1 Message Date
Jaehwang Jung
89c36f3b49
Merge 1724a6e259 into 3e3a984300 2024-12-13 16:12:39 +05:30
Jaehwang Jung
1724a6e259 fix(editorconfig): rename augroup
Problem:
Builtin editorconfig plugin's augroup name conflicts with
https://github.com/editorconfig/editorconfig-vim,
overriding that plugin.

Solution:
Rename the augroup.
2024-11-09 15:19:24 +09:00
2 changed files with 4 additions and 4 deletions

View File

@ -151,7 +151,7 @@ function properties.trim_trailing_whitespace(bufnr, val)
)
if val == 'true' then
vim.api.nvim_create_autocmd('BufWritePre', {
group = 'editorconfig',
group = 'nvim_editorconfig',
buffer = bufnr,
callback = function()
local view = vim.fn.winsaveview()
@ -163,7 +163,7 @@ function properties.trim_trailing_whitespace(bufnr, val)
else
vim.api.nvim_clear_autocmds({
event = 'BufWritePre',
group = 'editorconfig',
group = 'nvim_editorconfig',
buffer = bufnr,
})
end
@ -180,7 +180,7 @@ function properties.insert_final_newline(bufnr, val)
local endofline = val == 'true'
if vim.bo[bufnr].endofline ~= endofline then
vim.api.nvim_create_autocmd('BufWritePre', {
group = 'editorconfig',
group = 'nvim_editorconfig',
buffer = bufnr,
once = true,
callback = function()

View File

@ -1,4 +1,4 @@
local group = vim.api.nvim_create_augroup('editorconfig', {})
local group = vim.api.nvim_create_augroup('nvim_editorconfig', {})
vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead', 'BufFilePost' }, {
group = group,
callback = function(args)