From 90862fe23a36fc5b85d233c66cec60fb729ddd14 Mon Sep 17 00:00:00 2001 From: RakerZh Date: Sat, 15 Jun 2024 19:48:36 +0800 Subject: [PATCH] update --- lua/modules/completion/backend.lua | 34 +++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/lua/modules/completion/backend.lua b/lua/modules/completion/backend.lua index a48e570..976d014 100644 --- a/lua/modules/completion/backend.lua +++ b/lua/modules/completion/backend.lua @@ -20,6 +20,24 @@ function M._attach(client, _) vim.notify = mynotify end +local client = vim.lsp.start_client({ + name = 'educationlsp', + cmd = { '/Users/rakerzhang/space/educationlsp/main' }, + on_attach = M._attach, +}) + +if not client then + vim.notify('client not in connection') + return +end + +vim.api.nvim_create_autocmd('FileType', { + pattern = 'markdown', + callback = function() + vim.lsp.buf_attach_client(0, client) + end, +}) + lspconfig.gopls.setup({ cmd = { 'gopls', 'serve' }, on_attach = M._attach, @@ -65,14 +83,14 @@ lspconfig.lua_ls.setup({ }, }) -lspconfig.marksman.setup({ - on_attach = M._attach, - capabilities = M.capabilities, - cmd = { - 'marksman', - 'server', - }, -}) +-- lspconfig.marksman.setup({ +-- on_attach = M._attach, +-- capabilities = M.capabilities, +-- cmd = { +-- 'marksman', +-- 'server', +-- }, +-- }) lspconfig.clangd.setup({ on_attach = M._attach,