-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Hello,
i am quite new to nvim but i am having trouble using gd to for example for the definition of a function etc..., what happens is that it behaves like a * and highlights occurrences :

This is my lspconfig
local capabilities = require("plugins.configs.lspconfig").capabilities
local augroup = vim.api.nvim_create_augroup("LspFormatting",{})
local lspconfig = require("lspconfig")
local util = require "lspconfig/util"
lspconfig.gopls.setup {
on_attach = function (client,bufnr)
if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({
group = augroup,
buffer = bufnr,
})
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ bufnr = bufnr })
end,
})
end
end,
capabilities = capabilities,
cmd = {"gopls"},
filetypes = { "go", "gomod", "gowork", "gotmpl" },
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
settings = {
gopls = {
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedparams = true,
},
},
},
}
Any ideas on how i can debug it further ? Thank you
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels