From be7c10b6f8d8fcc0d67dcfe98916ba5968e87dae Mon Sep 17 00:00:00 2001 From: William Boman Date: Thu, 28 Apr 2022 14:05:26 +0200 Subject: [PATCH] old setup --- a.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 a.lua diff --git a/a.lua b/a.lua new file mode 100644 index 000000000..7ce3e7e09 --- /dev/null +++ b/a.lua @@ -0,0 +1,40 @@ +local lsp_installer = require("nvim-lsp-installer") + +lsp_installer.settings { + ui = { + icons = { + server_installed = "", + server_pending = "", + server_uninstalled = "", + }, + }, +} + +local function on_attach(client, bufnr) + -- set up buffer keymaps, etc. +end + +lsp_installer.on_server_ready(function (server) + local opts = { + on_attach = on_attach + } + + if server.name == "tsserver" then + local tsutils = require "nvim-lsp-ts-utils" + opts.init_options = { hostInfo = "neovim" } + opts.on_attach = function (client, bufnr) + tsutils.setup {} + tsutils.setup_client(client) + end + elseif server.name == "sumneko_lua" then + opts.settings = { + Lua = { + diagnostics = { + globals = { "vim" } + } + } + } + end + + server:setup(opts) +end)