refactor(nvim): remove riscv syntax highlight and make nixd happy
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
23acd9ef5d
commit
e56ccb5a97
3 changed files with 125 additions and 121 deletions
|
@ -6,11 +6,17 @@
|
||||||
coc-stylelintplus,
|
coc-stylelintplus,
|
||||||
nixd,
|
nixd,
|
||||||
vimplugin-easytables-src,
|
vimplugin-easytables-src,
|
||||||
vimplugin-riscv-src,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.vars) hostName mainUser neovimIde;
|
inherit (config.vars) hostName mainUser neovimIde;
|
||||||
inherit (lib) fileContents hasPrefix optionalAttrs optionals removePrefix;
|
inherit (lib) fileContents hasPrefix optionalAttrs optionals removePrefix;
|
||||||
|
inherit (pkgs) vimPlugins;
|
||||||
|
|
||||||
|
buildPlugin = pname: src:
|
||||||
|
pkgs.vimUtils.buildVimPlugin {
|
||||||
|
inherit pname src;
|
||||||
|
version = src.shortRev;
|
||||||
|
};
|
||||||
|
|
||||||
javaSdk = pkgs.temurin-bin-17;
|
javaSdk = pkgs.temurin-bin-17;
|
||||||
coc-stylelintplus-flake = coc-stylelintplus.packages.${pkgs.system}.default;
|
coc-stylelintplus-flake = coc-stylelintplus.packages.${pkgs.system}.default;
|
||||||
|
@ -81,18 +87,21 @@ in {
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
|
|
||||||
extraPackages = with pkgs; ([
|
extraPackages =
|
||||||
|
(with pkgs; [
|
||||||
bat
|
bat
|
||||||
gcc
|
gcc
|
||||||
|
])
|
||||||
|
++ (optionals neovimIde [
|
||||||
|
nixdPkg
|
||||||
]
|
]
|
||||||
++ optionals neovimIde [
|
++ (with pkgs; [
|
||||||
clang-tools
|
clang-tools
|
||||||
nodejs_latest
|
nodejs_latest
|
||||||
nodePackages.npm
|
nodePackages.npm
|
||||||
nodePackages.neovim
|
nodePackages.neovim
|
||||||
gradle
|
gradle
|
||||||
nixdPkg
|
]));
|
||||||
]);
|
|
||||||
|
|
||||||
extraPython3Packages = ps:
|
extraPython3Packages = ps:
|
||||||
optionals neovimIde [
|
optionals neovimIde [
|
||||||
|
@ -186,21 +195,21 @@ in {
|
||||||
extraConfig = fileContents ./base.vim;
|
extraConfig = fileContents ./base.vim;
|
||||||
extraLuaConfig = fileContents ./base.lua;
|
extraLuaConfig = fileContents ./base.lua;
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins;
|
plugins =
|
||||||
([
|
[
|
||||||
fzfWrapper
|
vimPlugins.fzfWrapper
|
||||||
fzf-vim
|
vimPlugins.fzf-vim
|
||||||
fugitive
|
vimPlugins.fugitive
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = dracula-nvim.overrideAttrs {
|
plugin = vimPlugins.dracula-nvim.overrideAttrs {
|
||||||
src = nvim-theme-src;
|
src = nvim-theme-src;
|
||||||
};
|
};
|
||||||
type = "viml";
|
type = "viml";
|
||||||
config = fileContents ./plugins/dracula.vim;
|
config = fileContents ./plugins/dracula.vim;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = todo-comments-nvim;
|
plugin = vimPlugins.todo-comments-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config =
|
config =
|
||||||
/*
|
/*
|
||||||
|
@ -209,71 +218,71 @@ in {
|
||||||
''require('todo-comments').setup()'';
|
''require('todo-comments').setup()'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = gitsigns-nvim;
|
plugin = vimPlugins.gitsigns-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = fileContents ./plugins/gitsigns.lua;
|
config = fileContents ./plugins/gitsigns.lua;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = indent-blankline-nvim;
|
plugin = vimPlugins.indent-blankline-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = fileContents ./plugins/indent.lua;
|
config = fileContents ./plugins/indent.lua;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = mini-nvim;
|
plugin = vimPlugins.mini-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = fileContents ./plugins/mini.lua;
|
config = fileContents ./plugins/mini.lua;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = codewindow-nvim;
|
plugin = vimPlugins.codewindow-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = fileContents ./plugins/codewindow.lua;
|
config = fileContents ./plugins/codewindow.lua;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ optionals neovimIde [
|
++ optionals neovimIde [
|
||||||
markdown-preview-nvim
|
vimPlugins.markdown-preview-nvim
|
||||||
|
|
||||||
# Coc configured
|
# Coc configured
|
||||||
coc-clangd
|
vimPlugins.coc-clangd
|
||||||
coc-cmake
|
vimPlugins.coc-cmake
|
||||||
coc-css
|
vimPlugins.coc-css
|
||||||
coc-eslint
|
vimPlugins.coc-eslint
|
||||||
coc-java
|
vimPlugins.coc-java
|
||||||
coc-sh
|
vimPlugins.coc-sh
|
||||||
coc-stylelintplus-flake
|
coc-stylelintplus-flake
|
||||||
{
|
{
|
||||||
plugin = coc-snippets;
|
plugin = vimPlugins.coc-snippets;
|
||||||
type = "viml";
|
type = "viml";
|
||||||
config = fileContents ./plugins/snippets.vim;
|
config = fileContents ./plugins/snippets.vim;
|
||||||
}
|
}
|
||||||
|
|
||||||
## Lua
|
## Lua
|
||||||
coc-sumneko-lua
|
vimPlugins.coc-sumneko-lua
|
||||||
neodev-nvim
|
vimPlugins.neodev-nvim
|
||||||
|
|
||||||
## Fzf
|
## Fzf
|
||||||
coc-fzf
|
vimPlugins.coc-fzf
|
||||||
|
|
||||||
coc-highlight
|
vimPlugins.coc-highlight
|
||||||
coc-json
|
vimPlugins.coc-json
|
||||||
coc-pyright
|
vimPlugins.coc-pyright
|
||||||
coc-vimlsp
|
vimPlugins.coc-vimlsp
|
||||||
coc-yaml
|
vimPlugins.coc-yaml
|
||||||
coc-toml
|
vimPlugins.coc-toml
|
||||||
coc-markdownlint
|
vimPlugins.coc-markdownlint
|
||||||
coc-tsserver
|
vimPlugins.coc-tsserver
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = nvim-autopairs;
|
plugin = vimPlugins.nvim-autopairs;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = fileContents ./plugins/autopairs.lua;
|
config = fileContents ./plugins/autopairs.lua;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = lualine-nvim;
|
plugin = vimPlugins.lualine-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = fileContents ./plugins/lualine.lua;
|
config = fileContents ./plugins/lualine.lua;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = neo-tree-nvim;
|
plugin = vimPlugins.neo-tree-nvim;
|
||||||
type = "viml";
|
type = "viml";
|
||||||
config = ''
|
config = ''
|
||||||
${fileContents ./plugins/neotree.vim}
|
${fileContents ./plugins/neotree.vim}
|
||||||
|
@ -283,29 +292,24 @@ in {
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
(pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "riscv-asm";
|
|
||||||
version = vimplugin-riscv-src.shortRev;
|
|
||||||
src = vimplugin-riscv-src;
|
|
||||||
})
|
|
||||||
{
|
{
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
plugin = buildPlugin "easytables-nvim" vimplugin-easytables-src;
|
||||||
name = "easytables-nvim";
|
|
||||||
version = vimplugin-easytables-src.shortRev;
|
|
||||||
src = vimplugin-easytables-src;
|
|
||||||
};
|
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''require("easytables").setup();'';
|
config =
|
||||||
|
/*
|
||||||
|
lua
|
||||||
|
*/
|
||||||
|
''require('easytables').setup();'';
|
||||||
}
|
}
|
||||||
])
|
]
|
||||||
# Treesitter
|
# Treesitter
|
||||||
++ (with pkgs.vimPlugins; [
|
++ [
|
||||||
nvim-treesitter-context
|
vimPlugins.nvim-treesitter-context
|
||||||
nvim-treesitter-textobjects
|
vimPlugins.nvim-treesitter-textobjects
|
||||||
{
|
{
|
||||||
type = "viml";
|
type = "viml";
|
||||||
config = fileContents ./plugins/treesitter.vim;
|
config = fileContents ./plugins/treesitter.vim;
|
||||||
plugin = nvim-treesitter.withPlugins (p: [
|
plugin = vimPlugins.nvim-treesitter.withPlugins (p: [
|
||||||
p.awk
|
p.awk
|
||||||
p.bash
|
p.bash
|
||||||
p.c
|
p.c
|
||||||
|
@ -376,7 +380,7 @@ in {
|
||||||
p.yaml
|
p.yaml
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
]);
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
BIN
flake.lock
BIN
flake.lock
Binary file not shown.
BIN
flake.nix
BIN
flake.nix
Binary file not shown.
Loading…
Reference in a new issue