vscode-extension-samples
prism.el
Our great sponsors
vscode-extension-samples | prism.el | |
---|---|---|
35 | 18 | |
8,078 | 270 | |
2.2% | - | |
8.6 | 4.7 | |
6 days ago | 7 months ago | |
TypeScript | Emacs Lisp | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vscode-extension-samples
-
Initializing a Project with Any Git Repository - Code Recycle
changeList: - type: copy from: url: https://github.com/microsoft/vscode-extension-samples.git match: - /l10n-sample output: /l10n-sample to: ./l10n source: git
-
vscode extension debugging with .test.js files
Trying to follow the your first extension. With javascript, I've also tried this on vscode-minimal-example.
-
Creating an OpenAI powered Writing Assistant for VS Code
For my extension I wanted an experience similar to the Hashnode AI Editor, so adding commands to the VS Code command palette was not what I was after. What helped me here was the sample extensions directory on GitHub. Their code-actions sample was exactly what I had in mind (and it targets only the markdown files).
-
VS Code extension debug and TS sources
Unfortunately I've never used the generator when writing extensions :( However, the extension samples do have several examples (like this one) that have a tsconfig.json and a launch.json that should achieve what you want.
-
Help to create a language server
I remember it being difficult to get started. I remember starting by having the autocomplete work with 3 specific words. I think I used this to learn how the lsp works. There are more complicated examples in the root directory https://github.com/microsoft/vscode-extension-samples/tree/main/lsp-sample
-
AI Assisted Blog with Nuxt, GitHub Codespaces & Actions
VSCode CodeActions Sample
-
VSCode-WASM: Implement a first version of a WebShell
Not true of most compilers.
Can you design compilers that can do this? Sure, i was at IBM when we did visualage, which could do this in other ways, though not optimally.
Is it common? Not a chance.
Your claim that increasingly more modern languages have semantic highlighting in real time is simply false - most cannot real time semantic highlight even a 100k file on every keystroke. There are a very small number which can, and it's mostly by luck - they fall down on larger files because they have no incrementality. Meanwhile, this is trivial with tree-sitter for all languages because of it's optimality. If you want to see it in action - turn on semantic highlighting for vscode and type fast - most of the time you will lose syntax highlighting because things can't keep up. see, e.g., https://github.com/microsoft/vscode-extension-samples/issues...
Again, yes, you could make a compiler for every language which supports a mode that does what tree-sitter does. and people could carefully implement parsers/lexers in each of their favorite compilers and languages that support optimal incremental parsing in them. and then pay the cost of integrating 50 language specific ways of transforming these to work with the editor, basically reinventing what tree-sitter already did right. (As per above, the current semantic token and highlighting support does not resolve this).
You seem to really otherwise be complaining that you believe it does always generate correct parsers. Like I said, that seems totally orthogonal to anything about the speed issue, and if that's your real concern, have at it.
-
I made a crate to organize my unit tests with it's own VSCode extension.
After Googling everywhere for how those little gray bastard are called, here's their name : codeLens and are API of VSCode extensions. An excellent example of how to use them is given here. My first codeLens was to open the file. But then I wanted more! Now my extension can create unit tests file when missing, rename them in the filesystem and code, delete them, generate test template, etc...
-
I made a VSCode extension: "markdown-table-rainbow"
Official sample extension (Decorator)
- Is there any way to (relatively easily) create syntax highlighting for my own programming language from ANTLR4 grammar?
prism.el
-
Just showing off how nice lisp can look in prism-mode. Check reply for the config :)
Heh, seriously, though, it's not necessary to use a rainbow of colors. You can use any number of colors and rotate through them. For example, this uses just 3 colors, gradually desaturating them as the depth increases. Since each color is easily distinguished from the other 2, it makes code very readable: https://github.com/alphapapa/prism.el/raw/master/images/parens-0.5.png
- Release v0.3 ยท alphapapa/prism.el (Disperse Lisp forms and other languages into a spectrum of colors by depth -- like rainbow-delimiters, et al, but more powerful)
-
How do I build a syntax highlighter based on S-Expressions?
If you can use tree-sitter, that's obviously a good choice. Alternatively, you can see how I implemented https://github.com/alphapapa/prism.el, which isn't regexp-based, using Emacs's built-in syntax parsing instead.
-
Trying to find a package that colorizes file contents by indentation level.
I did some experimenting with supporting XML directly in https://github.com/alphapapa/prism.el/issues/16. It seems that it's not easily done with existing Emacs SGML-related functions, but I'm guessing that tree-sitter will help a lot in Emacs 29.
-
How to combine highlight-parenthesis with rainbow-delimiters?
It's not exactly what you asked for, but you may also find this useful: https://github.com/alphapapa/prism.el It can highlight parens distinctly too.
-
Change text appearance in buffer
As examples, I can recommend code in https://github.com/alphapapa/highlight-function-calls (simple) and https://github.com/alphapapa/prism.el (more complex).
-
Colorize blocks of LISP
There is also the package prism.el.
-
How to properly font-lock for a custom major-mode aka how to use complex regex?
The best advice I can offer is to carefully and repeatedly study the Elisp manual section on font-lock, and to model on the source code of a similar project. The most I've done with it is in https://github.com/alphapapa/prism.el
-
How We Made Bracket Pair Colorization 10,000x Faster
There is one for emacs. Could be good inspo if someone wanted to make a VSCode version.
-
Screenshot Sunday: What does your Emacs look like today?
You might be interested in https://github.com/alphapapa/prism.el
What are some alternatives?
hy-language-server - Hy Language Server built using Jedhy. works only under Hy1.0a1. For the recent version of Hy, please use https://github.com/sakuraiyuta/hyuga instead.
Bracket-Pair-Colorizer-2 - Bracket Colorizer Extension for VSCode
icomplete-vertical - Global Emacs minor mode to display icomplete candidates vertically
vscode-snippets-ranger - View and edit all of your snippets in one purty place! Yee-haw!!
WebViewFeedback - Feedback and discussions about Microsoft Edge WebView2
rainbow-delimiters - Emacs rainbow delimiters mode
vscode-python - Python extension for Visual Studio Code
vscode-vsce - VS Code Extension Manager
quelpa - Build and install your Emacs Lisp packages on-the-fly directly from source
vscode-javascript-extensions - VS Code extension examples written in in JavaScript
emacs-config - My personal Emacs configuration