nixos/home/common/core/nixvim/default.nix

64 lines
1.6 KiB
Nix
Raw Permalink Normal View History

{
inputs,
pkgs,
...
}: {
2024-06-03 11:05:46 +01:00
imports = [
inputs.nixvim.homeManagerModules.nixvim
./plugins
./options.nix
./theme.nix
./keymaps.nix
];
# Install home packages needed for nixvim
home.packages = [
pkgs.nixpkgs-fmt
pkgs.black
pkgs.yamllint
pkgs.yamlfmt
pkgs.prettierd
pkgs.sqlfmt
pkgs.nodePackages_latest.sql-formatter
pkgs.alejandra
pkgs.shellcheck
pkgs.shellharden
pkgs.shfmt
pkgs.stylua
];
2024-06-03 11:05:46 +01:00
programs.nixvim = {
enable = true;
enableMan = true; # install man pages for nixvim options
clipboard.register = "unnamedplus"; # use system clipboard instead of internal registers
2024-06-17 20:27:57 +01:00
globals.mapleader = " ";
extraConfigLua = ''
vim.api.nvim_set_keymap("", '<Space>', '<Nop>', { noremap = true, silent = true })
'';
2024-06-03 11:05:46 +01:00
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'
2024-08-24 23:32:48 +01:00
" ==== dbui
let g:db_ui_hide_schemas = ['pg_catalog', 'pg_toast_temp.*', 'pg_toast']
2024-08-24 23:32:48 +01:00
let g:db_ui_use_nerd_fonts = 1
let g:db_ui_execute_on_save = 0
2024-06-03 11:05:46 +01:00
'';
};
}