fix: neovim
This commit is contained in:
parent
08451237fe
commit
e63917ca85
11 changed files with 104 additions and 89 deletions
|
|
@ -3,10 +3,10 @@ let configDir = ../config;
|
|||
in
|
||||
{
|
||||
home.file = {
|
||||
".config/nvim" = {
|
||||
source = "${configDir}/nvim";
|
||||
recursive = true;
|
||||
};
|
||||
# ".config/nvim" = {
|
||||
# source = "${configDir}/nvim";
|
||||
# recursive = true;
|
||||
# };
|
||||
".config/wallpapers".source = "${configDir}/wallpapers";
|
||||
".config/kitty".source = "${configDir}/kitty";
|
||||
".config/neofetch".source = "${configDir}/neofetch";
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
./virtualization.nix
|
||||
./hyprland.nix
|
||||
./swaync.nix
|
||||
./neovim.nix
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
];
|
||||
|
||||
|
|
|
|||
78
home/user/neovim.nix
Normal file
78
home/user/neovim.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{ 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
|
||||
]));
|
||||
|
||||
treesitter-parsers = pkgs.symlinkJoin {
|
||||
name = "treesitter-parsers";
|
||||
paths = treesitterWithGrammars.dependencies;
|
||||
};
|
||||
configDir = ../config;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
fd
|
||||
lua-language-server
|
||||
black
|
||||
nodejs_22
|
||||
gh
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
coc.enable = false;
|
||||
withNodeJs = true;
|
||||
|
||||
plugins = [
|
||||
treesitterWithGrammars
|
||||
];
|
||||
extraPackages = [ pkgs.imagemagick ];
|
||||
extraLuaPackages = ps: with ps; [ magick ];
|
||||
};
|
||||
|
||||
home.file."./.config/nvim" = {
|
||||
source = "${configDir}/nvim";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file."./.config/nvim/init.lua".text = ''
|
||||
require("config.lazy")
|
||||
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/extras/" = {
|
||||
recursive = true;
|
||||
source = treesitterWithGrammars;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -4,14 +4,6 @@ let
|
|||
in
|
||||
{
|
||||
programs = {
|
||||
neovim = {
|
||||
enable = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
extraLuaPackages = ps: [ ps.magick ];
|
||||
extraPackages = [ pkgs.imagemagick ];
|
||||
};
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue