From 945e4f9554b1fc3da4459d13add7383e83ca8610 Mon Sep 17 00:00:00 2001
From: Asep Komarudin <68836805+pojokcodeid@users.noreply.github.com>
Date: Sun, 5 Mar 2023 21:15:34 +0700
Subject: [PATCH] Updated 7. Contoh Custom Plugins (markdown)
---
7.-Contoh-Custom-Plugins.md | 52 ++++++++++++++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/7.-Contoh-Custom-Plugins.md b/7.-Contoh-Custom-Plugins.md
index 6c6e35c..83e4bb9 100644
--- a/7.-Contoh-Custom-Plugins.md
+++ b/7.-Contoh-Custom-Plugins.md
@@ -1483,4 +1483,54 @@ return {
}
```
Sumber :
-https://github.com/nvim-treesitter/nvim-treesitter-context
\ No newline at end of file
+https://github.com/nvim-treesitter/nvim-treesitter-context
+
+# Golang Setupe
+- install treesitter
+```
+:TSInstall go gomod
+```
+- Mason Install
+```
+:MasonInstall gopls golangci-lint-langserver delve goimports gofumpt gomodifytags gotests impl go-debug-adapter
+```
+- but file lua/plugin/golang.lua
+```lua
+return {
+ {
+ "olexsmir/gopher.nvim",
+ config = function()
+ require("gopher").setup({
+ commands = {
+ go = "go",
+ gomodifytags = "gomodifytags",
+ gotests = "gotests",
+ impl = "impl",
+ iferr = "iferr",
+ },
+ })
+ end,
+ },
+ {
+ "leoluz/nvim-dap-go",
+ config = function()
+ require("dap-go").setup()
+ end,
+ },
+}
+```
+- Register LSP pada file lua/custom/default.lua
+```lua
+vim.g.pcode_register_lsp = {
+ "gopls",
+}
+```
+- Config code runner lua/custom/default.lua
+```lua
+vim.g.pcode_coderunner = {
+ go = "go run $fileName",
+}
+```
+summer :
+https://github.com/olexsmir/gopher.nvim
+https://github.com/leoluz/nvim-dap-go