dotfiles.nix/home-manager/common/programs/nvim/default.nix

59 lines
1.7 KiB
Nix
Raw Normal View History

2023-05-15 21:11:30 +08:00
{ inputs, outputs, lib, config, pkgs, ... }:
{
2023-06-05 11:52:44 +08:00
home.packages = with pkgs.unstable; [
2023-05-15 21:11:30 +08:00
# Language servers
clang-tools # C, C++, Objective C/C++, OpenCL, CUDA, and RenderScript
haskell-language-server # Haskell
2023-06-04 01:56:24 +08:00
lua-language-server # Lua
2023-05-15 21:11:30 +08:00
nil # Nix
];
programs.neovim = {
enable = true;
2023-06-05 11:52:44 +08:00
package = pkgs.unstable.neovim-unwrapped;
plugins = with pkgs.unstable.vimPlugins; [
2023-05-15 21:11:30 +08:00
# Install all grammar packages
# nvim-treesitter.withAllGrammars
# Or specific grammar packages only
(nvim-treesitter.withPlugins (p: [
p.c
p.lua
p.nix
]))
# Quality of Life Enhancements
comment-nvim # Smart and powerful commenting
# User Interface
gruvbox-material # Theme
dashboard-nvim # Start screen
nvim-tree-lua # File explorer
lualine-nvim # Statusline
# Git Integration
vim-fugitive # Call any arbitary git command
gitsigns-nvim # Git decorations
# Autocompletion
nvim-lspconfig # Collection of configurations for built-in LSP client
nvim-cmp # Autocompletion plugin
cmp-nvim-lsp # LSP source for nvim-cmp
cmp_luasnip # Snippets source for nvim-cmp
luasnip # Snippets plugin
# Misc
vim-shellcheck # Static analysis tool for shell scripts
markdown-preview-nvim # Preview markdown in browser
# Dependencies
nvim-web-devicons # Provides icons
];
};
xdg.configFile.nvim = { source = ./config; recursive = true; };
}