aboutsummaryrefslogtreecommitdiff
path: root/lua/gabrielgio/go.lua
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-14 19:06:50 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-14 19:10:08 +0200
commitfb3c96d50d625db725940625120012c75afc17f6 (patch)
treeac50ce1016f2fbb97ae1a7bf04f75be2559e078d /lua/gabrielgio/go.lua
downloadgabrielgio.lua-fb3c96d50d625db725940625120012c75afc17f6.tar.gz
gabrielgio.lua-fb3c96d50d625db725940625120012c75afc17f6.tar.bz2
gabrielgio.lua-fb3c96d50d625db725940625120012c75afc17f6.zip
feat: Initial commit
Diffstat (limited to 'lua/gabrielgio/go.lua')
-rw-r--r--lua/gabrielgio/go.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/gabrielgio/go.lua b/lua/gabrielgio/go.lua
new file mode 100644
index 0000000..ae442b4
--- /dev/null
+++ b/lua/gabrielgio/go.lua
@@ -0,0 +1,16 @@
+local key = require("gabrielgio.key")
+
+vim.g["go_def_mode"] = "gopls"
+vim.g["go_info_mode"] = "gopls"
+key.nnoremap("<leader>r", ":GoReferrers<cr>")
+key.nnoremap("<leader>a", ":GoAlternate<cr>")
+key.nnoremap("<leader>s", ":GoRename<cr>")
+key.nnoremap("<leader>i", ":GoImplements<cr>")
+key.nnoremap("<leader>o", ":GoIfErr<cr>")
+key.nnoremap("<leader>gs", ":GoDebugStart .<cr>")
+key.nnoremap("<leader>gc", ":GoDebugContinue<cr>")
+key.nnoremap("<leader>gb", ":GoBuild<cr>")
+key.nnoremap("<leader>gr", ":GoDebugRestart<cr>")
+key.nnoremap("<leader>gn", ":GoRun<cr>")
+key.nnoremap("<leader>gt", ":GoTest<cr>")
+key.nnoremap("<leader>ge", ":exec \":GoDebugPrint \".input(\"eval: \")<cr>")