chore: Added support for lhs compile with vimtex

This commit is contained in:
Afonso Franco 2022-10-20 21:23:52 +01:00
parent b4e9c96279
commit 2785d9fce9
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
3 changed files with 17 additions and 4 deletions

View file

@ -0,0 +1,2 @@
vim.bo.filetype = "tex"
vim.bo.syntax = "lhaskell"

View file

@ -11,9 +11,6 @@ end
capabilities = vim.lsp.protocol.make_client_capabilities()
lspconfig.hls.setup{
on_attach = on_attach,
capabilities = capabilities
}
lspconfig.hls.setup{}
lspconfig.rust_analyzer.setup{}

14
.latexmkrc Normal file
View file

@ -0,0 +1,14 @@
# Use subroutine to do preprocessing and running pdflatex
$pdflatex = 'internal mylatex %B %O';
sub mylatex {
my $base = shift @_;
my $tex = "$base.tex";
# Run the preprocessor
system('lhs2TeX', '--poly', '-o', $tex, "$base.lhs") == 0 or return $?;
# Run pdflatex
my $return = system('pdflatex', @_, $tex);
system "echo INPUT $base.lhs >> $aux_dir1$base.fls";
return $return;
}