Added support for lhs compile with vimtex
This commit is contained in:
parent
75efa287e0
commit
9368fdb570
4 changed files with 46 additions and 28 deletions
2
.config/nvim/ftplugin/lhaskell.lua
Normal file
2
.config/nvim/ftplugin/lhaskell.lua
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
vim.bo.filetype = "tex"
|
||||||
|
vim.bo.syntax = "lhaskell"
|
|
@ -11,9 +11,6 @@ end
|
||||||
capabilities = vim.lsp.protocol.make_client_capabilities()
|
capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|
||||||
|
|
||||||
lspconfig.hls.setup{
|
lspconfig.hls.setup{}
|
||||||
on_attach = on_attach,
|
|
||||||
capabilities = capabilities
|
|
||||||
}
|
|
||||||
|
|
||||||
lspconfig.rust_analyzer.setup{}
|
lspconfig.rust_analyzer.setup{}
|
||||||
|
|
|
@ -87,6 +87,7 @@ _G.packer_plugins = {
|
||||||
url = "https://github.com/akinsho/bufferline.nvim"
|
url = "https://github.com/akinsho/bufferline.nvim"
|
||||||
},
|
},
|
||||||
["coc.nvim"] = {
|
["coc.nvim"] = {
|
||||||
|
config = { "\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins.nvim-coc\frequire\0" },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/afonso/.local/share/nvim/site/pack/packer/start/coc.nvim",
|
path = "/home/afonso/.local/share/nvim/site/pack/packer/start/coc.nvim",
|
||||||
url = "https://github.com/neoclide/coc.nvim"
|
url = "https://github.com/neoclide/coc.nvim"
|
||||||
|
@ -162,46 +163,50 @@ _G.packer_plugins = {
|
||||||
}
|
}
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
time([[Defining packer_plugins]], false)
|
||||||
-- Config for: nvim-tree.lua
|
|
||||||
time([[Config for nvim-tree.lua]], true)
|
|
||||||
try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14nvim-tree\frequire\0", "config", "nvim-tree.lua")
|
|
||||||
time([[Config for nvim-tree.lua]], false)
|
|
||||||
-- Config for: bufferline.nvim
|
|
||||||
time([[Config for bufferline.nvim]], true)
|
|
||||||
try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\15bufferline\frequire\0", "config", "bufferline.nvim")
|
|
||||||
time([[Config for bufferline.nvim]], false)
|
|
||||||
-- Config for: vimtex
|
|
||||||
time([[Config for vimtex]], true)
|
|
||||||
try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19plugins.vimtex\frequire\0", "config", "vimtex")
|
|
||||||
time([[Config for vimtex]], false)
|
|
||||||
-- Config for: LuaSnip
|
|
||||||
time([[Config for LuaSnip]], true)
|
|
||||||
try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins.luasnip\frequire\0", "config", "LuaSnip")
|
|
||||||
time([[Config for LuaSnip]], false)
|
|
||||||
-- Config for: mason.nvim
|
-- Config for: mason.nvim
|
||||||
time([[Config for mason.nvim]], true)
|
time([[Config for mason.nvim]], true)
|
||||||
try_loadstring("\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18plugins.mason\frequire\0", "config", "mason.nvim")
|
try_loadstring("\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18plugins.mason\frequire\0", "config", "mason.nvim")
|
||||||
time([[Config for mason.nvim]], false)
|
time([[Config for mason.nvim]], false)
|
||||||
|
-- Config for: LuaSnip
|
||||||
|
time([[Config for LuaSnip]], true)
|
||||||
|
try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins.luasnip\frequire\0", "config", "LuaSnip")
|
||||||
|
time([[Config for LuaSnip]], false)
|
||||||
-- Config for: packer.nvim
|
-- Config for: packer.nvim
|
||||||
time([[Config for packer.nvim]], true)
|
time([[Config for packer.nvim]], true)
|
||||||
require("plugins.packer")
|
require("plugins.packer")
|
||||||
time([[Config for packer.nvim]], false)
|
time([[Config for packer.nvim]], false)
|
||||||
-- Config for: nvim-treesitter
|
|
||||||
time([[Config for nvim-treesitter]], true)
|
|
||||||
try_loadstring("\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins.treesitter\frequire\0", "config", "nvim-treesitter")
|
|
||||||
time([[Config for nvim-treesitter]], false)
|
|
||||||
-- Config for: leap.nvim
|
|
||||||
time([[Config for leap.nvim]], true)
|
|
||||||
try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\25add_default_mappings\tleap\frequire\0", "config", "leap.nvim")
|
|
||||||
time([[Config for leap.nvim]], false)
|
|
||||||
-- Config for: nvim-autopairs
|
-- Config for: nvim-autopairs
|
||||||
time([[Config for nvim-autopairs]], true)
|
time([[Config for nvim-autopairs]], true)
|
||||||
try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs")
|
try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs")
|
||||||
time([[Config for nvim-autopairs]], false)
|
time([[Config for nvim-autopairs]], false)
|
||||||
|
-- Config for: nvim-tree.lua
|
||||||
|
time([[Config for nvim-tree.lua]], true)
|
||||||
|
try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14nvim-tree\frequire\0", "config", "nvim-tree.lua")
|
||||||
|
time([[Config for nvim-tree.lua]], false)
|
||||||
|
-- Config for: nvim-treesitter
|
||||||
|
time([[Config for nvim-treesitter]], true)
|
||||||
|
try_loadstring("\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins.treesitter\frequire\0", "config", "nvim-treesitter")
|
||||||
|
time([[Config for nvim-treesitter]], false)
|
||||||
-- Config for: nvim-lspconfig
|
-- Config for: nvim-lspconfig
|
||||||
time([[Config for nvim-lspconfig]], true)
|
time([[Config for nvim-lspconfig]], true)
|
||||||
try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins.lspconfig\frequire\0", "config", "nvim-lspconfig")
|
try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins.lspconfig\frequire\0", "config", "nvim-lspconfig")
|
||||||
time([[Config for nvim-lspconfig]], false)
|
time([[Config for nvim-lspconfig]], false)
|
||||||
|
-- Config for: coc.nvim
|
||||||
|
time([[Config for coc.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins.nvim-coc\frequire\0", "config", "coc.nvim")
|
||||||
|
time([[Config for coc.nvim]], false)
|
||||||
|
-- Config for: bufferline.nvim
|
||||||
|
time([[Config for bufferline.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\15bufferline\frequire\0", "config", "bufferline.nvim")
|
||||||
|
time([[Config for bufferline.nvim]], false)
|
||||||
|
-- Config for: leap.nvim
|
||||||
|
time([[Config for leap.nvim]], true)
|
||||||
|
try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\25add_default_mappings\tleap\frequire\0", "config", "leap.nvim")
|
||||||
|
time([[Config for leap.nvim]], false)
|
||||||
|
-- Config for: vimtex
|
||||||
|
time([[Config for vimtex]], true)
|
||||||
|
try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19plugins.vimtex\frequire\0", "config", "vimtex")
|
||||||
|
time([[Config for vimtex]], false)
|
||||||
|
|
||||||
_G._packer.inside_compile = false
|
_G._packer.inside_compile = false
|
||||||
if _G._packer.needs_bufread == true then
|
if _G._packer.needs_bufread == true then
|
||||||
|
|
14
.latexmkrc
Normal file
14
.latexmkrc
Normal 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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue