mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-07-20 18:54:40 +02:00
Updated 7. Contoh Custom Plugins (markdown)
parent
a772469c11
commit
945e4f9554
1 changed files with 51 additions and 1 deletions
|
@ -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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue