Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(contributing): change instructions for vim, reference gnols #1113

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ Add to your `.vimrc` file:

```vim
function! GnoFmt()
cexpr system('gofmt -e -w ' . expand('%')) "or replace with gofumpt, see below
edit!
cexpr system('gofmt -e -w ' . expand('%')) " or replace with gofumpt, see below
edit!
set syntax=go
endfunction
command! GnoFmt call GnoFmt()
augroup gno_autocmd
autocmd!
autocmd BufNewFile,BufRead *.gno set filetype=go
autocmd BufWritePost *.gno GnoFmt
autocmd!
autocmd BufNewFile,BufRead *.gno set syntax=go
autocmd BufWritePost *.gno GnoFmt
augroup END
```

Expand All @@ -96,6 +97,9 @@ To use *gofumpt* instead of *gofmt*, as hinted in the comment, you may either ha
cexpr system('go run -modfile </path/to/gno>/misc/devdeps/go.mod mvdan.cc/gofumpt -w ' . expand('%'))
```

There is an experimental and unofficial [Gno Language Server](https://github.com/jdkato/gnols)
developed by the community, with an installation guide for Neovim.

#### Emacs Support

1. Install [go-mode.el](https://github.com/dominikh/go-mode.el).
Expand All @@ -105,6 +109,11 @@ cexpr system('go run -modfile </path/to/gno>/misc/devdeps/go.mod mvdan.cc/gofump
(add-to-list 'auto-mode-alist '("\\.gno\\'" . go-mode))
```

#### Sublime Text

There is an experimental and unofficial [Gno Language Server](https://github.com/jdkato/gnols)
developed by the community, with an installation guide for Sublime Text.

### Local Setup

To get started with Gno development, the process is relatively straightforward.
Expand Down