Hi guys,
I’m trying to configure vim with home-manager but some properties of overridden. I’m using home-manger for my user environment and my home is /Users/vrusnac
.
My setup is located in the following file /Users/vrusnac/.config/home-manager/home.nix
. Here are the contents of the file:
{ config, pkgs, ... }:
{
# Let home manager install and manage itself
programs.home-manager.enable = true;
home.stateVersion = "23.11";
home.username = "vrusnac";
home.homeDirectory = "/Users/vrusnac";
# Install packages
home.packages = [
# Fonts
pkgs.fira-mono
# Utils
pkgs.nix
pkgs.heroku
];
# Configure vim
programs.vim = {
enable = true;
settings = {
tabstop = 4;
shiftwidth = 4;
};
};
# Configure zsh
programs.zsh = {
enable = true;
};
}
The home-manager switch runs successfully.
Here I’m specifying shiftwidth to be 4, but when I inspect the vim config I see this
:verbose set shiftwidth ?
shiftwidth=2
Last set from /nix/store/0cc0r8vj2bw5s1xrjx2pdvksj66wfpka-vim-full-9.0.2116/share/vim/vim90/ftplugin/nix.vim line 17
As I understand the problem the tfplugin/nix.vim
overrides the default shiftwidth config.
Versions:
home-manager 23.11-pre
nix-env (Nix) 2.18.1
Thank you in advance!