Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/release-notes/rl-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,3 +510,8 @@

- Add inline typst concealing support under `vim.languages.typst` using
[typst-concealer].

[mugaizzo](https://github.com/mugaizzo):

- Add [VimTeX](https://github.com/lervag/vimtex) plugin in `vim.latex.vimtex` with
`enable`. VimTeX options are set using global options `vim.globals.vimtex_OPTION`.
1 change: 1 addition & 0 deletions modules/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"ui"
"utility"
"visuals"
"latex"
];

# The neovim wrapper, used to build a wrapped neovim package
Expand Down
5 changes: 5 additions & 0 deletions modules/plugins/latex/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
imports = [
./vimtex
];
}
13 changes: 13 additions & 0 deletions modules/plugins/latex/vimtex/config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;

cfg = config.vim.latex.vimtex;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["vimtex"];
};
}
6 changes: 6 additions & 0 deletions modules/plugins/latex/vimtex/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
imports = [
./config.nix
./vimtex.nix
];
}
43 changes: 43 additions & 0 deletions modules/plugins/latex/vimtex/vimtex.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{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.

VimTeX options are under vim.global.vimtex_OPTION
'';

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 []'';
};
};
};
}
13 changes: 13 additions & 0 deletions npins/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -2656,6 +2656,19 @@
"url": "https://github.com/mhinz/vim-startify/archive/4e089dffdad46f3f5593f34362d530e8fe823dcf.tar.gz",
"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": {
"type": "Git",
"repository": {
Expand Down