Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@

nixos-hardware.url = "github:NixOS/nixos-hardware/master";

nixvim = {
url = "github:nix-community/nixvim/nixos-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};

nixpkgs-terraform = {
url = "github:stackbuilders/nixpkgs-terraform";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down
10 changes: 10 additions & 0 deletions modules/home-manager/common/neovim/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{inputs, ...}: {
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
programs.nixvim = {
enable = true;
defaultEditor = true;
luaLoader.enable = true;
};
}
46 changes: 46 additions & 0 deletions modules/home-manager/common/neovim/vim-options.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{ ... }: {
programs.nixvim = {
globals = {
mapleader = " ";
maplocalleader = " ";
};

opts = {
# make sure vim know I always have a dark terminal
background = "dark";

# use spaces for tabs and whatnot
expandtab = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
shiftround = true;

# make sure all the mouse stuff is on.
# pressing alt to hightlight + copy/paste works like it does outside of nvim
mouse = "a";

termguicolors = true;

# Tips from https://github.com/folke/edgy.nvim
# views can only be fully collapsed with the global statusline
laststatus = 3;

# Default splitting will cause your main splits to jump when opening an edgebar.
# To prevent this, set `splitkeep` to either `screen` or `topline`.
splitkeep = "screen";
};

# TODO
#vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>")

#vim.wo.relativenumber = true
};
}