You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing today because. I like Visual Studio Code but I'm willing to be open-minded. I'd like some of the things I like about Vs Code to be ported over to Zed. I hope most of these can be implemented. Especially the language context feature. I would like to talk about the language features concept a lot more than the extensions listed here.
There are many VS Code extensions that I have been using. I think they should be built in.
Auto Close Tag when the user types in a tag the opposite one closes.
Auto Complete Tag when the opening tag is edited the opposing one is edited for you
Better Folding it shows you how many lines are folded.
Highlight Tag when a tag is being edited the tags are highlighted.
Error Lens an extension that shows you errors in the line where it comes from.
Indented Block Highlighting an extension that highlights the line of code block you are in
Paste JSON as Code allows you to paste JSON as code.
Peacock an extension that creates your VS Code with a different color in the sidebar then uses that color for when you are editing the same project.
Image Preview allows you to see an image on the line it's being imported from
Svg Preview image preview for svg's
Better Comments An extension that highlights all of your comments
Todo Highlight An extension that highlights TODO Comments
Path Intellisense an extension that provides auto-complete for paths.
npm Intellisense an extension that provides auto-complete for npm packages
Color Highlight an extension that highlights colors
Import Cost an extension that provides statistics on how much an import costs
Project Manager an extension that allows you to go from one projects to another.
To note npm intellisense only works for npm the same functionality for all packages regardless of package manager or language
Now that I talked about the extensions I want built in. I want to talk about a concept called Language Contexts. There are some languages that need a certain set of keyboard shortcuts. VS Code allows you to change certain keyboard shortcuts depending on language, but this is not a first class thing. The way you would do that is something like this.
Command
Keybinding
When
Toggle Check box
Ctrl+ k
editorIsFocus && editorLangId === "markdown"
As you can see this is very cumbersome and most people don't know this and would never care. The example above is a command that is only activated when A person's focus is in Markdown. In VS Code, I have not found a simple way to escape the focus of the editor at all. I have to tab to a different window that does not have a proper focus, it would be easier to use Esc
But that is not the case here.
A language context solves this problem. It's a UI that makes it's user select a language and allows the user to write shortcuts based on that specific language.
The UI would look something like this
Language Context: HTML
Command
Keybinding
Wrap Tag
Alt + W
Remove Tag
Alt + Delete
Edit Tag
Alt + E
A language context is a set of keyboard shortcuts that are activated only when the editor is focused on a file that is owned by a specific language. The user can escape a context just by pressing Esc that's all. Another thing that could be done is that the user can specify different extensions for each context. The official ones would not be overridden by the user. This concept comes up with Markdown. Which is a language that can be implemented by using many file extensions. There is .mdx and .mdoc. Creating a UI like this allows the user to implement specific commands based on specific languages.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm writing today because. I like Visual Studio Code but I'm willing to be open-minded. I'd like some of the things I like about Vs Code to be ported over to Zed. I hope most of these can be implemented. Especially the language context feature. I would like to talk about the language features concept a lot more than the extensions listed here.
There are many VS Code extensions that I have been using. I think they should be built in.
To note npm intellisense only works for npm the same functionality for all packages regardless of package manager or language
If you want to know more about each extension, go to the Vs Code Marketplace
Now that I talked about the extensions I want built in. I want to talk about a concept called Language Contexts. There are some languages that need a certain set of keyboard shortcuts. VS Code allows you to change certain keyboard shortcuts depending on language, but this is not a first class thing. The way you would do that is something like this.
editorIsFocus && editorLangId === "markdown"
As you can see this is very cumbersome and most people don't know this and would never care. The example above is a command that is only activated when A person's focus is in Markdown. In VS Code, I have not found a simple way to escape the focus of the editor at all. I have to tab to a different window that does not have a proper focus, it would be easier to use Esc
But that is not the case here.
A language context solves this problem. It's a UI that makes it's user select a language and allows the user to write shortcuts based on that specific language.
The UI would look something like this
Language Context: HTML
A language context is a set of keyboard shortcuts that are activated only when the editor is focused on a file that is owned by a specific language. The user can escape a context just by pressing Esc that's all. Another thing that could be done is that the user can specify different extensions for each context. The official ones would not be overridden by the user. This concept comes up with Markdown. Which is a language that can be implemented by using many file extensions. There is
.mdx
and.mdoc
. Creating a UI like this allows the user to implement specific commands based on specific languages.Beta Was this translation helpful? Give feedback.
All reactions