Updated 7. Contoh Custom Plugins (markdown)

Asep Komarudin 2023-03-05 21:15:34 +07:00
parent a772469c11
commit 945e4f9554

@ -1484,3 +1484,53 @@ return {
``` ```
Sumber : <br> Sumber : <br>
https://github.com/nvim-treesitter/nvim-treesitter-context 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 : <br>
https://github.com/olexsmir/gopher.nvim <br>
https://github.com/leoluz/nvim-dap-go <br>