commit 3cdb1c571482bda12a6f07a866ac71309561b72c
parent 11a7714801b184df92ae9ad304af01b9f317dcf9
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date: Wed, 27 Jul 2022 19:07:55 +0200
Tidy
Diffstat:
1 file changed, 1 insertion(+), 32 deletions(-)
diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua
@@ -97,37 +97,6 @@ end
local function texlab_attach(client, bufnr)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<Leader>m', '<cmd>TexlabForward<CR>', { noremap = true, silent = true })
- -- HAXX TO BUILD THE MAIN FILE
- local texlab_build_status = vim.tbl_add_reverse_lookup {
- Success = 0,
- Error = 1,
- Failure = 2,
- Cancelled = 3,
- }
-
- local mainbuf = nil
- for _, bid in ipairs(vim.api.nvim_list_bufs()) do
- if vim.api.nvim_buf_is_loaded(bid) and vim.api.nvim_buf_get_option(bid, "filetype") == "tex" then
- mainbuf = bid
- break
- end
- end
- local params = {
- textDocument = { uri = vim.uri_from_bufnr(mainbuf) },
- }
-
- vim.keymap.set('n', '<Leader><CR>', function()
- if client then
- client.request('textDocument/build', params, function(err, result)
- if err then
- error(tostring(err))
- end
- print('Build ' .. texlab_build_status[result.status])
- end, bufnr)
- else
- print 'method textDocument/build is not supported by any servers active on the current buffer'
- end
- end, { buffer = bufnr })
vim.lsp.protocol.SymbolKind = {
'file';
'sec';
@@ -287,7 +256,7 @@ local system_lsps = {
rust_analyzer = {
filetypes = { "rust" },
root_markers = { "Cargo.toml", ".git" },
- cmd = { "rustup", "run", "nightly", "rust-analyzer" },
+ command = { "rustup", "run", "nightly", "rust-analyzer" },
cfg = default_config,
},