48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ inputs, pkgs, ... }:
|
|
{
|
|
imports = [
|
|
inputs.nixvim.homeManagerModules.nixvim
|
|
./plugins
|
|
./options.nix
|
|
./theme.nix
|
|
./keymaps.nix
|
|
];
|
|
|
|
# Install home packages needed for nixvim
|
|
home.packages = [
|
|
pkgs.nixpkgs-fmt
|
|
pkgs.prettierd
|
|
pkgs.sqlfmt
|
|
];
|
|
programs.nixvim = {
|
|
enable = true;
|
|
enableMan = true; # install man pages for nixvim options
|
|
clipboard.register = "unnamedplus"; # use system clipboard instead of internal registers
|
|
globals.mapleader = " ";
|
|
|
|
extraConfigLua = ''
|
|
vim.api.nvim_set_keymap("", '<Space>', '<Nop>', { noremap = true, silent = true })
|
|
'';
|
|
|
|
extraConfigVim = ''
|
|
" ================ Persistent Undo ==================
|
|
" Keep undo history across sessions, by storing in file.
|
|
" Only works all the time.
|
|
if has('persistent_undo')
|
|
silent !mkdir ~/.vim/backups > /dev/null 2>&1
|
|
set undodir=~/.vim/backups
|
|
set undofile
|
|
endif
|
|
|
|
" ================ Vim Wiki config =================
|
|
" See :h vimwiki_list for info on registering wiki paths
|
|
let wiki_0 = {}
|
|
let wiki_0.path = '~/docs/wiki/'
|
|
let wiki_0.index = 'home'
|
|
let wiki_0.syntax = 'markdown'
|
|
let wiki_0.ext = '.md'
|
|
'';
|
|
|
|
};
|
|
}
|