2022-03-10 20:59:18 +01:00
|
|
|
{ pkgs, lib, ... }:
|
2022-01-30 20:19:35 +01:00
|
|
|
let
|
2022-03-13 11:46:00 +01:00
|
|
|
theme = pkgs.myThemes.current;
|
2022-03-10 20:59:18 +01:00
|
|
|
|
2022-02-01 14:28:29 +01:00
|
|
|
# config-nvim = "/etc/nixos/configuration/dotfiles/neovim";
|
2022-01-30 20:19:35 +01:00
|
|
|
config-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
|
|
|
name = "config-nvim";
|
|
|
|
src = ../../dotfiles/neovim;
|
|
|
|
};
|
2022-03-10 20:59:18 +01:00
|
|
|
|
2022-03-13 11:46:00 +01:00
|
|
|
# Lua code for importing a theme
|
2022-03-10 20:59:18 +01:00
|
|
|
loadTheme = (theme: ''
|
2022-03-13 11:46:00 +01:00
|
|
|
${theme.neovim.theme}
|
2022-03-10 20:59:18 +01:00
|
|
|
|
2022-03-13 11:46:00 +01:00
|
|
|
vim.g.lualineTheme = ${theme.neovim.lualineTheme}
|
2022-03-10 20:59:18 +01:00
|
|
|
'');
|
|
|
|
|
2022-03-13 11:46:00 +01:00
|
|
|
# Wrap a piece of lua code
|
|
|
|
lua = (code: ''
|
2022-03-10 23:49:44 +01:00
|
|
|
lua << EOF
|
2022-03-13 11:46:00 +01:00
|
|
|
${code}
|
2022-03-10 23:49:44 +01:00
|
|
|
EOF
|
2022-03-13 11:46:00 +01:00
|
|
|
'');
|
2022-02-07 12:39:08 +01:00
|
|
|
in
|
|
|
|
{
|
2022-02-01 00:19:42 +01:00
|
|
|
home-manager.users.adrielus.programs.neovim = {
|
2022-01-30 20:19:35 +01:00
|
|
|
enable = true;
|
|
|
|
package = pkgs.neovim-nightly;
|
2022-01-30 19:10:57 +01:00
|
|
|
|
2022-01-30 20:19:35 +01:00
|
|
|
extraConfig = ''
|
2022-03-13 11:46:00 +01:00
|
|
|
${lua (loadTheme theme)}
|
2022-01-30 19:10:57 +01:00
|
|
|
luafile ${config-nvim}/init.lua
|
|
|
|
'';
|
|
|
|
|
2022-02-01 00:06:48 +01:00
|
|
|
extraPackages = with pkgs; [
|
2022-01-31 21:54:22 +01:00
|
|
|
# Language servers
|
2022-04-04 01:10:26 +02:00
|
|
|
# haskellPackages.agda-language-server # agda
|
2022-02-01 14:28:29 +01:00
|
|
|
nodePackages.typescript-language-server # typescript
|
2022-02-01 00:06:48 +01:00
|
|
|
easy-purescript-nix.purescript-language-server # purescript
|
2022-04-04 01:10:26 +02:00
|
|
|
idris2 # idris2 lang
|
|
|
|
idris2-pkgs.lsp # idris2
|
2022-02-01 00:06:48 +01:00
|
|
|
sumneko-lua-language-server # lua
|
|
|
|
rnix-lsp # nix
|
2022-04-21 13:09:11 +02:00
|
|
|
haskell-language-server # haskell
|
2022-01-31 21:54:22 +01:00
|
|
|
|
2022-02-01 00:06:48 +01:00
|
|
|
# Formatters
|
|
|
|
luaformatter # lua
|
2022-04-21 13:09:11 +02:00
|
|
|
ormolu # haskell
|
2022-02-01 15:18:36 +01:00
|
|
|
prettierd # prettier but faster
|
2022-02-01 14:28:29 +01:00
|
|
|
|
|
|
|
# Others
|
2022-02-07 12:12:28 +01:00
|
|
|
fd # file finder
|
|
|
|
ripgrep # grep rewrite (I think?)
|
2022-02-01 14:28:29 +01:00
|
|
|
nodePackages.typescript # typescript language
|
2022-05-10 14:28:36 +02:00
|
|
|
update-nix-fetchgit # useful for nix stuff
|
2022-02-10 00:22:51 +01:00
|
|
|
|
2022-02-09 21:20:34 +01:00
|
|
|
texlive.combined.scheme-full # latex stuff
|
2022-02-10 00:19:52 +01:00
|
|
|
python38Packages.pygments # required for latex syntax highlighting
|
2022-01-31 21:41:13 +01:00
|
|
|
];
|
2022-01-30 20:19:35 +01:00
|
|
|
|
2022-01-31 21:41:13 +01:00
|
|
|
plugins = with pkgs.vimPlugins;
|
2022-03-13 11:46:00 +01:00
|
|
|
with pkgs.vimExtraPlugins; with pkgs.myVimPlugins; theme.neovim.plugins ++ [
|
2022-01-31 21:41:13 +01:00
|
|
|
config-nvim # my neovim config
|
|
|
|
nvim-lspconfig # configures lsps for me
|
|
|
|
nvim-autopairs # close pairs for me
|
2022-02-07 12:12:28 +01:00
|
|
|
telescope-nvim # fuzzy search for say opening files
|
2022-02-01 00:06:48 +01:00
|
|
|
purescript-vim # purescript syntax highlighting
|
|
|
|
nvim-comment # allows toggling line-comments
|
2022-02-01 14:28:29 +01:00
|
|
|
nvim-treesitter # use treesitter for syntax highlighting
|
2022-04-05 19:42:32 +02:00
|
|
|
nvim-treesitter-textobjects # the lean plugin told me to add this
|
2022-02-01 15:18:36 +01:00
|
|
|
startup-nvim # splash screen
|
2022-02-07 12:12:28 +01:00
|
|
|
vim-devicons # nice looking icons
|
2022-02-07 12:39:08 +01:00
|
|
|
nvim-web-devicons # fork of vim-devicons?
|
2022-02-07 12:27:36 +01:00
|
|
|
plenary-nvim # async utility lib it seems?
|
2022-02-07 12:57:57 +01:00
|
|
|
lualine-nvim # customizable status line
|
2022-02-07 13:14:46 +01:00
|
|
|
nvim-tree-lua # file tree
|
2022-02-09 21:20:34 +01:00
|
|
|
vimtex # latex plugin
|
2022-02-22 21:52:01 +01:00
|
|
|
null-ls-nvim # generic language server
|
|
|
|
telescope-file-browser-nvim # file creation/deletion using telescope
|
2022-02-23 15:44:33 +01:00
|
|
|
lspkind-nvim # show icons in lsp completion menus
|
2022-03-01 10:49:59 +01:00
|
|
|
# symbols-outline-nvim # tree view for symbols in document
|
2022-03-09 19:03:04 +01:00
|
|
|
vimux # interact with tmux from within vim
|
|
|
|
vim-tmux-navigator # easly switch between tmux and vim panes
|
2022-03-09 19:44:21 +01:00
|
|
|
arpeggio # allows me to setup chord keybinds (keybinds where all the keys are pressed at the same time)
|
2022-03-13 13:16:37 +01:00
|
|
|
presence-nvim # discord rich presence
|
2022-04-04 01:10:26 +02:00
|
|
|
agda-nvim # agda support
|
|
|
|
unicode-vim # better unicode support
|
|
|
|
nui-nvim # ui lib required by idris plugin
|
|
|
|
idris2-nvim # idris2 support
|
|
|
|
lean-nvim # lean support
|
|
|
|
kmonad-vim # support for the kmonad config language
|
|
|
|
lh-vim-lib # dependency for lh-brackets
|
|
|
|
lh-brackets # bracket customization
|
2022-02-10 00:19:52 +01:00
|
|
|
|
2022-02-09 21:20:34 +01:00
|
|
|
# Cmp related stuff. See https://github.com/hrsh7th/nvim-cmp
|
|
|
|
cmp-nvim-lsp
|
|
|
|
cmp-buffer
|
|
|
|
cmp-path
|
2022-02-10 00:19:52 +01:00
|
|
|
cmp-cmdline
|
2022-03-01 10:49:59 +01:00
|
|
|
cmp_luasnip
|
|
|
|
nvim-cmp # completion engine
|
|
|
|
luasnip # snippet engine
|
2022-01-31 21:41:13 +01:00
|
|
|
];
|
2022-01-30 19:10:57 +01:00
|
|
|
};
|
|
|
|
}
|