Files
nixos-config/modules/global/nvim.nix
2025-08-20 18:24:02 +03:00

45 lines
990 B
Nix

{ config, ...}: {
globals.hm = {
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
extraLuaConfig = ''
local bind = vim.keymap.set
local opt = vim.opt
local g = vim.g
local o = vim.o
local cmd = vim.cmd
o.expandtab = true
o.smarttab = true
o.cindent = true
o.autoindent = true
o.ignorecase = true
o.smartcase = true
o.backup = false
o.writebackup = false
o.undofile = true
o.swapfile = false
opt.relativenumber = true
opt.number = true
opt.tabstop = 2
opt.shiftwidth = 2
opt.mouse = "a"
opt.termguicolors = true
opt.clipboard = "unnamedplus"
'';
home.sessionVariables = {
# EDITOR = lib.mkForce lib.getExe pkgs.neovim;
MANPAGER = "${config.hm.home.sessionVariables.EDITOR} +Man!";
};
};
};
}