Qi Xiao
5f1673c6c4
Use go-cmp to report unexpected test results.
...
cmp.Diff panics when comparing a struct that has unexported fields and no String
or Equal method, so change some structs to either export all their fields or
have an Equal method.
This fixes #1136 .
2022-03-11 22:49:32 +00:00
Qi Xiao
7cf4b94c5f
pkg/lsp: Add no-op textDocument/hover.
2022-03-07 14:39:19 +00:00
Qi Xiao
92c7e4b303
pkg/lsp: Support textDocument/completion.
2022-03-07 14:27:26 +00:00
Qi Xiao
effa267007
Add comment for the semantics of SIGTERM on Windows.
2022-03-06 23:48:46 +00:00
moko256
e56fad4817
On Windows, handle SIGTERM and exit immediately when conhost window was closed.
2022-03-06 23:46:25 +00:00
moko256
c8f678d2a5
On Windows, implement sanitize in pkg/cli/term/setup_windows to cleanup console modes that external command changed
2022-03-06 23:33:17 +00:00
Qi Xiao
dc700611cf
Fix "make get" on Windows.
...
- Avoid problems with backslashes by replacing them with slashes.
- Add the .exe extension with go env GOEXE.
Also respect $GOBIN if set.
2022-03-05 13:09:10 +00:00
Qi Xiao
d3a31ae193
Revamp command-line flag doc.
...
- Document all flags, and remove doc for removed flags.
- Update in-code flag descriptions to be more consistent with the markdown doc.
2022-03-03 00:41:39 +00:00
Qi Xiao
979c9a0ebd
Add more links to more website pages, not just ref/command.html.
...
Also remove the IRC channel badge since the IRC bridge is now broken.
2022-03-01 23:30:09 +00:00
Kurtis Rader
24cca36d7b
Document all elvish CLI flags
...
There was a recent question for which the answer was to use the
`-compileonly` flag but the user didn't realize that because there was
no mention on https://elv.sh/ref/command.html . Similarly, other flags,
like `-decpreation-level`, would benefit from more verbiage than shown by
`elvish -help`.
2022-03-01 23:25:22 +00:00
Qi Xiao
78e703ccaa
Update doc for changes in the try syntax.
2022-03-01 21:40:08 +00:00
Qi Xiao
e894ae5f82
Improve the syntax of "try".
...
* Require at least one of "except" or "finally" to be present. This fixes #1424 .
* Rename "except" to "catch". The former will be deprecated from 0.18.0. This
addresses #1497 .
2022-03-01 13:57:00 +00:00
Qi Xiao
8e90bf88e9
Update dependencies.
2022-03-01 01:10:24 +00:00
Qi Xiao
b8f4cb001d
pkg/edit/highlight: Fix highlighting when "except" is followed by a lambda.
...
This fixes #1358 .
2022-03-01 00:57:46 +00:00
Qi Xiao
e58e5a4e56
pkg/edit/complete: Refactor how parse tree is matched.
...
- Introduce nodePath to store the complete path to the leaf node.
- Introduce a nodesMatcher abstraction to do pattern matching on nodePath.
Parse tree matching previously requires deeply nested if statements to walk
multiple levels of the tree and (optionally) check the property of nodes. These
are replaced by a single "if np.match(...)", with a single level of nesting.
2022-02-27 11:56:58 +00:00
Qi Xiao
6efce297b2
Update completer for assignment.
...
- Offer variable names as arguments of "set" or "tmp".
- Stop offering "varname = " at the command head position.
2022-02-27 00:02:10 +00:00
Qi Xiao
1dec1fe06f
website: Mark up keys with the standard <kbd> tag.
2022-02-21 00:38:06 +00:00
Qi Xiao
d7a9d38731
pkg/eval: Remove reference to the now-gone local: scope.
2022-02-20 23:30:47 +00:00
Kurtis Rader
8c9414a0ec
No-daemon build don't panic starting location mode
...
Fixes #1487
2022-02-20 23:27:24 +00:00
Qi Xiao
9185e04b69
Add a tool to check "forbidden" content.
...
Also add a Makefile target and CI task for it.
2022-02-20 23:22:33 +00:00
Qi Xiao
1bf3ea3c1b
Add $unix:rlimits for manipulating resource limits.
...
This fixes #959 .
2022-02-20 23:22:33 +00:00
Qi Xiao
50fff45d87
website: Remove the Libera channel from homepage.
...
The IRC bridge has stopped working. Hopefully it can get fixed eventually, but in the meanwhile don't advertise it.
2022-02-17 17:39:42 +00:00
Qi Xiao
33a04f8dc1
Revamp flag handling in pkg/prog.
...
Instead of putting all possible flags in prog.Flags, flags are now registered by
the individual subprograms. The 3 flags -sock, -db and -json are shared by
multiple subprograms and still handled by the prog package.
This new design allows separating the support for -cpuprofile into a separate
subprogram, which is no longer included by the default entry point, making the
binary slightly smaller. A new entrypoint "withpprof" is created.
Also include the LSP subprogram in the nodaemon entry point.
2022-02-05 14:52:29 +00:00
Qi Xiao
ffeb3ab963
Make the LSP server part of the Elvish binary.
...
Also add tests.
2022-02-05 11:34:14 +00:00
Qi Xiao
c54f13a27a
Fixup for #1466 .
2022-02-05 00:09:08 +00:00
Jan Blackquill
e901919a40
LSP that only supports parsing errors
2022-02-04 22:56:20 +00:00
moko256
2c8bae8496
Update docs in website/ref/edit to use new lambda.
2022-01-30 22:51:42 +00:00
moko256
b1ad6f91f7
Update docs in website/ref/edit to use edit:completion:arg-completer instead of edit:arg-completer.
2022-01-30 22:51:20 +00:00
moko256
f4bc35dbd0
Use src.elv.sh/pkg/rpc
instead of net/rpc
.
2022-01-30 22:49:54 +00:00
Qi Xiao
fda62502ad
pkg/edit: Slighly refactor the handling of nil Store.
2022-01-16 21:18:55 +00:00
Christian Walter
f5b645cc2d
pkg/edit: Don't call AddDir on storedefs if it is not ready
...
Signed-off-by: Christian Walter <christian.walter@9elements.com>
2022-01-16 21:18:05 +00:00
Qi Xiao
71ac79eb57
language.md: Add links in the metacharacters section.
...
Also reformat as a list instead of a table; Markdown tables are unwiedly when
the content gets long.
2022-01-16 18:44:30 +00:00
cherryblossom
a41f190ce3
Update language spec metacharacter table for new lambda syntax
2022-01-16 17:18:42 +00:00
Qi Xiao
89a5df6bc1
Fix cmd/nodaemon/elvish.
...
The Program API was changed, but the daemonStub was not updated accordingly.
2022-01-07 13:50:46 +00:00
Qi Xiao
7d22bb1c28
per/persistent: Update benchmarking results.
...
Also remove disclaimer about API instability since that is now implied by the
0.x version number of the Go module.
2022-01-05 22:44:12 +00:00
Qi Xiao
b2c6e41cb2
Upgrade the script pkg/persistent/add-slowdown.
2022-01-05 22:37:50 +00:00
Qi Xiao
59459793e3
pkg/persistent: Cons -> Conj.
...
Cons was a misnomer for the operation of adding an element at the end of a
vector. Follow Clojure's naming here and call this operation Conj.
2022-01-05 22:34:55 +00:00
Qi Xiao
4fc4ca3cc1
Explicitly say that Elvish doesn't eval rc.elv when running scripts.
2022-01-05 00:52:46 +00:00
Qi Xiao
8ed351e386
Add a new "defer" command.
2022-01-05 00:12:35 +00:00
Qi Xiao
84b72af4ca
Support using styled text in &display to edit:complex-candidate.
...
This fixes #1011 .
2022-01-03 20:30:00 +00:00
Qi Xiao
38d4553833
Update assignment syntax in docs.
...
- Also remove the section for the legacy assignment syntax.
- Also add a paragraph to "eval" about upvalues.
2022-01-03 19:45:39 +00:00
Qi Xiao
29fc9a5fe9
website/Makefile: Prevent removal of intermediate targets.
2022-01-03 17:54:06 +00:00
Qi Xiao
4350ad48b1
Remove highlighting for legacy assignment syntax.
2022-01-03 00:59:48 +00:00
Qi Xiao
2bedb5248b
Update docs in website/learn to use the new assignment syntax.
2022-01-03 00:57:28 +00:00
Qi Xiao
003557c22a
Remove support for the legacy lambda syntax.
...
This fixes #664 .
2022-01-03 00:47:41 +00:00
Qi Xiao
be1e144b45
Remove support for the "local:", "up:" and ":" special namespaces.
...
This fixes #1409 .
2022-01-03 00:47:41 +00:00
Qi Xiao
3dd3b780b9
Remove legacy assignment syntax.
...
This fixes #645 .
2022-01-03 00:47:41 +00:00
Qi Xiao
4fcffc5671
Remove most uses of the legacy assignment syntax.
...
The remaining few uses are in some of the tests, which will be removed later.
This addresses #645 .
2022-01-03 00:47:41 +00:00
Qi Xiao
653c9f9d0f
Remove dir-history, deprecated since 0.17.0.
2022-01-03 00:47:41 +00:00
Qi Xiao
3abf7f5510
Deprecate the legacy temporary assignment syntax from 0.18.0.
...
This addresses #1114 .
2022-01-03 00:47:24 +00:00