3/22/2023 0 Comments Sublime text typescript![]() Having LSP as a plugin allows the best for both ST users and ST devs. So ST would chase after offering the same functionality as VS Code, but then always be a step back. ST devs would shift focus on implementing the LSP spec which is mainly driven by Microsoft and the spec is somewhat driven by VS Code functionality. The speed mostly depends on the speed a language server returns a response to the LSP client. Implementing the LSP client in c++ won't make the user experience faster. ![]() That would mean that the LSP source code would be closed source too and that would not allow other people to contribute to it. I haven't tried any of these, as i'm not really familiar with Sublime or Vim, and it takes some effort to download the TypeScript and test it in emacs with the extension to see just how good is the syntax coloring, or indentation feature, or perhaps other features.Just wanted to share my thoughts on why LSP as an open source plugin has more benefits than getting first class support from ST devs.Ĭons of getting first class support from ST: ![]() And, to create a new lang mode would be trivial, without much programing skill. And, all editors can use this file, a universal standard. Then, we write just 300 lines like the Sublime Text extension, in pure brainless inert format, without thinking, and it would have all features of fancy emacs language modes of 3k or 10k lines. But for short, let's just call it “syntax coloring spec”). Imagine, if there is such a lang spec for the purpose of syntax coloring and programer editor features (the spec would also include info about indentation, keyword completion, and others. (i think it's correct to say, without anyĭoubt, that the emacs lisp is most powerful, by far.)īut, clearly, the emacs lisp one is also the most difficult and time-consuming to write.Ī more interesting question is the ratio of power/“ease of coding” the extension.Īlthough the Sublime and Vim one didn't claim indentation feature, i'm sure the editor does it already (to what degree?). Now, the interesting question is what degree of power each of these 3Įxtension language provides. Of the 3, their README file says they do syntax coloring, except the emacs one, which also claims to do indentation. I recall, about 2 years ago, there were rumors going around social networks that Microsoft is hiring related to emacs. Looking at the code, it seems to be written by elisp expert, not some quick hacked up noob job. ) It's only 1.1k lines, but half of it is list of keywords one on each line.Īt 3.3k lines, it's not a trivial package. (though it's fairly feature-complete, including keyword completion, comment/uncomment, custom keys, doc lookup, GUI menu. My first one, took about 2 months to finish, counting learning time. I have written a few emacs mode for languages. That's 10 times the vim script one, and 25 times the Sublime one. The most interesting one is the emacs one, at 3.3k lines, a very sizable code. But not for the sublime or emacs extension. It's interesting that Microsoft has listed the people who wrote the vim extension: “Credits: Zhao Yi, Claudio Fleiner, Scott Shattuck, Jose Elera Campana”. Now, let's look at the vim extension, 321 lines. Here is the doc about how to define syntax definition in Sublime: (it's a XML file of Mac OS X's format) ![]() Is it some kinda standard format/protocol for specifying syntax highlighting? As far as i know, am not aware of any widely-used standard to specify a language syntax for the purpose of syntax coloring.Īlthough, such standard could easily exist.įor example, at the most basic level, a simple standardized format of list of language's keywords (For example, built-in function names, variables names, constant names, or regex for such, and list of character categories (such as comma, colon, semicolon, brackets, operators, etc)) It seems to me, apparently the easiest is the Sublime Text one. The power of such extension in each editor.The extension language offered/used by each editor.Sublime Text: → XML file of Mac OS X's Property list format, 132 lines.A comparison of 3 extension packages written for editors.ĭownload them at [ Sublime Text, Vi, Emacs: TypeScript enabled! By Olivier Bloch.Īm curious and looked at the code of these extensions.is there a grammar-language to specify syntax coloring and related features for a programer's text editor? What would such language be like? What would it cover? How would it be different from something like BNF or parsing expression grammar?.This page describes these related issues:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |