flake.nix 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. fzf
  19. bat
  20. ripgrep
  21. nodePackages.typescript-language-server
  22. nodePackages.eslint_d
  23. ];
  24. in
  25. neovim.override {
  26. extraMakeWrapperArgs = "--prefix PATH : ${lib.makeBinPath extraPath} --set BAT_THEME OneHalfDark";
  27. configure = {
  28. customRC = ''
  29. source ${./vimrc}
  30. source ${./init.lua}
  31. '';
  32. packages.myVimPackage = with vimPlugins; {
  33. start = [
  34. vim-sensible
  35. vim-sleuth
  36. vim-fugitive
  37. vim-surround
  38. vim-abolish
  39. undotree
  40. vim-merginal
  41. fzf-vim
  42. fzf-lsp-nvim
  43. mini-nvim
  44. gitsigns-nvim
  45. onedark-nvim
  46. (nvim-treesitter.withPlugins (p: with p; [
  47. tree-sitter-css
  48. tree-sitter-go
  49. tree-sitter-javascript
  50. tree-sitter-json
  51. tree-sitter-lua
  52. tree-sitter-nix
  53. tree-sitter-ruby
  54. tree-sitter-tsx
  55. tree-sitter-typescript
  56. ]))
  57. nvim-lspconfig
  58. nvim-lsp-ts-utils
  59. null-ls-nvim
  60. ];
  61. };
  62. };
  63. };
  64. };
  65. }