diff --git a/README.md b/README.md index 87633e4..f266116 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ ## Other Dependencies ++ [neovim-remote](https://github.com/mhinz/neovim-remote) + [vim-plug](https://github.com/junegunn/vim-plug) + fcitx + mozc: Japanese Keyboard - Thanks to [THIS](https://www.youtube.com/watch?v=ptbFWnowvLo) guy! (fcitx fcitx-mozc fcitx-configtool libfcitx-gtk3 libfcitx-gtk libfcitx) + fzf diff --git a/files/.config/nvim/lua/marc/lsp.lua b/files/.config/nvim/lua/marc/lsp.lua index 42bd73a..abd8ba6 100644 --- a/files/.config/nvim/lua/marc/lsp.lua +++ b/files/.config/nvim/lua/marc/lsp.lua @@ -7,7 +7,33 @@ if vim.api.nvim_eval("executable('rust-analyzer')") then end if vim.api.nvim_eval("executable('texlab')") then - require'lspconfig'.texlab.setup{} + require'lspconfig'.texlab.setup{ + settings = { + latex = { + build = { + onSave = true; + }; + forwardSearch = { + executable = "zathura"; + args = {"--synctex-forward", "%l:1:%f", "%p"}; + } + }; + }; + commands = { + ZathuraShow = { + function() + vim.lsp.buf_request(0, "textDocument/forwardSearch", vim.lsp.util.make_position_params(), + function(err, _, _, _) + if err then error(tostring(err)) end + end + ) + end; + description = "Show the current position in zathura"; + } + } + + } + vim.api.nvim_set_keymap("n", "gz", "ZathuraShow", { noremap = true, silent = true }) end if vim.api.nvim_eval("isdirectory($HOME. '/.cache/nvim/lspconfig/jdtls')") then