I'm configuring Neovim 0.5 using Lua. I set the tab size to 4 in init.lua
, and it works. But in C++ files, the tab size is 8, and I have to execute :set shiftwidth=4
, :set tabstop=4
and :set expandtab
manually.
Here are the config files :
init.lua
:
require "plugins"
require "theme"
local g = vim.g
local wo = vim.wo
local bo = vim.bo
local TAB_WIDTH = 4
bo.tabstop = TAB_WIDTH
bo.shiftwidth = TAB_WIDTH
bo.expandtab = true
wo.cursorline = true
wo.nu = true
wo.rnu = true
lua/plugins.lua
:
require "paq" {
"savq/paq-nvim";
"neovim/nvim-lspconfig";
"Shatur/neovim-ayu";
}
lua/theme.lua
:
vim.g.ayu_mirage = true
vim.cmd("colo ayu")
Maybe a plugin that overrides config for C++ files ?