From 5258a448d45f7da4c5e49248083a4d639e268c02 Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Tue, 8 Jul 2025 21:11:38 +0000 Subject: [PATCH 1/3] feat: import more editor things Signed-off-by: moul <94029+moul@users.noreply.github.com> --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 046ffb6..311f653 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,14 @@ It provides a wide variety of [IDE features](doc/features/README.md) to any [LSP ## Editor Setup -`gnopls` is compatible with any editor that supports the Language Server Protocol (LSP). Below are setup instructions for popular editors. +`gnopls` is compatible with any editor that supports the Language Server Protocol (LSP). Below are setup instructions for popular editors, including both LSP and non-LSP configurations. + +### Prerequisites + +For full functionality, ensure you have: +- `gno` command-line tool installed for linting and formatting +- `gnopls` installed: `go install github.com/gnoverse/gnopls@latest` +- `GNOROOT` environment variable set to your gno repository path (required for LSP features) ### Visual Studio Code @@ -21,11 +28,44 @@ There is an unofficial [Visual Studio Code extension](https://marketplace.visual ### Vim/Neovim -#### Prerequisites -- Install `gnopls`: `go install github.com/gnoverse/gnopls@latest` -- Set `GNOROOT` environment variable to your gno repository path +#### Vim Support (without LSP) + +For basic Vim support with syntax highlighting and formatting, add to your `.vimrc`: + +```vim +function! GnoFmt() + 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 syntax=go + autocmd BufWritePost *.gno GnoFmt +augroup END +``` + +To use `gofumpt` instead of `gofmt`, substitute the cexpr line with: +```vim +cexpr system('go run -modfile /misc/devdeps/go.mod mvdan.cc/gofumpt -w ' . expand('%')) +``` + +##### Vim Linting Support + +To integrate GNO linting in Vim, add the following to your `.vimrc`: + +```vim +autocmd FileType gno setlocal makeprg=gno\ tool\ lint\ % +autocmd FileType gno setlocal errorformat=%f:%l:\ %m + +" Optional: Key binding to run :make on the current file +autocmd FileType gno nnoremap :make +``` + +#### Vim Support (with LSP) -#### Using vim-lsp +##### Using vim-lsp Install the [`vim-lsp`](https://github.com/prabirshrestha/vim-lsp) plugin, then add to your `.vimrc`: @@ -68,7 +108,7 @@ augroup lsp_install augroup END ``` -#### Using Neovim built-in LSP +##### Using Neovim built-in LSP For Neovim users, you can use the built-in LSP client. Add to your `init.lua`: From 72873ac01509194110f182016941a4e9960ea3d8 Mon Sep 17 00:00:00 2001 From: Guilhem Fanton <8671905+gfanton@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:08:16 +0100 Subject: [PATCH 2/3] Update README.md Co-authored-by: n0izn0iz --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 311f653..b814a89 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ cexpr system('go run -modfile /misc/devdeps/go.mod mvdan.cc/gofumpt To integrate GNO linting in Vim, add the following to your `.vimrc`: ```vim -autocmd FileType gno setlocal makeprg=gno\ tool\ lint\ % +autocmd FileType gno setlocal makeprg=gno\ lint\ % autocmd FileType gno setlocal errorformat=%f:%l:\ %m " Optional: Key binding to run :make on the current file From 1cf28fbab94d2b19c260b170415fd37101470cf5 Mon Sep 17 00:00:00 2001 From: David <60177543+davd-gzl@users.noreply.github.com> Date: Tue, 14 Apr 2026 21:27:57 +0900 Subject: [PATCH 3/3] docs(readme): official editor plugins section (#42) Co-authored-by: David <60177543+Davphla@users.noreply.github.com> --- README.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index b814a89..e632058 100644 --- a/README.md +++ b/README.md @@ -15,16 +15,21 @@ It provides a wide variety of [IDE features](doc/features/README.md) to any [LSP ### Prerequisites For full functionality, ensure you have: -- `gno` command-line tool installed for linting and formatting +- [`gno`](https://github.com/gnolang/gno) command-line tool installed for linting and formatting - `gnopls` installed: `go install github.com/gnoverse/gnopls@latest` - `GNOROOT` environment variable set to your gno repository path (required for LSP features) +## Official Editor Plugins + ### Visual Studio Code +→ Install the [official extension](https://github.com/gnoverse/vscode-gno) +→ Configure through VS Code settings -There is an unofficial [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=harry-hov.gno) for working with `*.gno` files that includes LSP support. +### Jetbrains IntelliJ IDEA +→ Install the [official plugin](https://github.com/gnoverse/intellij-gno) +→ Follow setup instructions in repository README -1. Install the extension from the VS Code Marketplace -2. The extension will automatically use `gnopls` if it's installed in your PATH +## LSP-Compatible Editor Configurations ### Vim/Neovim @@ -201,13 +206,3 @@ There is a community-developed [Gno Language Server](https://github.com/jdkato/g ### Other Editors If you use `gnopls` with an editor that is not on this list, please send us a PR to add instructions! - -## Installation - -For the most part, you should not need to install or update `gnopls`. Your editor should handle that step for you. - -If you do want to get the latest stable version of `gnopls`, run the following command: - -```sh -go install github.com/gnoverse/gnopls@latest -```