From ac684d83075cd55369a5e32d674be0919e3b1250 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Mon, 25 Mar 2024 00:57:35 +0100 Subject: Dotfiles: Nvim: Add golang config --- dotfiles/nvim/init.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'dotfiles') diff --git a/dotfiles/nvim/init.lua b/dotfiles/nvim/init.lua index 71f62db..dbef092 100644 --- a/dotfiles/nvim/init.lua +++ b/dotfiles/nvim/init.lua @@ -558,7 +558,20 @@ require('lazy').setup({ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { -- clangd = {}, - -- gopls = {}, + gopls = { + settings = { + gopls = { + ["ui.inlayhint.hints"] = { + compositeLiteralFields = true, + constantValues = true, + }, + ["ui.codelenses"] = { + test = true, + generate = true, + }, + }, + }, + }, -- pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs @@ -639,6 +652,7 @@ require('lazy').setup({ -- You can use a sub-list to tell conform to run *until* a formatter -- is found. -- javascript = { { "prettierd", "prettier" } }, + go = { "goimports", "gofmt" }, }, }, }, -- cgit 1.4.1