From 9ea6111717518625cbd28a020493ec06610ff01e Mon Sep 17 00:00:00 2001 From: "Vito G. Graffagnino" Date: Tue, 23 Aug 2022 19:02:53 +0100 Subject: add latex symbols capability --- lua/user/autocommands.lua | 1 + lua/user/cmp.lua | 2 ++ lua/user/plugins.lua | 4 ++++ 3 files changed, 7 insertions(+) (limited to 'lua') diff --git a/lua/user/autocommands.lua b/lua/user/autocommands.lua index 76d2002..1c27d6e 100644 --- a/lua/user/autocommands.lua +++ b/lua/user/autocommands.lua @@ -100,6 +100,7 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, { vim.api.nvim_create_autocmd({ "BufWritePost" }, { pattern = { "*.tex" }, callback = function() + -- vim.g['livepreview_previewer'] = 'zathura' vim.cmd [[ TexlabBuild ]] diff --git a/lua/user/cmp.lua b/lua/user/cmp.lua index 2966f5f..b8e3c14 100644 --- a/lua/user/cmp.lua +++ b/lua/user/cmp.lua @@ -104,6 +104,7 @@ cmp.setup { nvim_lsp = "[LSP]", nvim_lua = "[NVIM_LUA]", luasnip = "[Snippet]", + latex_symbols = "[LATEX_SYM]", buffer = "[Buffer]", path = "[Path]", })[entry.source.name] @@ -114,6 +115,7 @@ cmp.setup { { name = "nvim_lsp" }, { name = "nvim_lua" }, { name = "luasnip" }, + { name = "latex_symbols" }, { name = "buffer" }, { name = "path" }, }, diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index af30bf5..1db7da4 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -89,6 +89,8 @@ return packer.startup(function(use) use {"hrsh7th/cmp-nvim-lsp", commit = ""} use {"hrsh7th/cmp-nvim-lua", commit = ""} use {"saadparwaiz1/cmp_luasnip", commit = ""} -- snippet completions + use {"kdheepak/cmp-latex-symbols"} + -- snippets use {"L3MON4D3/LuaSnip", commit = ""} --snippet engine @@ -124,6 +126,8 @@ return packer.startup(function(use) -- Tex -- use {"lervag/vimtex", commit = ""} use {"f3fora/nvim-texlabconfig", commit = "", run ="go build"} + -- use {"emakman/nvim-latex-previewer", LatexViewer = "zathura"} + -- use {"xuhdev/vim-latex-live-preview"} -- DAP use {"mfussenegger/nvim-dap", commit = ""} -- cgit v1.2.3