aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-08-21 19:47:47 +0900
committernsfisis <nsfisis@gmail.com>2023-08-21 19:47:47 +0900
commit984e69d9975c64cd951b9d3f1fc17247678d0f9c (patch)
treeb4ca2a04907fa1fac4158f6e7f53432a244bd401
parentdb7b71c5e1b9c7db15fc891f58584a1bd5137ab2 (diff)
downloaddotfiles-984e69d9975c64cd951b9d3f1fc17247678d0f9c.tar.gz
dotfiles-984e69d9975c64cd951b9d3f1fc17247678d0f9c.tar.zst
dotfiles-984e69d9975c64cd951b9d3f1fc17247678d0f9c.zip
neovim: uninstall editorconfig-vim in favor of native support of editorconfig
-rw-r--r--.config/nvim/lazy-lock.json1
-rw-r--r--.config/nvim/lua/vimrc/init.lua16
-rw-r--r--.config/nvim/lua/vimrc/plugins.lua4
3 files changed, 12 insertions, 9 deletions
diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json
index 3d39b0a..e196039 100644
--- a/.config/nvim/lazy-lock.json
+++ b/.config/nvim/lazy-lock.json
@@ -4,7 +4,6 @@
"colorswatch.vim": { "branch": "main", "commit": "2e3f847fc0e493de8b119d3c8560e47ceeff595c" },
"committia.vim": { "branch": "master", "commit": "0b4df1a7f48ffbc23b009bd14d58ee1be541917c" },
"copilot.vim": { "branch": "release", "commit": "1358e8e45ecedc53daf971924a0541ddf6224faf" },
- "editorconfig-vim": { "branch": "master", "commit": "7f4e4dfc58c480d154116614e616d90aac77204d" },
"emmet-vim": { "branch": "master", "commit": "def5d57a1ae5afb1b96ebe83c4652d1c03640f4d" },
"eskk.vim": { "branch": "master", "commit": "a2a722c1c020748249a1f04b788cecd4f509202b" },
"fern-hijack.vim": { "branch": "master", "commit": "5989a1ac6ddffd0fe49631826b6743b129992b32" },
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('', '<Plug>(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',