Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fixes markdown formatting on LSP hover #11253

Merged
merged 4 commits into from
Dec 8, 2023

Conversation

AucaCoyan
Copy link
Contributor

Description

Hi! I was playing around and I fixed the formatting in the LSP hover.
I only tested in VS Code using Windows, if anyone is capable, can you test it on nvim or linux if it works properly? I think markdown shouldn't have any problem

The link of the LSP meta issue just for reference #10941

User-Facing Changes

Now the LSP hovers markdown properly
image

Tests + Formatting

After Submitting

@AucaCoyan AucaCoyan changed the title 🐛 Fixes markdown formatting on hover 🐛 Fixes markdown formatting on LSP hover Dec 6, 2023
@fdncred
Copy link
Collaborator

fdncred commented Dec 6, 2023

Love it!

@p00f
Copy link
Contributor

p00f commented Dec 7, 2023

thanks, this is much better (tested it in emacs)
however, there are still some backslashes:
Screenshot from 2023-12-07 at 11_16_34 008989075
Screenshot from 2023-12-07 at 11_17_04 194418722

@p00f
Copy link
Contributor

p00f commented Dec 7, 2023

@AucaCoyan
Copy link
Contributor Author

Thanks! I will pay extra attention to those details 👍🏼

@AucaCoyan
Copy link
Contributor Author

AucaCoyan commented Dec 7, 2023

let Fixed! It was again some treacherous / miss-escaped char
I also fixed the tests I didn't ran before 😋

@p00f
Copy link
Contributor

p00f commented Dec 7, 2023

thanks, there are three more instances of \\\n in crates/nu-lsp/src/lib.rs, I think they are unneeded too - can you take a look to make sure?

@AucaCoyan
Copy link
Contributor Author

thanks, there are three more instances of \\\n in crates/nu-lsp/src/lib.rs, I think they are unneeded too - can you take a look to make sure?

Will do!
I was just testing the LSP on my machine and it crashes on VS Code. The test go right, but I believe I have broke it.
I'm still brand new to LSPs. Please don't merge yet!

@fdncred fdncred marked this pull request as draft December 7, 2023 12:23
@fdncred
Copy link
Collaborator

fdncred commented Dec 7, 2023

Love the progress we're making here! Nice work! Feel free to make it "Ready for review" when you think it's ready.

@p00f
Copy link
Contributor

p00f commented Dec 7, 2023

seems unlikely, you only changed strings

@p00f
Copy link
Contributor

p00f commented Dec 7, 2023

very cool, the last commit fixes def too

@AucaCoyan AucaCoyan marked this pull request as ready for review December 7, 2023 23:13
@AucaCoyan
Copy link
Contributor Author

I was just testing the LSP on my machine and it crashes on VS Code. The test go right, but I believe I have broke it.

I realized that checking out a previous version that works still have issues, so probably is my VS Code misbehaving than the code going wrong

@fdncred
Copy link
Collaborator

fdncred commented Dec 8, 2023

@AucaCoyan are we ready to go on this? i'd like to land it before the next release on Dec 12th.

@AucaCoyan
Copy link
Contributor Author

Yeee! Ship it 🛥️

@fdncred
Copy link
Collaborator

fdncred commented Dec 8, 2023

Thanks!

@fdncred fdncred merged commit 94b2726 into nushell:main Dec 8, 2023
19 checks passed
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
Hi! I was playing around and I fixed the formatting in the LSP hover. 
I _only tested in VS Code using Windows_, if anyone is capable, can you
test it on nvim or linux if it works properly? I think markdown
shouldn't have any problem

The link of the LSP meta issue just for reference nushell#10941 
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

# User-Facing Changes
Now the LSP hovers markdown properly

![image](https://github.com/nushell/nushell/assets/30557287/7e824331-d9b1-40dd-957f-da77a21e97a2)

<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this pull request Feb 20, 2024
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
Hi! I was playing around and I fixed the formatting in the LSP hover. 
I _only tested in VS Code using Windows_, if anyone is capable, can you
test it on nvim or linux if it works properly? I think markdown
shouldn't have any problem

The link of the LSP meta issue just for reference nushell#10941 
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

# User-Facing Changes
Now the LSP hovers markdown properly

![image](https://github.com/nushell/nushell/assets/30557287/7e824331-d9b1-40dd-957f-da77a21e97a2)

<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
@AucaCoyan AucaCoyan deleted the fix-md-formatting-lsp branch February 29, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants