add assign types gopls hint too

Wed, 28 Aug 2024 04:44:05 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 28 Aug 2024 04:44:05 -0500
changeset 1178
8993dc4128de
parent 1177
93b5d2db30bc
child 1179
b0a0ba3240b5

add assign types gopls hint too

.config/nvim/lua/plugins/lsp.lua file | annotate | diff | comparison | revisions
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -20,12 +20,14 @@ return {
           require("lspconfig").gopls.setup({
             capabilities = capabilities,
             settings = {
+              -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md
               gopls = {
                 analyses = {
                   unusedvariable = true,
                   useany = true,
                 },
                 hints = {
+                  assignVariableTypes = true,
                   constantValues = true,
                   rangeVariableTypes = true,
                 },

mercurial