feat(lang): add latex
This commit is contained in:
parent
9b4a527c88
commit
39da199c3a
2
init.lua
2
init.lua
@ -366,6 +366,8 @@ local servers = {
|
|||||||
|
|
||||||
nil_ls = {},
|
nil_ls = {},
|
||||||
|
|
||||||
|
texlab = {},
|
||||||
|
|
||||||
jdtls = {
|
jdtls = {
|
||||||
java = {
|
java = {
|
||||||
configuration = {
|
configuration = {
|
||||||
|
@ -13,6 +13,7 @@ return {
|
|||||||
require("null-ls").builtins.diagnostics.golangci_lint,
|
require("null-ls").builtins.diagnostics.golangci_lint,
|
||||||
require("null-ls").builtins.formatting.google_java_format,
|
require("null-ls").builtins.formatting.google_java_format,
|
||||||
require("null-ls").builtins.formatting.nixpkgs_fmt,
|
require("null-ls").builtins.formatting.nixpkgs_fmt,
|
||||||
|
require("null-ls").builtins.formatting.textidote,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
23
lua/custom/plugins/vimtex.lua
Normal file
23
lua/custom/plugins/vimtex.lua
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user