github.com/jmigpin/editor@v1.6.0/README.md (about) 1 # Editor 2 3 Source code editor in pure Go. 4 5  6 7  8 9  10 11  12 13 ## About 14 15 - This is a simple but advanced source code editor 16 - As the editor is being developed, the rules of how the UI interacts will become more well defined. 17 - Primarily developed and tested in Linux. 18 - Works in MS Windows (native or xserver) and MacOS (xserver). 19 20 ## Features 21 22 - Auto-indentation of wrapped lines. 23 - No code coloring (except comments and strings). 24 - Many TextArea utilities: undo/redo, replace, comment, ... 25 - Handles big files. 26 - Start external processes from the toolbar with a click, capturing the output to a row. 27 - Drag and drop files/directories to the editor. 28 - Detects if files opened are changed outside the editor. 29 - Plugin support 30 - examples such as `gotodefinition` and `autocomplete` [below](#plugins). 31 - Golang specific: 32 - Calls goimports if available when saving a .go file. 33 - Clicking on `.go` files identifiers will jump to the identifier definition (needs `gopls`). 34 - Debug utility for go programs (`GoDebug` cmd). 35 - allows to go back and forth in time to consult code values. 36 - Language Server Protocol (LSP) (code analysis): 37 - `-lsproto` cmd line option 38 - basic support for gotodefinition and completion 39 - mostly being tested with `clangd` and `gopls` 40 - Inline complete 41 - code completion by hitting the `tab` key (uses LSP). 42 43 ## Installation 44 45 ### Instalation with git 46 47 Get with `git` the latest from the default master branch: 48 ``` 49 git clone https://github.com/jmigpin/editor 50 ``` 51 Build and run: 52 ``` 53 cd ./editor 54 go build 55 ./editor 56 ``` 57 Windows platform compilation alternatives: 58 ``` 59 go build # shows one console window (will be hidden, but makes a flash) 60 go build -ldflags -H=windowsgui # hides the console window, but cmds will popup consoles 61 go build -tags=xproto # (not native, needs an x11 server to run) 62 ``` 63 64 ### Instalation with go tooling to be used as a library 65 66 ``` 67 go get -u github.com/jmigpin/editor 68 ``` 69 70 Please take care to distinguish between versions and ensure "go get" is actually getting the version you want. 71 72 This project is not using "vX" named directories. So version 3 is not in the directory "v3", nor is it named "*/v3" in imports. Versions are being updated using the same import path. The downside of this is that go websites (ex: pkg.go.dev) don't recognize versions tagged as 3 and above of this project. 73 74 Currently a release will be tagged with two tags that refer to the same version (ex: 3.3.0 and 1.3.3 is the same version). 75 76 Feel free to file an issue if you know of a better solution that doesn't require to use an import path of a directory that might not exist (case of using "vX" import paths). 77 78 ## Usage 79 80 ``` 81 Usage of ./editor: 82 -colortheme string 83 available: light, dark, acme (default "light") 84 -commentscolor int 85 Colorize comments. Can be set to zero to use a percentage of the font color. Ex: 0=auto, 1=Black, 0xff0000=red. 86 -cpuprofile string 87 profile cpu filename 88 -dpi float 89 monitor dots per inch (default 72) 90 -font string 91 font: regular, medium, mono, or a filename (default "regular") 92 -fonthinting string 93 font hinting: none, vertical, full (default "full") 94 -fontsize float 95 (default 12) 96 -lsproto value 97 Language-server-protocol register options. Can be specified multiple times. 98 Format: language,fileExtensions,network{tcp|tcpclient|stdio},command,optional{stderr,nogotoimpl} 99 Format notes: 100 if network is tcp, the command runs in a template with vars: {{.Addr}}. 101 if network is tcpclient, the command should be an ipaddress. 102 Examples: 103 go,.go,stdio,"gopls serve" 104 go,.go,tcp,"gopls serve -listen={{.Addr}}" 105 cpp,".c .h .cpp .hpp .cc",stdio,"clangd" 106 python,.py,stdio,pylsp 107 python,.py,tcpclient,127.0.0.1:9000 108 python,.py,stdio,pylsp,"stderr nogotoimpl" 109 -plugins string 110 comma separated string of plugin filenames 111 -presavehook value 112 Run program before saving a file. Uses stdin/stdout. Can be specified multiple times. By default, a "goimports" entry is auto added if no entry is defined for the "go" language. 113 Format: language,fileExtensions,cmd 114 Examples: 115 go,.go,goimports 116 cpp,".c .h .cpp .hpp",clang-format 117 python,.py,python_formatter 118 -scrollbarleft 119 set scrollbars on the left side (default true) 120 -scrollbarwidth int 121 Textarea scrollbar width in pixels. A value of 0 takes 3/4 of the font size. 122 -sessionname string 123 open existing session 124 -shadows 125 shadow effects on some elements (default true) 126 -sn string 127 open existing session 128 -stringscolor int 129 Colorize strings. Can be set to zero to not colorize. Ex: 0xff0000=red. 130 -tabwidth int 131 (default 8) 132 -usemultikey 133 use multi-key to compose characters (Ex: [multi-key, ~, a] = ã) 134 -version 135 output version and exit 136 -wraplinerune int 137 code for wrap line rune, can be set to zero (default 8592) 138 ``` 139 140 The editor has no configuration file. Use it within a script with your preferences (example `editor.sh`): 141 ``` 142 #!/bin/sh 143 exec ~/path/editor \ 144 --dpi=143 \ 145 --fontsize=9 \ 146 --colortheme=acme \ 147 --commentscolor=0x008b00 \ 148 --stringscolor=0x8b3100 \ 149 --lsproto=go,.go,stdio,"gopls serve" \ 150 --lsproto="cpp,\".c .h .cpp .hpp .cc\",stdio,clangd" \ 151 --presavehook=go,.go,goimports \ 152 --presavehook="cpp,\".c .h .cpp .hpp\",\"clang-format --someoption\"" \ 153 "$@" 154 ``` 155 156 ## Basic Layout 157 158 The editor has a top toolbar and columns. Columns have rows. Rows have a toolbar and a textarea. 159 160 These row toolbars are also textareas where clicking (`buttonRight`) on the text will run that text as a command. 161 162 The row toolbar has a square showing the state of the row. 163 164 ## Toolbar usage examples 165 166 Commands in toolbars are separated by "|" (not to be confused with the shell pipe). If a shell pipe is needed it should be escaped with a backslash. 167 168 All internal commands start with an **Uppercase letter**. Otherwise it tries to run an existent external program. 169 170 Examples: 171 - `~/tmp/subdir/file1.txt | ls` 172 Clicking at `ls` will run `ls` at `~/tmp/subdir` 173 - `~/tmp/subdir/file1.txt | ls -l \| grep fi` 174 Notice how "|" is escaped, allowing to run `ls -l | grep fi` 175 - `~/tmp/subdir/file1.txt` 176 Clicking at `file1.txt` opens a new row to edit the same file. 177 Clicking at `~/tmp` opens a new row located at that directory. 178 - `gorename -offset $edFileOffset -to abc` 179 Usage of external command with active row position as argument. 180 [gorename godoc](https://godoc.org/golang.org/x/tools/cmd/gorename), [go tools](https://github.com/golang/tools). 181 - `guru -scope fmt callers $edFileOffset` 182 Usage of external command with active row position as argument. 183 [guru godoc](https://godoc.org/golang.org/x/tools/cmd/guru), [go tools](https://github.com/golang/tools). 184 - `grep -niIR someword` 185 Grep results with line positions that are clickable. 186 - `xdg-open $edDir` 187 Open favorite external application with active row directory. 188 - `xterm` 189 Open an xterm at the active row directory. 190 - `$font=mono` 191 Use monospaced font in this row textarea (see more at [internal variables](#internal-variables)). 192 193 ## Commands 194 195 *Toolbar commands* 196 197 - `ListSessions`: lists saved sessions 198 - `SaveSession <name>`: save session to ~/.editor_sessions.json 199 - `DeleteSession <name>`: deletes the session from the sessions file 200 - `NewColumn`: opens new column 201 - `NewRow`: opens new empty row located at the active-row directory, or if there is none, the current directory. Useful to run commands in a directory. 202 - `ReopenRow`: reopen a previously closed row 203 - `SaveAllFiles`: saves all files 204 - `ReloadAll`: reloads all filepaths 205 - `ReloadAllFiles`: reloads all filepaths that are files 206 - `ColorTheme`: cycles through available color themes. 207 - `FontTheme`: cycles through available font themes. 208 - `Exit`: exits the program 209 - `Version`: shows editor version in the messages row 210 211 *Row toolbar commands* 212 213 These commands run on a row toolbar, or on the top toolbar with the active-row. 214 215 - `NewFile <name>`: create (and open) new file at the row directory. Fails it the file already exists. 216 - `Save`: save file 217 - `Reload`: reload content 218 - `CloseRow`: close row 219 - `CloseColumn`: closes row column 220 - `Find`: find string (ignores case) 221 - `GotoLine <num>`: goes to line number 222 - `Replace <old> <new>`: replaces old string with new, respects selections 223 - `Stop`: stops current process (external cmd) running in the row 224 - `ListDir [-sub] [-hidden]`: lists directory 225 - `-sub`: lists directory and sub directories 226 - `-hidden`: lists directory including hidden 227 - `MaximizeRow`: maximize row. Will push other rows up/down. 228 - `CopyFilePosition`: output the cursor file position in the format "file:line:col". Useful to get a clickable text with the file position. 229 - `RuneCodes`: output rune codes of the current row text selection. 230 - `FontRunes`: output the current font runes. 231 - `OpenFilemanager`: open the row directory with the preferred external application (usually a filemanager). 232 - `LsprotoCloseAll`: closes all running lsp client/server connections. Next call will auto start again. Useful to stop a misbehaving server that is not responding. 233 - `LsprotoRename <new-name>`: Renames the identifiers under the text cursor using the loaded lsp instance. Uses the row/active-row filename, and the cursor index as the "offset" argument. 234 - `LsprotoCallers`: lists callers of the identifier under the text cursor using the loaded lsp instance. Uses the row/active-row filename, and the cursor index as the "offset" argument. Also known as: call hierarchy incoming calls. 235 - `LsprotoCallees`: lists callees of the identifier under the text cursor using the loaded lsp instance. Uses the row/active-row filename, and the cursor index as the "offset" argument. Also known as: call hierarchy outgoing calls. 236 - `LsprotoReferences`: lists references of the identifier under the text cursor using the loaded lsp instance. Uses the row/active-row filename, and the cursor index as the "offset" argument. 237 - `GoRename [-all] <new-name>`: Renames the identifier under the text cursor. Uses the row/active-row filename, and the cursor index as the "offset" argument. Reloads the calling row at the end if there are no errors. 238 - default: calls `gopls` (limited scope in renaming, but faster). 239 - `-all`: calls `gorename` to rename across packages (slower). 240 - `GoDebug <command> [arguments]`: debugger utility for go programs (more at [commands:godebug](#commands-godebug)) 241 - `GoDebugFind <string>`: find string in current selected annotation. Useful to rewind the annotations to the desired point. 242 243 *Row name at the toolbar (usually the filename)* 244 245 - Clicking on a section of the path of the filename will open a new row with that content. Ex: if a row filename is "/a/b/c.txt" clicking on "/a" will open a new row with that directory listing, while clicking on "/a/b/c.txt" will open another row to edit the same file. 246 247 *Textarea commands* 248 249 - `OpenSession <name>`: opens previously saved session 250 - `<url>`: opens url in preferred application. 251 - `<filename(:number?)(:number?)>`: opens filename, possibly at line/column (usual output from compilers). Check common locations like `$GOROOT` and C include directories. 252 - If text is selected, only the selection will be considered as the filename to open. 253 - `<identifier-in-a-.go-file>`: opens definition of the identifier. Ex: clicking in `Println` on `fmt.Println` will open the file at the line that contains the `Println` function definition. 254 255 ## Commands: GoDebug 256 257 Output of `GoDebug -help`: 258 ``` 259 Usage: 260 GoDebug <command> [arguments] 261 The commands are: 262 run build and run program with godebug data 263 test test packages compiled with godebug data 264 build build binary with godebug data (allows remote debug) 265 connect connect to a binary built with godebug data (allows remote debug) 266 Env variables: 267 GODEBUG_BUILD_FLAGS comma separated flags for build 268 Examples: 269 GoDebug -help 270 GoDebug run -help 271 GoDebug run main.go -arg1 -arg2 272 GoDebug run -dirs=dir1,dir2 -files=f1.go,f2.go main.go -arg1 -arg2 273 GoDebug test -help 274 GoDebug test 275 GoDebug test -run mytest 276 GoDebug build -addr=:8008 main.go 277 GoDebug connect -addr=:8008 278 GoDebug run -env=GODEBUG_BUILD_FLAGS=-tags=xproto main.go 279 ``` 280 281 Output of `GoDebug run -help`: 282 ``` 283 Usage of GoDebug run: 284 -dirs string 285 comma-separated string of directories to annotate 286 -env string 287 string with env variables (ex: "GOOS=os:..."' 288 -files string 289 comma-separated string of files to annotate 290 -syncsend 291 Don't send msgs in chunks (slow). Useful to get msgs before a crash. 292 -toolexec string 293 execute cmd, useful to run a tool with the output file (ex: wine outputfilename) 294 -verbose 295 verbose godebug 296 -work 297 print workdir and don't cleanup on exit 298 ``` 299 300 - Annotate files 301 - By default, the main file will be annotated. Other files/directories can be added with the `-dirs` and `-files` command line options, or by inserting one of the following comments in the code (notice the lack of space after "//"): 302 ``` 303 //godebug:annotateblock 304 //godebug:annotatefile 305 //godebug:annotatepackage 306 //godebug:annotatemodule 307 //godebug:annotateimport # use before an "import" line 308 309 # or specify a target 310 //godebug:annotatefile:<file> # absolute or relative to the current 311 //godebug:annotatepackage:<pkg-path> 312 //godebug:annotatemodule:<pkg-path> # any pkg path inside will annotate all 313 ``` 314 The annotator will detect these comments and annotate accordingly. 315 316 A pkg path can be given to annotatepackage, but beware that pkgs located in $GOROOT are not annotated. Example: 317 ``` 318 //godebug:annotatepackage:golang.org/x/tools/godoc/util 319 ``` 320 Higher level `//godebug:*` comments will override lower ones. 321 To disable annotating for the current code block, insert: 322 ``` 323 //godebug:annotateoff 324 ``` 325 This is helpful to bypass loops that would become too slow with debug messages being sent. Example: 326 ``` 327 //godebug:annotateoff // don't annotate arg "v1" 328 func fn(v1 int){ 329 //godebug:annotateblock // re-enable annotations 330 a:=0 // annotated 331 if a==0{ 332 a++ // annotated 333 //godebug:annotateoff 334 a+=2 // *not* annotated 335 a+=3 // *not* annotated 336 for i:=0; i<10000;i++{ 337 // *not* annotated 338 } 339 } 340 println(a) // annotated, not part of the disabled block 341 } 342 ``` 343 Also, to improve on the `String()` limitation: 344 ``` 345 type myint int 346 func (v myint) String() string { 347 return f1(v) 348 } 349 // would cause endless loop with godebug calling t.String() at arg `v` 350 // but not if it the annotations are off 351 //godebug:annotateoff 352 func fn(v myint) string { 353 return fmt.Sprintf("%d", v) 354 } 355 ``` 356 - Limitations: 357 - `String()` and `Error()` methods are not annotated to avoid endless loops (the annotation would recursively call the method again). 358 - NOTE: The latest annotator annotates String() and Error() at the cost of not calling these methods to produce the debug msgs themselves. So the debug msgs will not show the String() output but simply the content of the variable. This will later be possible to use again with a command line option, with which these methods will then not be annotated to avoid endless loops. 359 - Notes: 360 - Use `esc` key to stop the debug session. Check related shortcuts at the key/buttons shortcuts section. 361 - Supports remote debugging (check help usage with `GoDebug -h`). 362 - The annotated executable pauses if a client is not connected. In other words, it stops sending debug messages until a client connects. 363 - A client can connect/disconnect any number of times, but there can be only one client at a time. 364 - Example usage of setting the env var in a godebug session: 365 ``` 366 GoDebug run -env=GO111MODULE=off main.go 367 ``` 368 The example below builds a binary for windows in another platform, for later remote debug: 369 ``` 370 GoDebug build -env=GOOS=windows -addr=:8008 main.go 371 ... (copy the binary to the target platform and run it) ... 372 GoDebug connect -addr=:8008 373 ``` 374 375 ## Internal variables 376 377 - `~<digit>=path`: Replaces long row filenames with the variable. Ex.: a file named `/a/b/c/d/e.txt` with `~0=/a/b/c` defined in the top toolbar will be shortened to `~0/d/e.txt`. 378 - `$font=<name>[,<size>]`: sets the row textarea font when set on the row toolbar. Useful when using a proportional font in the editor but a monospaced font is desired for a particular program output running in a row. Ex.: `$font=mono`. 379 - `$termFilter`: same as `$terminal=f` 380 - `$terminal={f,k}`: enable terminal features. 381 - `f`: Filter (remove) escape sequences from the output. Currently only the clear display sequence is interpreted in this mode which clears the output (usefull for running programs that want to discard old ouput). 382 - `k`: redirect keyboard input to the running program to enable reading from standard input. Note: typing keys will not be seen in the textarea unless the running program outputs them (exceptions: "\n") . 383 384 ## Environment variables set available to external commands 385 386 - `$edName`: row name. 387 - `$edDir`: row directory. 388 - `$edFileOffset`: filename with offset position from active row cursor. Ex: "filename:#123". 389 - `$edFileLine`: index line from active row cursor (1-based). Ex: "12". 390 - `$edFileWord`: word at index from active row cursor. Ex: "myvar". Usage ex: use `go doc $edFileWord` with cursor at a receiver variable. 391 - `$<name>=<string>`: set custom variable in a row toolbar to be set in the environment when running an external command.<br> 392 Example row toolbar: 393 ``` 394 $myprog="a.out -arg1" 395 $myprog -arg2 | echo a${myprog}b 396 ``` 397 Clicking on `$myprog -arg2` will have the shell run `a.out -arg1 -arg2`.<br> 398 Clicking on `echo a${myprog}b` will result in echoing `aa.out -arg1b`. 399 400 ## Row states 401 402 - background colors: 403 - `blue`: row file has been edited. 404 - `orange`: row file doesn't exist. 405 - dot colors: 406 - `black`: row currently active. There is only one active row. 407 - `red`: row file was edited outside (changed on disk) and doesn't match last known save. Use `Reload` cmd to update. 408 - `blue`: there are other rows with the same filename (2 or more). 409 - `yellow`: there are other rows with the same filename (2 or more). Color will change when the pointer is over one of the rows. 410 411 ## Plugins 412 413 Plugins allow extra functionality to be added to the editor without changing the binary. 414 415 A plugin can be compiled and run with (will output a `*.so`): 416 ``` 417 go build -buildmode=plugin plugin1.go 418 go build -buildmode=plugin plugin2.go 419 editor --plugins plugin1.so,plugin2.so 420 ``` 421 422 Functions that can be implemented by a plugin are (subject to changes - __work-in-progress__ ): 423 ``` 424 func OnLoad(ed *core.Editor) 425 func AutoComplete(ctx context.Context, ed *core.Editor, cfb *ui.ContextFloatBox) (err error, handled bool) // error` is only considered if `handled` is true 426 func ToolbarCmd(ed *core.Editor, erow *core.ERow, part *toolbarparser.Part) bool 427 ``` 428 429 Note that plugins might need to be recompiled everytime there are changes in the libraries provided by the editor. 430 431 Editor events currently implemented (subject to changes - __work-in-progress__ ): 432 ``` 433 PostNewERowEEventId // on erow creation 434 PostFileSaveEEventId // after a file is saved 435 PreRowCloseEEventId // before a row is closed 436 RowStateChangeEEventId // on row state change (duplicate rows also emit). 437 438 ``` 439 440 Plugins located at: `./plugins`. 441 - `gotodefinition_godef.go`: plugin that shows how to override the textarea click action and use godef instead of the default. 442 - `autocomplete_gocode.go`: plugin that shows a context with suggestions for `.go` files (uses gocode). 443 - `rownames.go`: example plugin that shows how to access row names. 444 - `eevents.go`: example plugin on how to access editor events. 445 446 ## Key/button shortcuts 447 448 *Global key/button shortcuts* 449 450 - `esc`: 451 - stop debugging session 452 - close context float box 453 - cancels any cmds running (content,internal,preSaveHooks,...) 454 - `f1`: toggle context float box 455 - triggers call to plugins that implement `AutoComplete` 456 - `esc`: close context float box 457 458 *Column key/button shortcuts* 459 460 - `buttonLeft`: 461 - on left border: drag to move/resize 462 - on square-button: close 463 464 *Row key/button shortcuts* 465 466 - `ctrl`+`s`: save file 467 - `ctrl`+`w`: close row 468 - `ctrl`+`f`: warp pointer to "Find" cmd in row toolbar 469 - `ctrl`+`h`: warp pointer to "Replace" cmd in row toolbar 470 - `ctrl`+`n`: warp pointer to "NewFile" cmd in row toolbar 471 - `buttonLeft` on square-button: close row 472 - on top border (or row square): 473 - `buttonLeft`: drag to move/resize row 474 - `buttonMiddle`: close row 475 - `buttonWheelUp`: adjust row vertical position, pushing other rows up 476 - `buttonWheelDown`: adjust row vertical position, pushing other rows down 477 - Any button/key press: make row active to layout toolbar commands 478 479 *Textarea key/button shortcuts* 480 481 - basic keyboard navigation 482 - `left`: move cursor left 483 - `right`: move cursor right 484 - `up`: move cursor up 485 - `down`: move cursor down 486 - `home`: start of line 487 - `end`: end of line 488 - `delete`: delete current rune 489 - `backspace`: delete previous rune 490 - `pageUp`: page up 491 - `pageDown`: page down 492 - `ctrl`+`left`: jump to previous word start 493 - `ctrl`+`right`: jump to next word end 494 - basic mouse navigation 495 - `buttonLeft`: move cursor to point 496 - drag: selects text - works as copy making it available for paste (primary selection). 497 - double-click: selects word 498 - triple-click: selects line 499 - `shift`+`buttonLeft`: move cursor to point adding to selection 500 - `buttonRight`: move cursor to point + run textarea command 501 - `buttonWheelUp`: scroll up 502 - `buttonWheelDown`: scroll down 503 - `buttonWheelUp` on scrollbar: page up 504 - `buttonWheelDown` on scrollbar: page down 505 - selection 506 - `shift`+`left`: move cursor left adding to selection 507 - `shift`+`right`: move cursor right adding to selection 508 - `shift`+`up`: move cursor up adding to selection 509 - `shift`+`down`: move cursor down adding to selection 510 - `shift`+`home`: start of string adding to selection 511 - `shift`+`end`: end of string adding to selection 512 - `ctrl`+`a`: select all 513 - copy/paste 514 - `ctrl`+`c`: copy to clipboard 515 - `ctrl`+`v`: paste from clipboard 516 - `ctrl`+`x`: cut 517 - `buttonMiddle`: paste from primary 518 - undo/redo 519 - `ctrl`+`z`: undo 520 - `ctrl`+`shift`+`z`: redo 521 - utils 522 - `tab` (if selection is on): insert tab at beginning of lines 523 - `shift`+`tab`: remove tab from beginning of lines 524 - `ctrl`+`k`: remove lines 525 - `ctrl`+`alt`+`up`: move line(s) up 526 - `ctrl`+`alt`+`down`: move line(s) down 527 - `ctrl`+`alt`+`shift`+`down`: duplicate lines 528 - `ctrl`+`d`: comment lines 529 - `ctrl`+`shift`+`d`: uncomment lines 530 - godebug 531 - `ctrl`+`buttonLeft`: select debug step 532 - `ctrl`+`buttonRight`: over a debug step: print the value. 533 - `ctrl`+`buttonRight`+`shift`: over a debug step: print all previous values up to the debug step. 534 - `ctrl`+`buttonWheelUp`: 535 - show previous debug step 536 - over a debug step: show line previous debug step 537 - `ctrl`+`buttonWheelDown`: 538 - show next debug step 539 - over a debug step: show line next debug step 540 - `ctrl`+`f4`: show first debug step 541 - `ctrl`+`f5`: show last debug step 542 - `ctrl`+`f9`: clear all debug steps (clears memory, continues debugging) 543 - `esc`: stop the debug session. 544 - inline complete 545 - `tab`: inline code completion for file extensions registered with LSP. 546 - if the previous rune is not a space, it runs code completion. To force `tab` insertion, press `modkey`+`tab` (ex: `ctrl`, `alt`, ...). 547 - `esc`: stop inline completion. 548 - Changing the cursor position also stops inline completion. 549 550 ## Row placement algorithm 551 552 When a new row is created, it is placed either below the current row (measuring available space), or in a "good position". 553 554 The "good position" measures the available space between all rows, and uses the position with the most space. 555 556 The measuring of space is done as follows: 557 1) if the cursor is visible, measure space after visible cursor to the end of the textarea and use it if not smaller than two lines in height, otherwise use 2) 558 2) about 2/3 of the textarea 559 560 ## Notes 561 562 - Notable projects that inspired many features: 563 - Oberon OS: https://www.youtube.com/watch?v=UTIJaKO0iqU 564 - Acme editor: https://www.youtube.com/watch?v=dP1xVpMPn8M 565 566 ## Releases 567 - 2022/12/12: v3.6.0 (36 commits) 568 - improved parsing (several tests of simple parsers to lrparsers) 569 - unified some internal code that had more then one implementation 570 - lsproto: added "nogotoimpl" cmd line option (don't go to implementation) 571 - lsproto: sort results for some commands 572 - crash fixes 573 - 2022/07/26: v3.5.0 (1 commits) 574 - update "golang.org/x/sys" dependency (and others) due to security advisory https://deps.dev/advisory/osv/GO-2022-0493 575 - 2022/06/27: v3.4.0 (11 commits) 576 - lsproto: fix text sync 577 - lsproto: internal cmd lsprotoreferences 578 - godebug: fix a lockup 579 - add extra flags to the "Find" cmd 580 - other small fixes/improvements. 581 - 2022/06/13: v3.3.0 (52 commits) 582 - godebug: new improved annotator, as well as a new implementation using overlays that takes advantage of the go cache to speed up compiling. 583 - lsproto: goto implementation 584 - lsproto: callers and callees 585 - lsproto: improved response speed 586 - many other bug fixes and improvements 587 - note: v3.2.0 was bypassed and not released 588 - 2021/07/27: v3.1.0 (40 commits) 589 - Support for go 1.16 default modules mode 590 - Version cmd line option 591 - Many godebug fixes. 592 - Other minor fixes. 593 - 2020/10/21: v3.0.0 (11 commits) 594 - Changed directory structure (no vX dir for version). 595 - Reduce dependencies. 596 - Fix lsproto tests. 597 - Other minor fixes. 598 - 2020/05/06: v2.0.7 (23 commits) 599 - fixes towards making the project go-getable with v2. 600 - 2020/05/05: v2.0.1 (3 commits) 601 - terminal output bug fix (overwrites). 602 - 2020/05/01: v2.0.0 (92 commits) 603 - Internal API changes/improvements 604 - Improvements on godebug stability and added features 605 - Improvements on lsproto stability 606 - Performance improvements 607 - Many bug fixes. 608 - 2020/02/22: v1.1.1 (9 commits) 609 - lsproto: critial bug fix (#36). 610 - windows: critical bug fix (#37). 611 - other small bug fixes 612 - 2020/02/19: v1.1.0 (133 commits) 613 - godebug: adds "//godebug:*" comment directives. Go modules support improved. 614 - inline `tab` complete 615 - windows: support case-insensitive filesystem 616 - windows: drag and drop improvements. 617 - many bug fixes and overall improvements on stability. 618 - 2019/12/28: v1.0.0 (1049 commits) 619 - first tagged release 620 - drawer improvements (handle big files) 621 - fs watcher for changed files 622 - language server protocol (go to definition, completion, ...) 623 - plugins 624 - unix: drag and drop 625 - 2016/10/11: 626 - development start