From 1135fde6870004356cb6b39edc74f0f33a0bc506 Mon Sep 17 00:00:00 2001 From: William Boman Date: Wed, 9 Mar 2022 23:00:01 +0100 Subject: tests/minimal_debug_init.lua: set omnifunc and customize completeopt --- tests/minimal_debug_init.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/minimal_debug_init.lua') diff --git a/tests/minimal_debug_init.lua b/tests/minimal_debug_init.lua index 31992fbf..cd42ed24 100644 --- a/tests/minimal_debug_init.lua +++ b/tests/minimal_debug_init.lua @@ -6,7 +6,8 @@ local function join_paths(...) return result end -vim.cmd [[set runtimepath=$VIMRUNTIME]] +vim.opt.runtimepath = vim.env.VIMRUNTIME +vim.opt.completeopt = "menu" local temp_dir = vim.loop.os_getenv "TEMP" or "/tmp" @@ -36,12 +37,18 @@ function _G.load_config() -- ================================================== local lsp_installer = require "nvim-lsp-installer" + local function on_attach(client, bufnr) + vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") + end + require("nvim-lsp-installer").settings { log = vim.log.levels.DEBUG, } lsp_installer.on_server_ready(function(server) - server:setup {} + server:setup { + on_attach = on_attach, + } end) -- ================================================== end