Compare commits

..

4 Commits

5 changed files with 91 additions and 59 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
result

1
.nixd.json Normal file
View File

@ -0,0 +1 @@
{"formatting":{"command":"alejandra"}}

5
flake.lock generated
View File

@ -10,10 +10,9 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "nixpkgs-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "type": "indirect"
"type": "github"
} }
}, },
"root": { "root": {

View File

@ -2,31 +2,47 @@
description = "A very basic flake"; description = "A very basic flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "nixpkgs/nixpkgs-unstable";
}; };
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
}: let }: let
supportedSystems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in { in {
nvim = pkgs.mkShell { packages = forAllSystems (system: let
nativeBuildInputs = [ pkgs = nixpkgsFor.${system};
pkgs.alejandra in {
pkgs.ccls nvim = import ./nvim-lsp.nix {inherit pkgs;};
pkgs.luaformatter });
pkgs.nixd
pkgs.pyright devShells = forAllSystems (system: let
pkgs.rust-analyzer pkgs = nixpkgsFor.${system};
pkgs.sumneko-lua-language-server in {
pkgs.svls default = pkgs.mkShell {
pkgs.texlab nativeBuildInputs = [
pkgs.tree-sitter pkgs.alejandra
pkgs.verible pkgs.ccls
pkgs.zls pkgs.gopls
(import ./nvim-lsp.nix {inherit pkgs;}) pkgs.luaformatter
]; pkgs.nixd
}; pkgs.pyright
pkgs.rust-analyzer
pkgs.sumneko-lua-language-server
pkgs.svls
pkgs.texlab
pkgs.tree-sitter
pkgs.verible
pkgs.zls
(import ./nvim-lsp.nix {inherit pkgs;})
];
};
});
defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
}; };
} }

View File

@ -7,44 +7,59 @@
EOF EOF
''; '';
packages.myPlugins.start = with pkgs.vimPlugins; [ packages.myPlugins.start = with pkgs.vimPlugins;
(nvim-treesitter.withPlugins (parsers: [ [
parsers.c (nvim-treesitter.withPlugins (parsers: [
parsers.cpp parsers.c
parsers.go parsers.cpp
parsers.json parsers.go
parsers.latex parsers.json
parsers.lua parsers.latex
parsers.nix parsers.lua
parsers.python parsers.nix
parsers.query parsers.python
parsers.rust parsers.query
parsers.verilog parsers.rust
parsers.vimdoc parsers.verilog
parsers.zig parsers.vimdoc
])) parsers.zig
cmp-buffer ]))
cmp-cmdline cmp-buffer
cmp-nvim-lsp cmp-cmdline
cmp-nvim-ultisnips cmp-nvim-lsp
cmp-path cmp-nvim-ultisnips
colorizer cmp-path
fugitive colorizer
fzf-lua fugitive
gopls fzf-lua
gruvbox gruvbox
nvim-cmp nvim-cmp
nvim-lspconfig nvim-lspconfig
nvim-ts-rainbow nvim-ts-rainbow
repeat repeat
targets-vim targets-vim
UltiSnips UltiSnips
vim-addon-nix vim-addon-nix
vim-signify vim-signify
vim-slime vim-slime
vim-snippets vim-snippets
zig-vim zig-vim
]; ]
++ [
pkgs.alejandra
pkgs.ccls
pkgs.gopls
pkgs.luaformatter
pkgs.nixd
pkgs.pyright
pkgs.rust-analyzer
pkgs.sumneko-lua-language-server
pkgs.svls
pkgs.texlab
pkgs.tree-sitter
pkgs.verible
pkgs.zls
];
}; };
}; };