Commit Graph

5890 Commits

Author SHA1 Message Date
Qi Xiao
d48b6f1843 pkg/eval/vals: Replace MakeListFromStrings with a generic MakeListSlice. 2022-06-17 16:50:38 +01:00
Qi Xiao
01756ef57a pkg/daemon: Ignore error when closing connections on shutdown.
The logs are not useful anyway since the reason is invariably that the client
has already closed the connection.

Moreover, timing in the shutdown sequence causes fluctuation in test coverage;
removing this log eliminates the fluctuation.
2022-06-14 21:01:50 +01:00
Qi Xiao
4a6405eeb4 pkg/edit/complete: Improve analysis of variable definitions.
- Remove the sigil from the variable name.

- Recognize function parameters too.
2022-06-14 20:50:57 +01:00
Qi Xiao
be94301004 Symlink vscode/elvish.tmLanguage.json -> syntaxes/elvish.tmLanguage.json. 2022-06-13 23:45:20 +01:00
Qi Xiao
e0ee14ad68 Support completing variables defined in the code being completed. 2022-06-13 23:00:06 +01:00
Qi Xiao
534be70bfb Simplify implementation of variable completion.
There is no need to enumerate namespaces separately, since namespaces are also
variables. The only exceptions are "e:" and "E:", which are handled as special
cases now.
2022-06-13 22:50:44 +01:00
Qi Xiao
6564b14898 Fix crash when completing code with unexpected rune.
This fixes #1530.
2022-06-12 21:39:51 +01:00
Qi Xiao
f3ea882bd2 Warn about files in ~/.elvish instead of the directory itself. 2022-06-12 14:21:57 +01:00
Qi Xiao
14ad776bf4 vscode: Fix syntax highlighting; bump to 0.1.1.
- Don't match "set" within e.g. "set-env".

- Fix the right-hand boundary of keywords such as "except".
2022-06-12 01:23:59 +01:00
Qi Xiao
ae9e6d1565 Fixup for #1531.
- Fix the handling of actual occurrences of U+FFFD.

- Fix an existing bug of QuoteVariableName("$\n").
2022-06-11 21:26:32 +01:00
Kurtis Rader
d0f6858b95 Correctly encode strings with invalid UTF-8
In addition to fixing the encoding bugs standardize on \xNN notation for
bytes rather than \uNNNN; e.g., \x00 rather than \u0000.

Also, update the documentation for double-quoted strings to include the
\e sequence.

Fixes #1528
2022-06-11 20:42:06 +01:00
Qi Xiao
49115dba1d Respect $XDG_* directories on Windows.
This fixes #1481.
2022-06-09 22:48:39 +01:00
Qi Xiao
cb8628bcb6 Print a warning if ~/.elvish exists as a directory.
This addresses #1554.
2022-06-07 23:35:13 +01:00
Qi Xiao
68bce3b4a4 Clarify error message when writing values to port not supporting it.
This fixes #1516.
2022-06-07 20:29:34 +01:00
Qi Xiao
3b2ddaa854 website/get: Remove unreachable Fedora repo.
This fixes #1526.
2022-06-07 20:23:20 +01:00
Qi Xiao
f42c2dda61 Make init value of $f~ actually identical to $nop~.
This fixes #1519.
2022-06-07 20:20:00 +01:00
Qi Xiao
bfd555808f Document that none of (), if and while introduce new scopes.
This addresses #1496.
2022-06-07 00:28:39 +01:00
Qi Xiao
5bf0290741 pkg/cli/term: Support surrogate pairs on Windows.
This fixes #1502.
2022-06-06 23:12:54 +01:00
Qi Xiao
bd3197627a Update vscode/package-lock.json. 2022-06-05 22:46:55 +01:00
Qi Xiao
2c30cf9806 Fix staticcheck errors on Windows. 2022-06-05 22:46:24 +01:00
Qi Xiao
a91935ee93 Document fix of #1448 in 0.19.0 release notes. 2022-06-05 22:39:48 +01:00
Qi Xiao
f043bd33fb Fixup for #1549. 2022-06-05 22:37:52 +01:00
Kurtis Rader
fa704d6ac6 Implement edit:command-abbr
It turns out that the "small word" abbreviation mechanism I added isn't
really what I, or most users, want. What users really want, at least
most of the time, is the Fish shell abbreviation behavior of expanding
an abbreviation only in the command head position.

Resolves #1472
2022-06-05 22:15:07 +01:00
Qi Xiao
8b0c7fdb36 Fix some lint warnings found on Windows. 2022-06-05 22:01:16 +01:00
Qi Xiao
d4dd11a981 pkg/eval/vars: Deexport EnvVariable, use Unset/IsSet via interface 2022-06-05 21:47:51 +01:00
Qi Xiao
26a66284a9 Fixup for #1551. 2022-06-05 16:01:10 +01:00
Tw
d27610b3e4 Fix undefined temporary environment restoring issue
Close #1536

