Skip to content

Language server installation menu #1997

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

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open

Language server installation menu #1997

wants to merge 43 commits into from

Conversation

FastestMolasses
Copy link
Member

Description

A system to allow users to download and manage LSP servers from the settings menu. This utilizes the mason registry to track the language servers.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

@FastestMolasses FastestMolasses added enhancement New feature or request language server Issues or Pull Requests related to language servers. labels Feb 25, 2025
@FastestMolasses FastestMolasses marked this pull request as ready for review March 12, 2025 12:17
@FastestMolasses
Copy link
Member Author

Will need to fix lint errors, but besides that it is ready for review.

@austincondiff
Copy link
Collaborator

Fix those SwiftLint errors plz 😬

austincondiff
austincondiff previously approved these changes Apr 2, 2025
@austincondiff
Copy link
Collaborator

This PR has been around for a while. I don't want it to become stale and out of date. Bring it up to date or resolve these items so we can get this merged when you can. Thanks for the work on this!

thecoolwinter and others added 19 commits May 12, 2025 14:03
Bumps the version number to `0.3.4`
bump build number to 45

Co-authored-by: GitHub Action <[email protected]>
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
### Description

Adding the ability to filter the project navigator by items that have a source control status.

<!--- REQUIRED: Describe what changed in detail -->

<!--- REQUIRED: Tag all related issues (e.g. * #123) -->
<!--- If this PR resolves the issue please specify (e.g. * closes #123) -->
<!--- If this PR addresses multiple issues, these issues must be related to one other -->

<!---
* #ISSUE_NUMBER
-->

### Checklist

<!--- Add things that are not yet implemented above -->

- [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code

### Screenshots

https://github.com/user-attachments/assets/2a5cb5a9-d4f0-42ff-9f61-2a7b3260ee5a
### Description

A quick PR...

If the user doesn't have any custom themes, disable the "Export All Custom Themes...", as it still opens a save panel and lets the user choose a directory even though nothing's going to be saved.

<!--- REQUIRED: Describe what changed in detail -->

### Checklist

- [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [ ] I documented my code

### Screenshots

With no custom themes:
<img width="929" alt="Screenshot 2025-04-14 at 17 54 45" src="https://github.com/user-attachments/assets/2cc76ac1-4980-4baa-9fbd-91f4197cd2e7" />

With custom themes:
<img width="929" alt="Screenshot 2025-04-14 at 17 55 11" src="https://github.com/user-attachments/assets/c884e061-6909-4825-b4b1-903ccf56af4d" />
* Sort alphabetically - Folders on top

* Changed `Button` to `Toggle`
### Description

Fixes a bug where tasks would not save after creating them due to an accidental change when removing a deprecated URL method. Also removes a few unnecessary view models in settings, and correctly handles errors thrown when saving workspace settings in UI (with a simple alert).

### Related Issues

* N/A Reported on [discord](https://discord.com/channels/951544472238444645/952640521812193411/1362011473324540097)

### Checklist

- [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code

### Screenshots
Adds a minimap to CodeEdit's editor, as well as a new trailing editor accessory (that only appears when the selected document is a code document), a command to toggle the minimap, and a setting to toggle the minimap.

* CodeEditApp/CodeEditSourceEditor#33

- [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code

https://github.com/user-attachments/assets/07f21d48-23cf-42dc-b39a-02ba395956cb
### Description

This pull request resolves several navigation related bugs within Settings. The most important being that it resolves getting suck within sub views. Additionally, I've improved how hiding the sidebar toggle works which is now consistently hidden regardless of macOS 13+. It now no longer makes unexpected returns or cameos.

### Related Issues

* closes #1923 

### Checklist

- [X] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [X] The issues this PR addresses are related to each other
- [X] My changes generate no new warnings
- [X] My code builds and runs on my machine
- [X] My changes are all related to the related issue above
- [X] I documented my code

### Screenshots

https://github.com/user-attachments/assets/f92bcc49-b397-4e33-85c5-06d0873e6b10
Adds semantic token syntax highlighting to the code file view.

When an LSP is installed and configured for a language type, and has semantic highlights support, CodeEdit will install a new highlight provider on the source editor and begin processing syntax tokens for the file.

Token processing happens asynchronously, and does **not** replace tree-sitter highlights. This builds off recent work in the source editor to support a hierarchy of highlight providers. Language server highlights are slow but more accurate, so we process them slowly and apply them when they become available.

- Adds a new generic 'language server document' protocol that includes only what the language server code needs to know about a code document. This should solve the coupling issue we had with CodeFileDocument and the language server code. In the future, if we replace `CodeFileDocument`, it'll be a matter of conforming the new type to the protocol for it to work with the lsp code.
- Reorganizes slightly to group lsp features into their own "Features" folder.
- Adds a new `SemanticTokenHighlightProvider` type
  - Conforms to the `HighlightProviding` protocol.
  - Manages receiving edit notifications from the editor and forwards them to the language server service.
- Adds a `SemanticTokenMap` type
  - Maps LSP semantic token data to a format CodeEdit can read.
  - Reads a LSP's capabilities to determine how to decode that data.
- Adds `SemanticTokenStorage`
  - Provides an API for applying token deltas, and entire file token data.
  - Manages decoding, re-decoding (when dealing with deltas) and storing semantic tokens.
  - Provides an API for finding semantic tokens quickly.

* closes #1950

- [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code

![Screenshot 2025-02-14 at 10 20 09 AM](https://github.com/user-attachments/assets/14ee65a3-058c-4f9c-b816-ae258aca96be)

Live editing demo, note the highlights on the variable types and switch cases.

https://github.com/user-attachments/assets/e70bf93c-779d-412b-9b34-c68e46898921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request language server Issues or Pull Requests related to language servers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants