aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/nvim/lua/vimrc/init.lua
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 /.config/nvim/lua/vimrc/init.lua
parentdb7b71c5e1b9c7db15fc891f58584a1bd5137ab2 (diff)
downloaddotfiles-984e69d9975c64cd951b9d3f1fc17247678d0f9c.tar.gz
dotfiles-984e69d9975c64cd951b9d3f1fc17247678d0f9c.tar.zst
dotfiles-984e69d9975c64cd951b9d3f1fc17247678d0f9c.zip
neovim: uninstall editorconfig-vim in favor of native support of editorconfig
Diffstat (limited to '.config/nvim/lua/vimrc/init.lua')
-rw-r--r--.config/nvim/lua/vimrc/init.lua16
1 files changed, 12 insertions, 4 deletions
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