diff --git a/lua/config/mappings.lua b/lua/config/mappings.lua index 0d32b21..90984ec 100644 --- a/lua/config/mappings.lua +++ b/lua/config/mappings.lua @@ -22,9 +22,22 @@ m.nmap("[d", vim.diagnostic.goto_prev) m.nmap("]d", vim.diagnostic.goto_next) m.nmap("q", vim.diagnostic.setloclist) --- easier +-- "alt tab" m.nmap("n", "") +-- open zathura for current tex +-- I want to make this more generic +-- however,,,,,, I hate regex +-- and lua contains no path utils :) +m.nmap("ot", function () + local path = vim.api.nvim_buf_get_name(0) + io.popen("zathura " + ..path:match("(.*).tex") + ..".pdf" + ) +end) + +-- TODO: refactor so map() uses a layout file and converts -- colemak-dh local l = u.layout l.swap("n", "h") diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 83707ee..1c2b59f 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -15,10 +15,6 @@ return { "scalameta/nvim-metals", dependencies = { "nvim-lua/plenary.nvim" } }, - { - "lervag/vimtex", - config = function() vim.g.vimtex_view_method = 'zathura' end - }, "mfussenegger/nvim-jdtls", "folke/neodev.nvim", } diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index e184f5f..47c8801 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -49,6 +49,15 @@ local config = function() c.pylsp.setup {} c.kotlin_language_server.setup {} c.jsonls.setup {} + c.texlab.setup { + settings = { + texlab = { + build = { + onSave = true + } + } + } + } require 'config.lsp-settings' end diff --git a/test b/test new file mode 100644 index 0000000..e69de29