flake.nix 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. description = "Neovim configuration";
  3. inputs = {
  4. neovim-flake.url = "github:neovim/neovim?dir=contrib";
  5. neovim-flake.inputs.nixpkgs.follows = "nixpkgs";
  6. };
  7. outputs = { self, nixpkgs, neovim-flake }: {
  8. overlay = final: prev: {
  9. neovim-unwrapped = neovim-flake.packages.${prev.system}.neovim;
  10. };
  11. packages.x86_64-linux.default =
  12. with import nixpkgs {
  13. system = "x86_64-linux";
  14. overlays = [ self.overlay ];
  15. };
  16. let
  17. extraPath = [
  18. fd
  19. ripgrep
  20. nodePackages.typescript-language-server
  21. nodePackages.eslint_d
  22. ];
  23. in
  24. neovim.override {
  25. extraMakeWrapperArgs = "--prefix PATH : ${lib.makeBinPath extraPath}";
  26. configure = {
  27. customRC = ''
  28. source ${./vimrc}
  29. source ${./init.lua}
  30. '';
  31. packages.myVimPackage = with vimPlugins; {
  32. start = [
  33. vim-sensible
  34. vim-sleuth
  35. vim-fugitive
  36. vim-surround
  37. vim-abolish
  38. undotree
  39. vim-merginal
  40. telescope-nvim
  41. telescope-fzf-native-nvim
  42. mini-nvim
  43. gitsigns-nvim
  44. sonokai
  45. (nvim-treesitter.withPlugins (p: with p; [
  46. tree-sitter-css
  47. tree-sitter-go
  48. tree-sitter-javascript
  49. tree-sitter-json
  50. tree-sitter-lua
  51. tree-sitter-nix
  52. tree-sitter-ruby
  53. tree-sitter-tsx
  54. tree-sitter-typescript
  55. ]))
  56. nvim-lspconfig
  57. nvim-lsp-ts-utils
  58. null-ls-nvim
  59. ];
  60. };
  61. };
  62. };
  63. };
  64. }