feat: add latex support with texpresso and texlab

This commit is contained in:
Youwen Wu 2024-10-29 23:05:19 -07:00
parent 25b63a0234
commit 8e15fc1902
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
6 changed files with 44 additions and 0 deletions

View file

@ -175,6 +175,7 @@
lsp_lines-nvim lsp_lines-nvim
vim-sleuth vim-sleuth
typescript-tools-nvim typescript-tools-nvim
texpresso-vim
]; ];
}; };
@ -204,6 +205,7 @@
bin = { bin = {
websocat = "${pkgs.websocat}/bin/websocat"; websocat = "${pkgs.websocat}/bin/websocat";
tinymist = "${pkgs.tinymist}/bin/tinymist"; tinymist = "${pkgs.tinymist}/bin/tinymist";
texpresso = "${pkgs.texpresso}/bin/texpresso";
}; };
nixdExtras = { nixdExtras = {
nixpkgs = inputs.nixpkgs.outPath; nixpkgs = inputs.nixpkgs.outPath;

31
indent.log Normal file
View file

@ -0,0 +1,31 @@
INFO: latexindent.pl version 3.23.6, 2024-01-17, a script to indent .tex files
latexindent.pl lives here: /nix/store/dg0j7w9wrsdrrrnzyr4akibajm2qfixs-latexindent-3.23.6-tex/scripts/latexindent/
Tue Oct 29 23:04:51 2024
Reading input from STDIN
INFO: Processing switches:
INFO: Directory for backup files and indent.log:
.
INFO: Perl modules are being loaded from the following directories:
/nix/store/mnnp3qlmkwgzl3lbnz7qlaqddwjjwa7v-perl-5.40.0/lib/perl5/5.40.0/FindBin.pm
/nix/store/084zikfymlc0xadd0r0da714cf48p0ri-perl-5.40.0-env/lib/perl5/site_perl/5.40.0/YAML/Tiny.pm
/nix/store/mnnp3qlmkwgzl3lbnz7qlaqddwjjwa7v-perl-5.40.0/lib/perl5/5.40.0/File/Copy.pm
/nix/store/mnnp3qlmkwgzl3lbnz7qlaqddwjjwa7v-perl-5.40.0/lib/perl5/5.40.0/File/Basename.pm
/nix/store/mnnp3qlmkwgzl3lbnz7qlaqddwjjwa7v-perl-5.40.0/lib/perl5/5.40.0/Getopt/Long.pm
/nix/store/084zikfymlc0xadd0r0da714cf48p0ri-perl-5.40.0-env/lib/perl5/site_perl/5.40.0/File/HomeDir.pm
INFO: LatexIndent perl modules are being loaded from, for example:
/nix/store/dg0j7w9wrsdrrrnzyr4akibajm2qfixs-latexindent-3.23.6-tex/scripts/latexindent/LatexIndent/Document.pm
INFO: YAML settings read: defaultSettings.yaml
Reading defaultSettings.yaml from /nix/store/dg0j7w9wrsdrrrnzyr4akibajm2qfixs-latexindent-3.23.6-tex/scripts/latexindent/defaultSettings.yaml
INFO: YAML reading settings
Home directory is /home/youwen
latexindent.pl didn't find indentconfig.yaml or .indentconfig.yaml
see all possible locations: https://latexindentpl.readthedocs.io/en/latest/sec-appendices.html#indentconfig-options)
INFO: Phase 1: searching for objects
INFO: Phase 2: finding surrounding indentation
INFO: Phase 3: indenting objects
INFO: Phase 4: final indentation check
INFO: Output routine:
Not outputting to file; see -w and -o switches for more options.
--------------
INFO: Please direct all communication/issues to:
https://github.com/cmhughes/latexindent.pl

View file

@ -61,6 +61,7 @@ M.setup = function()
lspconfig.tinymist.setup({}) lspconfig.tinymist.setup({})
lspconfig.svelte.setup({}) lspconfig.svelte.setup({})
lspconfig.tailwindcss.setup({}) lspconfig.tailwindcss.setup({})
lspconfig.texlab.setup({})
end end
return M return M

View file

@ -0,0 +1,8 @@
return {
"texpresso.vim",
filetypes = { "*.tex" },
cmd = { "TeXpresso" },
after = function()
require("texpresso").texpresso_path = nixCats("bin.texpresso")
end,
}

View file

@ -64,6 +64,7 @@ return {
yaml = { "prettierd", "prettier", stop_after_first = true }, yaml = { "prettierd", "prettier", stop_after_first = true },
typst = { "typstyle" }, typst = { "typstyle" },
svelte = { "prettier" }, svelte = { "prettier" },
tex = { "latexindent" },
}, },
}) })

View file

@ -11,6 +11,7 @@ return {
require("plugins.trouble"), require("plugins.trouble"),
require("plugins.render-markdown"), require("plugins.render-markdown"),
require("plugins.toggleterm"), require("plugins.toggleterm"),
require("plugins.by-lang.latex"),
{ "telescope-ui-select.nvim" }, { "telescope-ui-select.nvim" },
{ "vim-wakatime" }, { "vim-wakatime" },
{ "vim-sleuth" }, { "vim-sleuth" },