From a51975d7a8a03ffa1be8487a574fd1414ed9f175 Mon Sep 17 00:00:00 2001 From: Thibault Barnouin Date: Thu, 27 Mar 2025 11:46:58 +0100 Subject: [PATCH 1/2] add python to treesitter --- .config/nvim/after/plugin/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua index 0275e1a..f992321 100644 --- a/.config/nvim/after/plugin/treesitter.lua +++ b/.config/nvim/after/plugin/treesitter.lua @@ -1,6 +1,6 @@ require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "bash", "c", "cpp", "cuda", "latex", "lua", "markdown", "rust", "vim", "vimdoc" }, + ensure_installed = { "bash", "bibtex", "c", "cpp", "latex", "lua", "markdown", "python", "vim", "vimdoc" }, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, From aca3555b5378d721de92f2519039a9d2b4a9f3d2 Mon Sep 17 00:00:00 2001 From: Thibault Barnouin Date: Thu, 3 Apr 2025 18:38:40 +0200 Subject: [PATCH 2/2] remove bibtex formating add zathura forwardSearch --- .config/nvim/after/plugin/lsp.lua | 33 ++++++++++++++++++++++++++++++- .config/zathura/zathurarc | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .config/zathura/zathurarc diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index ce0ec39..7815fb4 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -62,7 +62,38 @@ local servers = { }, }, }, - texlab = {}, + texlab = { + filetypes = { "tex", "bib" }, + settings = { + texlab = { + auxDirectory = ".", + bibtexFormatter = "texlab", + build = { + args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" }, + executable = "latexmk", + forwardSearchAfter = false, + onSave = false + }, + chktex = { + onEdit = false, + onOpenAndSave = false + }, + diagnosticsDelay = 300, + formatterLineLength = -1, + forwardSearch = { + args = {} + }, + latexFormatter = "latexindent", + latexindent = { + modifyLineBreaks = false + }, + forwardSearch = { + executable = "zathura", + args = { "--synctex-forward", "%l:1:%f", "%p"} + }, + }, + }, + }, } -- Default handlers for LSP diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc new file mode 100644 index 0000000..94d6a67 --- /dev/null +++ b/.config/zathura/zathurarc @@ -0,0 +1,2 @@ +set synctex true +set synctex-editor-command "texlab inverse-search -i %{input} -l %{line}"