testing nixvim
This commit is contained in:
@@ -1,62 +1,23 @@
|
||||
{pkgs, ...}: let
|
||||
treesitterWithGrammars = pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
|
||||
p.bash
|
||||
p.comment
|
||||
p.css
|
||||
p.dockerfile
|
||||
p.fish
|
||||
p.gitattributes
|
||||
p.gitignore
|
||||
p.go
|
||||
p.gomod
|
||||
p.gowork
|
||||
p.hcl
|
||||
p.javascript
|
||||
p.jq
|
||||
p.json5
|
||||
p.json
|
||||
p.lua
|
||||
p.make
|
||||
p.markdown
|
||||
p.nix
|
||||
p.python
|
||||
p.rust
|
||||
p.toml
|
||||
p.typescript
|
||||
p.vue
|
||||
p.yaml
|
||||
]);
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./autocommands.nix
|
||||
./completion.nix
|
||||
./keymappings.nix
|
||||
./options.nix
|
||||
./plugins
|
||||
./todo.nix
|
||||
];
|
||||
|
||||
treesitter-parsers = pkgs.symlinkJoin {
|
||||
name = "treesitter-parsers";
|
||||
paths = treesitterWithGrammars.dependencies;
|
||||
};
|
||||
in {
|
||||
programs.neovim = {
|
||||
home.shellAliases.v = "nvim";
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
coc.enable = false;
|
||||
withNodeJs = true;
|
||||
#package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
|
||||
plugins = [
|
||||
treesitterWithGrammars
|
||||
];
|
||||
};
|
||||
home.file."./.config/nvim/" = {
|
||||
source = ./nvim;
|
||||
recursive = true;
|
||||
};
|
||||
home.file."./.config/nvim/lua/cnst/init.lua".text = ''
|
||||
require("cnst.set")
|
||||
require("cnst.remap")
|
||||
vim.opt.runtimepath:append("${treesitter-parsers}")
|
||||
'';
|
||||
# Treesitter is configured as a locally developed module in lazy.nvim
|
||||
# we hardcode a symlink here so that we can refer to it in our lazy config
|
||||
home.file."./.local/share/nvim/nix/nvim-treesitter/" = {
|
||||
recursive = true;
|
||||
source = treesitterWithGrammars;
|
||||
|
||||
luaLoader.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user