flakes/modules/user/neovim.nix
LavaDesu 8c75ba2a2d
treewide: yet another restructure
modules, overlays, and packages have their own default.nix re-exporting
things instead of reading file paths. slightly improves declarativeness.

wine-osu is removed; we're just using nix-gaming (for now).

our custom packages will now have to be accessed via pkgs.me instead of
just pkgs. helps know where it came from

future goals: get rid of our overlays completely, or at least not make
it replace anything from nixpkgs
2021-11-17 10:57:56 +07:00

70 lines
1.6 KiB
Nix

{ config, lib, pkgs, ... }:
let
luaconf = pkgs.writeText "config.lua"
(lib.replaceStrings ["{{OMNISHARP_PATH}}"] ["${pkgs.omnisharp-roslyn}/bin/omnisharp"]
(builtins.readFile ../../res/config.lua));
in {
systemd.user.tmpfiles.rules = [
"D %t/vim/swap 0755 - - - -"
"D %t/vim/undo 0755 - - - -"
];
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
package = pkgs.neovim-nightly;
withNodeJs = true;
extraPackages = with pkgs; [
rust-analyzer
nodePackages.diagnostic-languageserver
nodePackages.eslint_d
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted
nodePackages.yaml-language-server
];
plugins = with pkgs.vimPlugins; [
ctrlp-vim
lualine-nvim
nerdtree
tokyonight-nvim
vim-fugitive
vim-nix
vim-repeat
vim-signify
vim-surround
nvim-cmp
nvim-lspconfig
cmp-nvim-lsp
cmp_luasnip
luasnip
(nvim-treesitter.withPlugins (p: with p; [
tree-sitter-comment
tree-sitter-c-sharp
pkgs.me.tree-sitter-glimmer
tree-sitter-html
tree-sitter-javascript
tree-sitter-jsdoc
tree-sitter-json
pkgs.me.tree-sitter-jsonc
tree-sitter-lua
tree-sitter-nix
tree-sitter-php
tree-sitter-regex
tree-sitter-rust
tree-sitter-toml
tree-sitter-typescript
tree-sitter-tsx
tree-sitter-yaml
]))
];
extraConfig = ''
luafile ${luaconf}
'';
};
}