mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-12-20 10:30:09 +01:00
plugin/vimtex with options
This commit is contained in:
parent
09470524a2
commit
9f5ce6b55c
5 changed files with 85 additions and 0 deletions
5
modules/plugins/latex/default.nix
Normal file
5
modules/plugins/latex/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./vimtex
|
||||||
|
];
|
||||||
|
}
|
||||||
21
modules/plugins/latex/vimtex/config.nix
Normal file
21
modules/plugins/latex/vimtex/config.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
|
cfg = config.vim.latex.vimtex;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim.startPlugins = ["vimtex"];
|
||||||
|
|
||||||
|
vim.pluginRC.vimtex = entryAnywhere ''
|
||||||
|
-- Description of each option can be found in https://github.com/lervag/vimtex
|
||||||
|
-- Current nvf options are minimal, contribute your needed options
|
||||||
|
require("vimtex").setup(${toLuaObject cfg.setupOpts})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
6
modules/plugins/latex/vimtex/default.nix
Normal file
6
modules/plugins/latex/vimtex/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./vimtex.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
40
modules/plugins/latex/vimtex/vimtex.nix
Normal file
40
modules/plugins/latex/vimtex/vimtex.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.types) bool str listOf;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
in {
|
||||||
|
|
||||||
|
options.vim.latex.vimtex = {
|
||||||
|
enable = mkEnableOption "VimTeX is a modern Vim and Neovim filetype and syntax plugin for LaTeX files.";
|
||||||
|
|
||||||
|
setupOpts = mkPluginSetupOption "vimtex" {
|
||||||
|
vimtex_view_method = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = "zathura";
|
||||||
|
description = ''
|
||||||
|
The pdf viewer to be used
|
||||||
|
|
||||||
|
The default value is "zathura"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
vimtex_syntax_enabled = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
vimtex syntax enabled
|
||||||
|
|
||||||
|
The default value is false'';
|
||||||
|
};
|
||||||
|
|
||||||
|
vimtex_quickfix_ignore_filters = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
vimtex quickfix ignore filters
|
||||||
|
|
||||||
|
The default value is []'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -2656,6 +2656,19 @@
|
||||||
"url": "https://github.com/mhinz/vim-startify/archive/4e089dffdad46f3f5593f34362d530e8fe823dcf.tar.gz",
|
"url": "https://github.com/mhinz/vim-startify/archive/4e089dffdad46f3f5593f34362d530e8fe823dcf.tar.gz",
|
||||||
"hash": "1ycqfqnmalqzrx1yy9a1fc2p0w922x4sqv2222bi9xjzmh77z4sv"
|
"hash": "1ycqfqnmalqzrx1yy9a1fc2p0w922x4sqv2222bi9xjzmh77z4sv"
|
||||||
},
|
},
|
||||||
|
"vimtex": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "lervag",
|
||||||
|
"repo": "vimtex"
|
||||||
|
},
|
||||||
|
"branch": "master",
|
||||||
|
"submodules": false,
|
||||||
|
"revision": "32bcb3922c20588e00de68f73c86312eda2141ad",
|
||||||
|
"url": "https://github.com/lervag/vimtex/archive/32bcb3922c20588e00de68f73c86312eda2141ad.tar.gz",
|
||||||
|
"hash": "0lgr20w23646ada3aiqmrfxgh5dmkav4724ng2imr0v2nnfpmfh4"
|
||||||
|
},
|
||||||
"which-key-nvim": {
|
"which-key-nvim": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue