digitalmars.D.announce - Sublime Text Syntax Definition Rewrite
- Benjamin Schaaf (40/40) Feb 27 2019 Hello all,
- TheGag96 (5/6) Feb 27 2019 Thank you so much for doing this!! Sublime is my all time
- Dmitry (6/10) Feb 27 2019 ...
- Benjamin Schaaf (8/18) Feb 27 2019 3176 was the latest stable build, you'd need to change to the
- Daniel N (3/8) Feb 28 2019 Cool, thank you so much, much appreciated!
- Dmitry (38/43) Feb 28 2019 I was kidding, but not for 100%.
- Benjamin Schaaf (8/21) Feb 28 2019 In terms of search performance this comes from "Highlight
- Dmitry (3/10) Mar 01 2019 Ok, I'll do it when catch it again.
- Guillaume Piolat (3/6) Feb 28 2019 Very much appreciated! Using Sublime everyday.
- Andre Pany (10/17) Feb 28 2019 Great work! There is also the "D Language Server" available
- JN (12/18) Feb 28 2019 Bit off-topic, but:
- Andre Pany (9/27) Feb 28 2019 When I saw pages which misses information about D, I just inform
- Benjamin Schaaf (4/23) Feb 28 2019 We currently don't have any plans for language server support in
- Andrea Fontana (4/10) Feb 28 2019 When the next stable will be released?
- Benjamin Schaaf (3/4) Feb 28 2019 Hopefully soon™, we don't want to commit to any deadline though.
- Benjamin Schaaf (5/9) Mar 13 2019 Good news: Sublime Text 3.2 has just been released, including all
- Andrea Fontana (5/16) Mar 13 2019 Just downloaded and tested on ubuntu.
- Dmitry (4/8) Mar 14 2019 Thank you.
Hello all, I've recently gotten a massive rewrite of the D syntax highlighting merged into the Sublime Text default packages. This has since been deployed in the most recent development version 3192 (license required) and will be shipping with the next stable. Anyone trying Sublime Text has probably noticed the poor D support. Here's a very incomplete list of everything that's been fixed/improved: * Functions, classes, interfaces, enums, structs, unions, templates and aliases are now properly indexed, making GoTo Definition work properly * Function/Template calls are properly marked, making GoTo Reference work properly * Nested comments now work as expected * Shebangs are properly highlighted * Ligatures are now properly supported * `..` no longer highlights as a floating point * Strings are now properly highlighted, including postfixes and delimited strings * Token strings actually highlight tokens now * Attributes, including UDAs, are highlighted properly * Automatic indentation is no longer broken (Typing `} catch...` would re-indent the line) * Arguments are highlighted as actual arguments * Contracts are properly highlighted now You can find the pr here: https://github.com/sublimehq/Packages/pull/1850 If you do find a bug with the syntax highlighting or just something that could be done better please leave a bug report on the repository, I'll be maintaining it for the foreseeable future: https://github.com/sublimehq/Packages/issues If you don't have a license you can still use the new syntax highlighting before the next stable build by cloning the repository and symlinking the `D` folder into your Sublime Text "Packages" directory (Details in the README). You can download Sublime Text here: https://www.sublimetext.com/3 Hope you enjoy! --------------- Full disclosure: I work for Sublime HQ. Though I'd love to, we don't use D internally for anything.
Feb 27 2019
On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf wrote:snipThank you so much for doing this!! Sublime is my all time favorite editor, and I was always unhappy with the wonky syntax support. I'll be grabbing this update ASAP.
Feb 27 2019
On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf wrote:I've recently gotten a massive rewrite of the D syntax...Hope you enjoy! ---------------Thank you! Looking forward to try it (right now it shows 'no update available', build 3176)Though I'd love to, we don't use D internally for anything.Is this the reason why it works extremely slow with big files? :D
Feb 27 2019
On Thursday, 28 February 2019 at 05:37:42 UTC, Dmitry wrote:On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf wrote:3176 was the latest stable build, you'd need to change to the development versions (requires a license) to get more recent updates or you can install the Packages manually.I've recently gotten a massive rewrite of the D syntax...Hope you enjoy! ---------------Thank you! Looking forward to try it (right now it shows 'no update available', build 3176)Is this the reason why it works extremely slow with big files? :DI know you're just taking a fun jab but from personal experience its behaved pretty well with multi-GB files. All the corner cases we're aware of where it does become slow are algorithmic problems where a change in language really wouldn't help :)
Feb 27 2019
On Thursday, 28 February 2019 at 06:54:32 UTC, Benjamin Schaaf wrote:On Thursday, 28 February 2019 at 05:37:42 UTC, Dmitry wrote:Cool, thank you so much, much appreciated!On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf wrote:I've recently gotten a massive rewrite of the D syntax...
Feb 28 2019
On Thursday, 28 February 2019 at 06:54:32 UTC, Benjamin Schaaf wrote:I know you're just taking a fun jab but from personal experience its behaved pretty well with multi-GB files. All the corner cases we're aware of where it does become slow are algorithmic problems where a change in language really wouldn't help :)I was kidding, but not for 100%. If I open 3-10 GB file (log) and then try to find something, it's almost unusable. For example, I pressed Ctrl+F and entered first char. After it, Sublime may become frozen for (just for example, it depends) 40 seconds. Then second char — same. Etc. So, just to open file and find first required record (like '2019-02-28, 08:05:') may take 5 minutes (and again, it depends). As I understand, it's because Sublime tries to find and highlight all same sequences. Any old editor (without such highlighting) works faster. Tried just now. File 6.1 GB. I pressed Ctrl+F and it showed search panel in 26 seconds. I entered '2'. Took 33 seconds. Then second char — '0', 27 seconds. '1' — about 26 seconds. '9' - 26 seconds. So, just to find first '2019' took about 140 seconds. Would be better if it instantly find first record and then 'in background' search all other records. Another example. File 1.5GB. Notepad++ opens it about 8-9 seconds, Sublime opens it about 29-30 seconds. Tried to find '2019', and it took less than a second in N++. Tried to find another record (placed almost of the end of the file). Sublime took about 40 seconds, N++ about 10 seconds. For example, my usercase was like: 1. Open file 2. Find first record of required date 3. Delete all records before 4. Find last record of required date 5. Delete all records after 6. Make actions (usually with 'Filter Lines' plugin, etc). and such things took a lot of time. P.S. 32GB RAM, i9-9900K, GTX1080, Windows 10 P.P.S. Also there are some problems when opened many tabs (6-7 windows, 100+ tabs). Then I can't drag the window to second display. It changes size to minimal possible and I can't catch it (there are only sublime icon + window's icons) P.P.P.S. Sublime is my main/favourite editor and I use both 2 and 3 verisons at the same time (3 is a lot faster than 2).
Feb 28 2019
On Thursday, 28 February 2019 at 11:15:05 UTC, Dmitry wrote:If I open 3-10 GB file (log) and then try to find something, it's almost unusable. For example, I pressed Ctrl+F and entered first char. After it, Sublime may become frozen for (just for example, it depends) 40 seconds. Then second char — same. Etc. So, just to open file and find first required record (like '2019-02-28, 08:05:') may take 5 minutes (and again, it depends). As I understand, it's because Sublime tries to find and highlight all same sequences. Any old editor (without such highlighting) works faster.In terms of search performance this comes from "Highlight matches" being enabled. Turning off that option yields a massive performance increase as we're no longer searching the whole file for every key-press.P.P.S. Also there are some problems when opened many tabs (6-7 windows, 100+ tabs). Then I can't drag the window to second display. It changes size to minimal possible and I can't catch it (there are only sublime icon + window's icons)This sounds like a bug, a bug report on https://github.com/SublimeTextIssues/Core/issues would be much appreciated :)
Feb 28 2019
On Friday, 1 March 2019 at 03:40:32 UTC, Benjamin Schaaf wrote:In terms of search performance this comes from "Highlight matches" being enabled. Turning off that option yields a massive performance increase as we're no longer searching the whole file for every key-press.Not my option because I need highlighting.This sounds like a bug, a bug report on https://github.com/SublimeTextIssues/Core/issues would be much appreciated :)Ok, I'll do it when catch it again.
Mar 01 2019
On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf wrote:Anyone trying Sublime Text has probably noticed the poor D support. Here's a very incomplete list of everything that's been fixed/improved:Very much appreciated! Using Sublime everyday.
Feb 28 2019
On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf wrote:Hello all, I've recently gotten a massive rewrite of the D syntax highlighting merged into the Sublime Text default packages. This has since been deployed in the most recent development version 3192 (license required) and will be shipping with the next stable. [...]Great work! There is also the "D Language Server" available (https://github.com/d-language-server/dls) which can be used to add code completion, linting and formatting. You may check whether you can make direct use of DLS in your plugin without usage of the generic LSP plugin (https://github.com/tomv564/LSP). Kind regards André
Feb 28 2019
On Thursday, 28 February 2019 at 10:11:23 UTC, Andre Pany wrote:Great work! There is also the "D Language Server" available (https://github.com/d-language-server/dls) which can be used to add code completion, linting and formatting. You may check whether you can make direct use of DLS in your plugin without usage of the generic LSP plugin (https://github.com/tomv564/LSP).Bit off-topic, but: "Tested against language servers for javascript, typescript, python, php, java, go, c/c++ (clangd), scala (dotty), julia, rust, reason." This is something I see very often nowadays. Most cross-language projects are including things like julia, rust, go, but D never seems on the radar for people. Many new open-source projects are thinking "should we use C/C++ or go for Go/Rust" rather than "should we use C/C++ or go for Go/Rust/D". This is unfortunate, and I don't know full reason for that, but it's something that's starting to be noticeable.
Feb 28 2019
On Thursday, 28 February 2019 at 10:44:30 UTC, JN wrote:On Thursday, 28 February 2019 at 10:11:23 UTC, Andre Pany wrote:When I saw pages which misses information about D, I just inform them and in many they are kind and add the information about D. I do not have Sublime, if someone can test whether Dls or Serve-D (https://github.com/Pure-D/serve-d) is working fine, then tomv564 could be informed to add the info. Kind regards AndréGreat work! There is also the "D Language Server" available (https://github.com/d-language-server/dls) which can be used to add code completion, linting and formatting. You may check whether you can make direct use of DLS in your plugin without usage of the generic LSP plugin (https://github.com/tomv564/LSP).Bit off-topic, but: "Tested against language servers for javascript, typescript, python, php, java, go, c/c++ (clangd), scala (dotty), julia, rust, reason." This is something I see very often nowadays. Most cross-language projects are including things like julia, rust, go, but D never seems on the radar for people. Many new open-source projects are thinking "should we use C/C++ or go for Go/Rust" rather than "should we use C/C++ or go for Go/Rust/D". This is unfortunate, and I don't know full reason for that, but it's something that's starting to be noticeable.
Feb 28 2019
On Thursday, 28 February 2019 at 10:11:23 UTC, Andre Pany wrote:On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf wrote:We currently don't have any plans for language server support in the default packages. This kind of stuff we usually either put into the core text editor or leave to 3rd party plugin authors.Hello all, I've recently gotten a massive rewrite of the D syntax highlighting merged into the Sublime Text default packages. This has since been deployed in the most recent development version 3192 (license required) and will be shipping with the next stable. [...]Great work! There is also the "D Language Server" available (https://github.com/d-language-server/dls) which can be used to add code completion, linting and formatting. You may check whether you can make direct use of DLS in your plugin without usage of the generic LSP plugin (https://github.com/tomv564/LSP). Kind regards André
Feb 28 2019
On Thursday, 28 February 2019 at 00:30:24 UTC, Benjamin Schaaf wrote:Hello all, I've recently gotten a massive rewrite of the D syntax highlighting merged into the Sublime Text default packages. This has since been deployed in the most recent development version 3192 (license required) and will be shipping with the next stable.When the next stable will be released? Andrea
Feb 28 2019
On Thursday, 28 February 2019 at 11:33:13 UTC, Andrea Fontana wrote:When the next stable will be released?Hopefully soon™, we don't want to commit to any deadline though.
Feb 28 2019
On Friday, 1 March 2019 at 03:44:09 UTC, Benjamin Schaaf wrote:On Thursday, 28 February 2019 at 11:33:13 UTC, Andrea Fontana wrote:Good news: Sublime Text 3.2 has just been released, including all the aforementioned improvements for D. The full list of changes can be seen here: https://www.sublimetext.com/blog/articles/sublime-text-3-point-2When the next stable will be released?Hopefully soon™, we don't want to commit to any deadline though.
Mar 13 2019
On Wednesday, 13 March 2019 at 10:22:15 UTC, Benjamin Schaaf wrote:On Friday, 1 March 2019 at 03:44:09 UTC, Benjamin Schaaf wrote:Just downloaded and tested on ubuntu. Sublime + lsp plugin + dls work fine here. It run smoothly also for big projects apparently. Nice job!On Thursday, 28 February 2019 at 11:33:13 UTC, Andrea Fontana wrote:Good news: Sublime Text 3.2 has just been released, including all the aforementioned improvements for D. The full list of changes can be seen here: https://www.sublimetext.com/blog/articles/sublime-text-3-point-2When the next stable will be released?Hopefully soon™, we don't want to commit to any deadline though.
Mar 13 2019
On Wednesday, 13 March 2019 at 10:22:15 UTC, Benjamin Schaaf wrote:Good news: Sublime Text 3.2 has just been released, including all the aforementioned improvements for D. The full list of changes can be seen here: https://www.sublimetext.com/blog/articles/sublime-text-3-point-2Thank you. Git integration also is very useful.
Mar 14 2019