feat(nvim|zathura): better latex integration

This commit is contained in:
Price Hiller 2023-05-22 16:32:06 -05:00
parent 2f3ed5075f
commit 32dbb0b103
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
3 changed files with 33 additions and 4 deletions

View File

@ -275,6 +275,23 @@ lspconfig.azure_pipelines_ls.setup({
on_attach = on_attach, on_attach = on_attach,
}) })
lspconfig.texlab.setup({
settings = {
texlab = {
build = {
onSave = true,
executable = "tectonic",
forwardSearchAfter = true,
args = { "-X", "compile", "%f", "--synctex" },
},
forwardSearch = {
executable = "zathura",
args = { "--synctex-forward", "%l:1:%f", "%p" },
},
},
},
})
local path = vim.fn.stdpath("config") .. "/spell/en.utf-8.add" local path = vim.fn.stdpath("config") .. "/spell/en.utf-8.add"
local words = {} local words = {}
@ -315,7 +332,6 @@ for _, server in ipairs({
"tsserver", "tsserver",
"rnix", "rnix",
"marksman", "marksman",
"texlab",
}) do }) do
lspconfig[server].setup(opts) lspconfig[server].setup(opts)
end end

View File

@ -590,12 +590,22 @@ lazy.setup({
"gaoDean/autolist.nvim", "gaoDean/autolist.nvim",
ft = { ft = {
"markdown", "markdown",
"tex",
"text", "text",
"tex",
"plaintex", "plaintex",
"norg",
}, },
opts = {}, config = function()
local autolist = require("autolist")
autolist.setup()
autolist.create_mapping_hook("i", "<CR>", autolist.new)
autolist.create_mapping_hook("i", "<Tab>", autolist.indent)
autolist.create_mapping_hook("i", "<S-Tab>", autolist.indent, "<C-D>")
autolist.create_mapping_hook("n", "o", autolist.new)
autolist.create_mapping_hook("n", "O", autolist.new_before)
autolist.create_mapping_hook("n", ">>", autolist.indent)
autolist.create_mapping_hook("n", "<<", autolist.indent)
autolist.create_mapping_hook("n", "<C-r>", autolist.force_recalculate)
end,
}, },
-- Tint inactive windows -- Tint inactive windows

View File

@ -38,3 +38,6 @@ set recolor "true"
set recolor-keephue "true" set recolor-keephue "true"
set database "plain" set database "plain"
set synctex true
set synctex-editor-command "code -g %{input}:%{line}"