-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: new custom code editor #147
Merged
lukepistrol
merged 1 commit into
CodeEditApp:main
from
MarcoCarnevali:feature/new-code-editor
Mar 22, 2022
Merged
feat: new custom code editor #147
lukepistrol
merged 1 commit into
CodeEditApp:main
from
MarcoCarnevali:feature/new-code-editor
Mar 22, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MarcoCarnevali
force-pushed
the
feature/new-code-editor
branch
from
March 21, 2022 11:07
d754f21
to
52adc05
Compare
Some views still reference |
MarcoCarnevali
force-pushed
the
feature/new-code-editor
branch
4 times, most recently
from
March 21, 2022 15:44
817d682
to
ffff15d
Compare
Looks good! But it feels a bit slower opening a file and when typing the line-numbers jump around a few pixels Screen.Recording.2022-03-21.at.17.15.15.mov |
MarcoCarnevali
force-pushed
the
feature/new-code-editor
branch
from
March 21, 2022 18:49
ffff15d
to
d62916f
Compare
MarcoCarnevali
force-pushed
the
feature/new-code-editor
branch
from
March 22, 2022 09:57
d62916f
to
e2f6052
Compare
@lukepistrol Thank you for your test! I've updated the code and now it should perform much better! |
MarcoCarnevali
force-pushed
the
feature/new-code-editor
branch
from
March 22, 2022 10:04
e2f6052
to
ff19b7e
Compare
MarcoCarnevali
force-pushed
the
feature/new-code-editor
branch
from
March 22, 2022 16:54
ff19b7e
to
b5f924b
Compare
MarcoCarnevali
changed the title
[WIP] feat: new custom code editor
feat: new custom code editor
Mar 22, 2022
MarcoCarnevali
force-pushed
the
feature/new-code-editor
branch
from
March 22, 2022 16:55
b5f924b
to
5dd87f3
Compare
austincondiff
approved these changes
Mar 22, 2022
lukepistrol
approved these changes
Mar 22, 2022
xinix909
pushed a commit
to xinix909/CodeTransfer
that referenced
this pull request
Sep 7, 2024
<!--- IMPORTANT: If this PR addresses multiple unrelated issues, it will be closed until separated. --> ### Description > This is a near clone of CodeEditApp#147, but git got messed up on that branch. This PR improves that branch anyways. This enables configuration of the behavior when the tab key is pressed. Previously all tabs were converted to spaces and inserted `tabWidth` spaces in place of the tab character. This PR clarifies that the `tabWidth` parameter should be used for the *visual* width of tabs, and adds an `indentOption` parameter that specifies how to handle inserting tab characters. Adds an `IndentOption` enum with two cases for this behavior: - `spaces(count: Int)` - `tab` If `spaces(count: Int)` is specified, the editor will insert the given number of spaces when the tab key is pressed, otherwise the tab character will be kept. ### Related Issues <!--- REQUIRED: Tag all related issues (e.g. * CodeEditApp#123) --> <!--- If this PR resolves the issue please specify (e.g. * closes CodeEditApp#123) --> <!--- If this PR addresses multiple issues, these issues must be related to one other --> * CodeEditApp#80 - Does not close, needs an additional PR for the tab width setting. ### 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://user-images.githubusercontent.com/35942988/228014785-85a20e2e-0465-4767-9d53-b97b4df2e11e.mov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR removed the
CodeEditor
library in favor of a custom solution which is still built around theHighlighterjs
wrapper library. This custom solution let us customise the textview easily. One thing I've done is building aLineGutter
that would count the file lines on the left.This is a Work in progress PR and I would love if someone can pull this and test it a litte bit.
Releated Issue
#36
Checklist (for drafts):
Screenshots (if appropriate):