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"
},
"original": {
"owner": "NixOS",
"id": "nixpkgs",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
"type": "indirect"
}
},
"root": {

View File

@ -2,31 +2,47 @@
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
};
outputs = {
self,
nixpkgs,
}: 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;
in {
nvim = pkgs.mkShell {
nativeBuildInputs = [
pkgs.alejandra
pkgs.ccls
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;})
];
};
packages = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
nvim = import ./nvim-lsp.nix {inherit pkgs;};
});
devShells = forAllSystems (system: let
pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
nativeBuildInputs = [
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
(import ./nvim-lsp.nix {inherit pkgs;})
];
};
});
defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
};
}

View File

@ -7,44 +7,59 @@
EOF
'';
packages.myPlugins.start = with pkgs.vimPlugins; [
(nvim-treesitter.withPlugins (parsers: [
parsers.c
parsers.cpp
parsers.go
parsers.json
parsers.latex
parsers.lua
parsers.nix
parsers.python
parsers.query
parsers.rust
parsers.verilog
parsers.vimdoc
parsers.zig
]))
cmp-buffer
cmp-cmdline
cmp-nvim-lsp
cmp-nvim-ultisnips
cmp-path
colorizer
fugitive
fzf-lua
gopls
gruvbox
nvim-cmp
nvim-lspconfig
nvim-ts-rainbow
repeat
targets-vim
UltiSnips
vim-addon-nix
vim-signify
vim-slime
vim-snippets
zig-vim
];
packages.myPlugins.start = with pkgs.vimPlugins;
[
(nvim-treesitter.withPlugins (parsers: [
parsers.c
parsers.cpp
parsers.go
parsers.json
parsers.latex
parsers.lua
parsers.nix
parsers.python
parsers.query
parsers.rust
parsers.verilog
parsers.vimdoc
parsers.zig
]))
cmp-buffer
cmp-cmdline
cmp-nvim-lsp
cmp-nvim-ultisnips
cmp-path
colorizer
fugitive
fzf-lua
gruvbox
nvim-cmp
nvim-lspconfig
nvim-ts-rainbow
repeat
targets-vim
UltiSnips
vim-addon-nix
vim-signify
vim-slime
vim-snippets
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
];
};
};