diff options
| author | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-14 01:07:09 -0800 |
|---|---|---|
| committer | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-14 01:07:09 -0800 |
| commit | 9666b63a70e28b1eef084489a44ea4b4bb4ae65a (patch) | |
| tree | 5870a50d5bce771ca0cde5ae0fe5eba52aa14fdf /lua/common_lsp/texlab.lua | |
| parent | Fix README links. (diff) | |
| download | nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.gz nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.bz2 nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.lz nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.xz nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.zst nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.zip | |
Rename to nvim_lsp and nvim-lsp.
Diffstat (limited to 'lua/common_lsp/texlab.lua')
| -rw-r--r-- | lua/common_lsp/texlab.lua | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/lua/common_lsp/texlab.lua b/lua/common_lsp/texlab.lua deleted file mode 100644 index d0339e1f..00000000 --- a/lua/common_lsp/texlab.lua +++ /dev/null @@ -1,77 +0,0 @@ -local skeleton = require 'common_lsp/skeleton' -local util = require 'common_lsp/util' -local lsp = vim.lsp - -local cwd = vim.loop.cwd() - -local texlab_build_status = vim.tbl_add_reverse_lookup { - Success = 0; - Error = 1; - Failure = 2; - Cancelled = 3; -} - -local function buf_build(bufnr) - bufnr = util.validate_bufnr(bufnr) - local params = { textDocument = { uri = vim.uri_from_bufnr(bufnr) } } - lsp.buf_request(bufnr, 'textDocument/build', params, - function(err, _, result, _) - if err then error(tostring(err)) end - print("Build "..texlab_build_status[result.status]) - end) -end - --- bufnr isn't actually required here, but we need a valid buffer in order to --- be able to find the client for buf_request. --- TODO find a client by looking through buffers for a valid client? -local function build_cancel_all(bufnr) - bufnr = util.validate_bufnr(bufnr) - local params = { token = "texlab-build-*" } - lsp.buf_request(bufnr, 'window/progress/cancel', params, function(err, method, result, client_id) - if err then error(tostring(err)) end - print("Cancel result", vim.inspect(result)) - end) -end - -skeleton.texlab = { - default_config = { - cmd = {"texlab"}; - filetypes = {"tex", "bib"}; - root_dir = function() return cwd end; - log_level = lsp.protocol.MessageType.Warning; - settings = { - latex = { - build = { - args = {"-pdf", "-interaction=nonstopmode", "-synctex=1"}; - executable = "latexmk"; - onSave = false; - }; - }; - }; - }; - commands = { - TexlabBuild = { - function() - buf_build(0) - end; - description = "Build the current buffer"; - }; - -- TexlabCancelAllBuilds = { - -- }; - }; - -- on_new_config = function(new_config) end; - -- on_attach = function(client, bufnr) end; - docs = { - description = [[ -https://texlab.netlify.com/ - -A completion engine built from scratch for (la)tex. -]]; - default_config = { - root_dir = "vim's starting directory"; - }; - }; -} - -skeleton.texlab.buf_build = buf_build --- vim:et ts=2 sw=2 |
