zc he
eb2a91ea7c
fix(lsp): keywords in completion snippets ( #15499 )
...
# Description
Fixes some leftover issues for keyword snippets of #15494
# Tests + Formatting
Adjusted
2025-04-06 08:36:59 -05:00
zc he
a72f94f452
feat(lsp): snippet style completion for commands ( #15494 )
...
# Description
For example: here's what happens after selecting the `if` command from
the completion menu:
<img width="318" alt="image"
src="https://github.com/user-attachments/assets/752a3bae-ce92-4473-bc96-01032d9295aa "
/>
<img width="319" alt="image"
src="https://github.com/user-attachments/assets/c4bf0c25-ec42-4416-b93e-4925a4650e73 "
/>
Missing arguments are inserted as placeholders in a snippet, just as
function name completions in other lsp servers like rust-analyzer and
clangd.
# User-Facing Changes
Press tab to navigate
Flags still need to be added manually
# Tests + Formatting
Refined
# After Submitting
2025-04-05 09:23:27 -05:00
zc he
210c6f1c43
fix(lsp): more accurate PWD: from env -> parent dir of current file ( #15470 )
...
# Description
Some editors like neovim will provide "workspace root" as PWD, which can
mess up file completion results.
# User-Facing Changes
bug fix
# Tests + Formatting
adjusted
# After Submitting
2025-04-05 08:41:34 -05:00
zc he
6c0b65b570
feat(completion): stdlib virtual path completion & exportable completion ( #15270 )
...
# Description
More completions for `use` command.
~Also optimizes the span fix of #15238 to allow changing the text after
the cursor.~
# User-Facing Changes
<img width="299" alt="image"
src="https://github.com/user-attachments/assets/a5c45f46-40e4-4c50-9408-7b147ed11dc4 "
/>
<img width="383" alt="image"
src="https://github.com/user-attachments/assets/fbeec173-511e-4c72-8995-bc1caa3ef0d3 "
/>
# Tests + Formatting
+3
# After Submitting
2025-04-01 07:13:07 -05:00
zc he
81e496673e
refactor(lsp): span fix made easy by bumping lsp-textdocument to 0.4.2 ( #15287 )
...
# Description
The upstream crate fixed a bug of position calc, which made some extra
checking in lsp unnecessary.
Also moved some follow-up fixing of #15238 from #15270 here, as it has
something to do with previous position calc bug.
# User-Facing Changes
# Tests + Formatting
Adjusted
# After Submitting
2025-03-11 06:13:58 -05:00
zc he
49f92e9090
feat(lsp): completion items now respect the append_whitespace
flag ( #15247 )
...
# Description
Append space if marked as required.
Aligned behavior as the REPL completion.
# User-Facing Changes
# Tests + Formatting
Adjusted
# After Submitting
2025-03-05 05:45:27 -06:00
zc he
de7b000505
fix(lsp): completion on command with following text ( #15238 )
...
# Description
Fixes a bug introduced by #15188
# User-Facing Changes
Before:
<img width="216" alt="image"
src="https://github.com/user-attachments/assets/5846a844-d88e-4d9f-b9e2-e2478c7acb37 "
/>
And will crash the lsp server.
After:
<img width="454" alt="image"
src="https://github.com/user-attachments/assets/85e727d6-fef5-426b-818c-e554d3c49c7d "
/>
# Tests + Formatting
adjusted
# After Submitting
2025-03-04 05:33:55 -06:00
zc he
8e1385417e
fix(lsp): completion label descriptions for cell_path and external values ( #15226 )
...
# Description
The type shown in the completion description is 1 level higher than the
actual entry.
Also cleans some TODOs for `SuggetionKind`.
# User-Facing Changes
## Before
<img width="409" alt="image"
src="https://github.com/user-attachments/assets/c7d7df02-aed9-4ea9-892a-0bca707352eb "
/>
<img width="491" alt="image"
src="https://github.com/user-attachments/assets/9b9394d4-62ee-4924-9840-402f00d88a8a "
/>
## After
<img width="425" alt="image"
src="https://github.com/user-attachments/assets/d8f41059-2c68-4902-9c32-d789f91b6d77 "
/>
<img width="425" alt="image"
src="https://github.com/user-attachments/assets/ce03afb9-6c1f-4a65-a1cc-cbba4655abb3 "
/>
# Tests + Formatting
Adjusted accordingly
# After Submitting
2025-03-02 16:17:12 -06:00
zc he
7555743ccc
fix(lsp): completion of commands defined after the cursor ( #15188 )
...
# Description
Completion feature in LSP can't deal with commands defined after the
cursor before this PR.
This PR adds an alternative completion route where text is not truncated
and no extra `a` appended.
This will also ease future implementation of [signature
help](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_signatureHelp ).
# User-Facing Changes
# Tests + Formatting
+6
# After Submitting
2025-03-01 06:21:53 -06:00