From 095ad31813cef6ddc978b547afeaca5b9bd9cc79 Mon Sep 17 00:00:00 2001 From: Atao Date: Fri, 12 Jan 2024 19:15:02 +0100 Subject: [PATCH] Nvim + tmux wrong color fixes --- lua/custom/configs/lspconfig.lua | 2 ++ lua/custom/configs/none-ls.lua | 4 ++-- lua/custom/mappings.lua | 2 +- lua/custom/plugins.lua | 17 +++++++++++++++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index ad201eb..b4d38a1 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -22,3 +22,5 @@ lspconfig.gopls.setup{ } } } + +return lspconfig diff --git a/lua/custom/configs/none-ls.lua b/lua/custom/configs/none-ls.lua index b030b62..13ed250 100644 --- a/lua/custom/configs/none-ls.lua +++ b/lua/custom/configs/none-ls.lua @@ -1,4 +1,4 @@ -local none_ls = require("none-ls") +local none_ls = require("null-ls") local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) @@ -18,7 +18,7 @@ local opts = { group = augroup, buffer= bufnr, callback = function() - vim.lsp.buf.form({ bufnr = bufnr}) + vim.lsp.buf.format({bufnr=bufnr}) end, }) end diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 876b95a..b822372 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -3,7 +3,7 @@ local M = {} M.gopher = { plugins = true, n = { - ["gsj"] = { + ["gtj"] = { " GoTagAdd json ", "Add json tag to struct" }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 5d38796..7b68a32 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -22,6 +22,18 @@ local plugins = { return require "custom.configs.none-ls" end, }, + { + "ray-x/go.nvim", + config = function() + require("go").setup() + require("core.utils").load_mappings("gopher") + end, + event = {"CmdlineEnter"}, + ft = {"go", 'gomod'}, + build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries + }, + +--[[ { "olexsmir/gopher.nvim", ft = "go", @@ -31,7 +43,8 @@ local plugins = { end, build = function () vim.cmd [[silent! GoInstallDeps]] - end, - }, + --end, + --}, +--]]-- } return plugins