From 984e69d9975c64cd951b9d3f1fc17247678d0f9c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 21 Aug 2023 19:47:47 +0900 Subject: neovim: uninstall editorconfig-vim in favor of native support of editorconfig --- .config/nvim/lua/vimrc/init.lua | 16 ++++++++++++---- .config/nvim/lua/vimrc/plugins.lua | 4 ---- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to '.config/nvim/lua') diff --git a/.config/nvim/lua/vimrc/init.lua b/.config/nvim/lua/vimrc/init.lua index 562abd8..3148d02 100644 --- a/.config/nvim/lua/vimrc/init.lua +++ b/.config/nvim/lua/vimrc/init.lua @@ -31,10 +31,18 @@ end local function set_indentation(style, width) - vim.bo.expandtab = style - vim.bo.tabstop = width - vim.bo.shiftwidth = width - vim.bo.softtabstop = width + local editorconfig = vim.b.editorconfig or {} + + if not editorconfig.indent_style then + vim.bo.expandtab = style + end + if not editorconfig.tab_width then + vim.bo.tabstop = width + end + if not editorconfig.indent_size then + vim.bo.shiftwidth = width + vim.bo.softtabstop = width + end end diff --git a/.config/nvim/lua/vimrc/plugins.lua b/.config/nvim/lua/vimrc/plugins.lua index 61c62f2..b5f786e 100644 --- a/.config/nvim/lua/vimrc/plugins.lua +++ b/.config/nvim/lua/vimrc/plugins.lua @@ -532,10 +532,6 @@ return { vim.keymap.set('', '(hop-k)', function() hop_jk({ direction = BEFORE_CURSOR }) end, { silent = true }) end, }, - -- Integration with EditorConfig (https://editorconfig.org) - { - 'editorconfig/editorconfig-vim', - }, -- Extend J. { 'osyo-manga/vim-jplus', -- cgit v1.2.3-70-g09d2