Signed-off-by: Tw <tw19881113@gmail.com>
2022-06-05 15:41:19 +01:00
Qi Xiao
775081b8cc Add tools/pre-push, intended to be used as a Git hook. 2022-06-05 12:44:54 +01:00
Qi Xiao
b24421170a Add VS Code extension. 2022-06-05 12:19:18 +01:00
Qi Xiao
e43968569b More wording changes for the doc for the E: namespace. 2022-06-04 23:52:57 +01:00
Kurtis Rader
aefbe22f94 Improve $E:... documentation
Recent discussions around the fix for b.elv.sh/1448 caused me to notice
that the documentation for $E:... expansion does not explicitly explain
the current behavior. This addresses that shortcoming.
2022-06-04 23:45:28 +01:00
Kurtis Rader
ee309bf1c6 Don't dot import pkg/parse
Qualified imports of pkg/parse outnumber unqualified (66 to 1). Improve
consistency, and clarity, by changing the dot (unqualified) imports of
that package symbols to qualified.
2022-06-04 23:39:19 +01:00
Kurtis Rader
345c5c66dd Don't dot import pkg/ui
Qualified imports of pkg/ui outnumber unqualified (82 to 1). Improve
consistency, and clarity, by changing the dot (unqualified) imports of
that package symbols to qualified.
2022-06-04 23:39:19 +01:00
Kurtis Rader
71cd3835bc Don't dot import pkg/tt
Qualified imports of pkg/tt outnumber unqualified (27 to 24). Improve
consistency, and clarity, by changing the dot (unqualified) imports of
that package symbols to qualified.
2022-06-04 23:39:19 +01:00
Kurtis Rader
f681a73a1d Don't dot import pkg/testutil
Qualified imports of pkg/testutil outnumber unqualified (55 to 7). Improve
consistency, and clarity, by changing the dot (unqualified) imports of
that package symbols to qualified.
2022-06-04 23:39:19 +01:00
Qi Xiao
3a4e7ce1fe pkg/lsp: Populate completionProvider capability.
Needed for conforming clients to start requesting autocompletion.
2022-06-03 20:30:46 +01:00
Kurtis Rader
14321f9e82 Make parse.Source naming more consistent
Fixes #1545
2022-05-29 17:36:29 +01:00
D Anzorge
a24977de39 README: Fix Matrix link 2022-05-22 20:42:49 +01:00
Kurtis Rader
6d8b02456a Remove verbiage that is no longer relevant
Fixes #1517
2022-05-22 20:38:45 +01:00
Kurtis Rader
7bae8f2df7 Correctly handle [..=-1] list indexing
Fixes #1518
2022-05-22 20:38:16 +01:00
Qi Xiao
a57275564b Document relationship between *-env commands and E: namespace. 2022-05-22 20:13:17 +01:00
Qi Xiao
aa6d5a6257 Re-enable staticcheck, and fix issues it found. 2022-05-22 11:57:38 +01:00
Qi Xiao
68c99c99fb Only run check_freshness job for the elves/elvish repo.
Pushes to forks will not trigger website updates.
2022-05-21 13:02:26 +01:00
Qi Xiao
7d8551253a Improve race condition handling of the check_website workflow.
Using cancel-in-progress will cause the workflow to fail, which is not
desirable. Instead, use the GitHub API to fetch the SHA of the latest commit,
and suppress the error from check_binary_checksums if it doesn't match the SHA
of the triggering commit.
2022-05-21 13:01:53 +01:00
Qi Xiao
ddf1ce7402 Pin Go version in the check_website workflow. 2022-05-21 12:03:00 +01:00
Qi Xiao
ac5cb7c8ac Fix the check-rellinks CI task. 2022-05-21 11:45:48 +01:00
Qi Xiao
9f2d5a8680 home.md: Replace Telegram group link.
The group was made private and lost the original invite link.
2022-04-19 11:05:10 +01:00
Qi Xiao
dd3950cec0 Use the new testutil.Set in more places. 2022-04-11 21:55:59 +01:00
Qi Xiao
3a3b8f5700 pkg/edit/complete: Change Complete to take an Evaler.
The PureEvaler abstraction made things unnecessarily complex; it's better to
just create a real Evaler for tests is pretty.

The Evaler has a new ReplaceBuiltin method to make it easier to construct the
expected test result.
2022-04-11 21:39:29 +01:00
Qi Xiao
faebab7001 Small tweaks to check_website. 2022-04-09 22:03:32 +01:00