From 146cb9745c31c503808ce8608b24ff69158e4d19 Mon Sep 17 00:00:00 2001 From: thek4n Date: Tue, 23 Jan 2024 19:21:59 +0300 Subject: [PATCH] nvim editorconfig --- home/user/.config/nvim/after/ftplugin/cpp.lua | 5 ----- home/user/.config/nvim/lua/base/options.lua | 2 +- home/user/.editorconfig | 20 ++++++++++++++++++- 3 files changed, 20 insertions(+), 7 deletions(-) delete mode 100644 home/user/.config/nvim/after/ftplugin/cpp.lua diff --git a/home/user/.config/nvim/after/ftplugin/cpp.lua b/home/user/.config/nvim/after/ftplugin/cpp.lua deleted file mode 100644 index 53435a1..0000000 --- a/home/user/.config/nvim/after/ftplugin/cpp.lua +++ /dev/null @@ -1,5 +0,0 @@ -local opt = vim.opt_local - -opt.tabstop = 2 -opt.softtabstop = 2 -opt.shiftwidth = vim.bo.tabstop diff --git a/home/user/.config/nvim/lua/base/options.lua b/home/user/.config/nvim/lua/base/options.lua index 692e073..bde2f15 100644 --- a/home/user/.config/nvim/lua/base/options.lua +++ b/home/user/.config/nvim/lua/base/options.lua @@ -132,4 +132,4 @@ vim.api.nvim_create_autocmd("BufReadPost", { vim.api.nvim_exec("normal! g'\"",false) end end -}) +}) \ No newline at end of file diff --git a/home/user/.editorconfig b/home/user/.editorconfig index a0259ff..1a492fc 100644 --- a/home/user/.editorconfig +++ b/home/user/.editorconfig @@ -1,4 +1,22 @@ +root = true + [*] end_of_line = lf insert_final_newline = false -trim_trailing_whitespace = true \ No newline at end of file +trim_trailing_whitespace = true +charset = utf-8 +indent_style = space +indent_size = 4 +tab_width = 4 + +[*.{cpp,h}] +indent_size = 2 +tab_width = 2 + +[*.py] +insert_final_newline = true + +[Makefile] +indent_style = tab +indent_size = tab +tab_width = 4 \ No newline at end of file