diagnosticDelay and watchedFileDelay update for gopls (0.7.1)

neovim_0_5
ray-x 3 years ago
parent ef995eeb7e
commit 4ff9aa47a3

@ -109,9 +109,8 @@ local setups = {
completeUnimported = true,
staticcheck = true,
matcher = "fuzzy",
experimentalDiagnosticsDelay = "500ms",
-- diagnosticsDelay = "500ms",
-- experimentalWatchedFileDelay = "100ms",
diagnosticsDelay = "500ms",
experimentalWatchedFileDelay = "100ms",
symbolMatcher = "fuzzy",
gofumpt = false, -- true, -- turn on for new repos, gofmpt is good but also create code turmoils
buildFlags = {"-tags", "integration"}

@ -4,14 +4,11 @@ local lsphelper = require "navigator.lspwrapper"
local gui = require "navigator.gui"
local lsp = require "navigator.lspwrapper"
local trace = require"navigator.util".trace
-- local log = util.log
-- local partial = util.partial
-- local cwd = vim.fn.getcwd(0)
-- local lsphelper = require "navigator.lspwrapper"
local locations_to_items = lsphelper.locations_to_items
-- vim.api.nvim_set_option("navtator_options", {width = 90, height = 60, location = require "navigator.location".center})
-- local options = vim.g.navtator_options or {width = 60, height = 40, location = location.center}
local function ref_hdlr(err, api, locations, num, bufnr)
local opts = {}
-- log("arg1", arg1)
@ -53,8 +50,8 @@ end
local async_reference_request = function()
local ref_params = vim.lsp.util.make_position_params()
ref_params.context = {includeDeclaration = true}
lsp.call_async("textDocument/references", ref_params, ref_hdlr) -- return asyncresult, canceller
-- lsp.call_async("textDocument/definition", ref_params, ref_hdlr) -- return asyncresult, canceller
-- lsp.call_async("textDocument/references", ref_params, ref_hdlr) -- return asyncresult, canceller
lsp.call_async("textDocument/definition", ref_params, ref_hdlr) -- return asyncresult, canceller
end
return {reference_handler = ref_hdlr, show_reference = async_reference_request}

Loading…
Cancel
Save