diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-08-21 19:47:47 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-08-21 19:47:47 +0900 |
| commit | 984e69d9975c64cd951b9d3f1fc17247678d0f9c (patch) | |
| tree | b4ca2a04907fa1fac4158f6e7f53432a244bd401 /.config/nvim/lua/vimrc/init.lua | |
| parent | db7b71c5e1b9c7db15fc891f58584a1bd5137ab2 (diff) | |
| download | dotfiles-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.lua | 16 |
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 |
