Yet another console text editor, but with lsp support
!!! Check out my new code editor, red, at https://github.com/red-rs/red. It's like Edgo but rewritten in Rust!

https://github.com/vipmax/edgo/wiki/Features
-
Control + q- quit -
Control + d- duplicate line -
Control + x- cut -
Control + c- copy -
Control + v- paste -
Control + u- undo -
Control + f- find -
Control + f, type prefix, Control + g- global find -
Control + t- files selection tree -
Option + /- comment line -
Control + o- cursor back -
Control + ]- cursor forward -
Control + j- cursor to the top -
Control + k- cursor to the bottom -
Control + l + line number- cursor to the line -
Control + y- lines count report -
Shift + arrow- select text -
Option + right/left- smart horizontal movement by words -
Option + down/up- smart selection -
Control + Shift + down/up- lines swap -
mouse selection- select text -
mouse double click- select word -
mouse triple click- select line -
Control + space- lsp completion -
Control + h- lsp hover -
Control + p- lsp signature help -
Control + g / Control + mouse click- lsp definition -
Control + r / Option + mouse click- lsp references -
Control + e- lsp diagnostic (errors) -
Shift + F6- lsp rename -
Control + w- method extraction
Install Go for MacOS:
brew install go
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc
Clone:
git clone https://github.com/vipmax/edgo && cd edgo
make edgo [filename]
edgo ~/.zshrc
# with no args it will open current directory
edgo
If you like the project, please support it.
https://www.buymeacoffee.com/vipmax/edgo
edgo uses yaml file for configuration.
Set EDGO_CONF env var to conf file path
export EDGO_CONF="/Users/max/apps/go/edgo/config.yaml"edgo supports themes, set it in config file.
- edgo
- edgo-light
- dracula
- darcula
- idea-light
- nord
- monokai
Following lsp features are supported:
- completion
- hover
- signature help
- definition
- references
- rename
- method extraction
- diagnostic
Following languages are supported:
go
go install golang.org/x/tools/gopls@latestpython
pip install -U 'python-lsp-server[all]'javascript/typescript
npm i -g typescript typescript-language-serverhtml
npm i -g vscode-langservers-extractedvue
npm i -g vlsrust
#curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup component add rust-analyzerc/c++
# go to https://clangd.llvm.org/installation.html
clangdjava
# jdtls requires at least Java 17, check also JAVA_HOME must be set
brew install jdtlskotlin
# https://github.com/fwcd/kotlin-language-server
brew install kotlin-language-serverswift
# https://github.com/apple/sourcekit-lsp
xcrunhaskell
# https://haskell-language-server.readthedocs.io/en/latest/installation.html
ghcup install hlszig
npm i -g bash-language-serverd
dub fetch serve-docaml
opam install ocaml-lsp-serverbash
# https://haskell-language-server.readthedocs.io/en/latest/installation.html
brew install zlsEdgo provides a seamless testing experience with the ability to execute tests using a simple button click.
Edgo supports testing functionality using Tree Sitter for go, python, javascript, java.
WIP for other langs
Added Debug first implementation
Debug is working via dap protocol for go (dlv) and python (debugpy)
WIP for other langs
Usage:
control + b- set/delete breakpointcontrol + F11to start debug
In debug mode editing is not allowedc- continue to the next breakpointq- quit debug
- Map
Caps locktoControlbutton, everything will be easier. - Use
Alacrittyas default terminal, it is fast, power efficient end easy to config, usealacritty.tomlas example . - Use
edgoase, add alias to shell environment -alias e="edgo" - Use
tmux. Checkout my.tmux.conf(shift and option keys works) - For
iterm2useNatural text editingpreset atProfiles > Keys > Key Mappings > Presets > Natural text editing > Reset - Do not use iterm2, it uses 3 times more cpu then alacritty
- add bindkey "^[[1;3C" forward-word" and "bindkey "^[[1;3D" backward-word" to .zshrc to enable word moving with option + arrows in terminak

