nvim-navic
nvim-navic copied to clipboard
No good working in golang
In .go files it shows only functions, so variables in functions not available (I am talking about winbar)
Can you share the output by get_location and get_data and what is missing in them?
get_location
%#NavicIconsMethod# %*%#NavicText#(*APIserver).configureStore%*
get_data (for e in pairs(navic.get_data()) and one more for-loop)
scope table: 0x419abc80
icon
kind 6
type Method
name (*APIserver).configureStore
Maybe the cause of this problem is the same as the https://github.com/SmiteshP/nvim-navic/issues/98.
Yep, it might be issue with is_available function. @RAprogramm Can you try calling is_available explicitly in your winbar config for which ever plugin you are using.
function() return require("nvim-navic").is_available() end
The issue is that the Go LSP (gopls) is providing less context that for example a Lua LSP (which gives too much structure imo). So with Go you only see the function, method or struct but not deeper than one level in nvim-navic.
I think treesitter might be a better fit for this plugin that LSP. Optionally having which types to put in the breadcrumb configurable.
@marcelbeumer Can you give example of code snippet and the information shown vs what information you want to see instead? I am not well versed in golang