feat(lang): add latex

This commit is contained in:
Lucas Barbieri 2024-07-30 16:35:30 -03:00
parent 9b4a527c88
commit 39da199c3a
3 changed files with 26 additions and 0 deletions

View File

@ -366,6 +366,8 @@ local servers = {
nil_ls = {},
texlab = {},
jdtls = {
java = {
configuration = {

View File

@ -13,6 +13,7 @@ return {
require("null-ls").builtins.diagnostics.golangci_lint,
require("null-ls").builtins.formatting.google_java_format,
require("null-ls").builtins.formatting.nixpkgs_fmt,
require("null-ls").builtins.formatting.textidote,
}
}
end

View File

@ -0,0 +1,23 @@
return {
"lervag/vimtex",
lazy = false, -- we don't want to lazy load VimTeX
-- tag = "v2.15", -- uncomment to pin to a specific release
init = function()
vim.g.vimtex_view_method = "zathura"
vim.g.vimtex_compiler_method = "tectonic"
end,
config = function()
vim.api.nvim_create_autocmd({ "Filetype" }, {
pattern = "tex",
callback = function()
vim.keymap.set("n", "<leader>cc", "<cmd>VimtexCompile<CR>", { desc = "Compile latex file" })
end
})
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
pattern = "*.tex",
callback = function()
vim.cmd [[VimtexCompile]]
end
})
end
}