mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
initial commit
This commit is contained in:
commit
b5febd4395
11 changed files with 861 additions and 0 deletions
95
home-manager/modules/nixvim/default.nix
Normal file
95
home-manager/modules/nixvim/default.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
||||
options = {
|
||||
number = true;
|
||||
relativenumber = false;
|
||||
tabstop = 4;
|
||||
shiftwidth = 4;
|
||||
expandtab = false;
|
||||
};
|
||||
|
||||
globals.mapleader = " ";
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "jk";
|
||||
action = "<ESC>";
|
||||
mode = "i";
|
||||
}
|
||||
{
|
||||
key = "<leader>o";
|
||||
action = ":NvimTreeToggle<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
colorschemes.base16 = {
|
||||
enable = true;
|
||||
colorscheme = "twilight";
|
||||
};
|
||||
|
||||
plugins = {
|
||||
barbecue.enable = true;
|
||||
nvim-colorizer.enable = true;
|
||||
gitsigns.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
surround.enable = true;
|
||||
bufferline.enable = true;
|
||||
nvim-autopairs.enable = true;
|
||||
lsp-format.enable = true;
|
||||
lightline.enable = true;
|
||||
intellitab.enable = true;
|
||||
which-key.enable = true;
|
||||
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>ff" = "find_files";
|
||||
};
|
||||
};
|
||||
|
||||
nvim-tree = {
|
||||
enable = true;
|
||||
filters.custom = [
|
||||
".git"
|
||||
];
|
||||
};
|
||||
|
||||
treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = true;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers.nil_ls.enable = true;
|
||||
};
|
||||
|
||||
lspkind = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
sources = [{ name = "nvim_lsp"; }];
|
||||
mappingPresets = [ "insert" ];
|
||||
mapping = {
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue