New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for inlay hints in go files #4357
Comments
This is what I use in my init.el to get inlay hints in go files, maybe it could be of help to what you're trying to do (lsp-register-custom-settings
'(("gopls.hints" ((assignVariableTypes . t)
(compositeLiteralFields . t)
(compositeLiteralTypes . t)
(constantValues . t)
(functionTypeParameters . t)
(parameterNames . t)
(rangeVariableTypes . t))))) Also fyi currently there is a bug in lsp-mode where if you have this set in your early-init.el (setenv "LSP_USE_PLISTS" "true")
(setq lsp-use-plists t) then despite registering the settings with |
I tried implementing this myself but had no luck adding this to the lsp-mode code base but from what I can see from lsp-go.el it's simply adding a
("gopls.hints" lsp-go-hints)
tolsp-register-custom-settings
and a definition similar to:https://github.com/golang/tools/blob/master/gopls/doc/settings.md#inlayhint
Describes the functionality however no matter what I have tried I still get this error after enabling
lsp-inlay-hints-mode
The text was updated successfully, but these errors were encountered: