Add some neovim config

This commit is contained in:
Torjus Håkestad 2024-02-27 22:16:39 +01:00
parent 962fd972bc
commit 4d82957b22
2 changed files with 35 additions and 0 deletions

View File

@ -3,7 +3,31 @@
neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
plugins = with pkgs.vimPlugins; [
vim-fugitive
undotree
telescope-nvim
lsp-zero-nvim
(nvim-treesitter.withPlugins (p: [
p.tree-sitter-nix
p.tree-sitter-go
p.tree-sitter-vim
p.tree-sitter-bash
p.tree-sitter-json
p.tree-sitter-python
]))
];
extraLuaConfig = ''
${builtins.readFile ./options.lua}
'';
};
};
home.packages = with pkgs; [
# nix stuff
nixfmt
nil
statix
];
home.sessionVariables.EDITOR = "nvim";
}

View File

@ -0,0 +1,11 @@
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.opt.cursorline = true
vim.opt.scrolloff = 15
vim.opt.wrap = true
vim.o.number = true
vim.o.relativenumber = true
vim.o.tabstop = 4
vim.o.shiftwidth = 4