broadinstitute / wdl-sublime-syntax-highlighter

BSD 3-Clause "New" or "Revised" License
7 stars 5 forks source link

Code commenting doesn't work #16

Open willmclaren opened 6 years ago

willmclaren commented 6 years ago

I'm not 100% sure this is an issue with the syntax highlighter, but if in Sublime Text I use CTRL+/ (or select the equivalent from the menu), it does not toggle the comment status of the current line as expected (as it does for other languages). Neither does `CTRL+SHIFT+/' for a block comment.

I'm using Sublime Text 3.1.1 build 3176 on Windows 10, syntax highlighter installed via Package Control.

msnyder424 commented 3 years ago

This is still an issue. Doesn't seem like this package is being maintained.

dinvlad commented 3 years ago

If you could submit a PR to resolve please!

msnyder424 commented 3 years ago

Did you mean an issue? I tried to edit the WDL.tmLanguage file to add TM_COMMENT_START key and value “# “ but cannot figure out how to do that without getting an error message. Sorry, I have zero experience editing sublime syntax packages.

Thanks!

dinvlad commented 3 years ago

No, I meant a Pull Request here if you have an idea how to fix it :-)

In all fairness, I do agree we don't maintain this much so any fixes really depend on community contributions, at this point ;) So if you could please explore for a little more how to fix it, we'd be happy to merge it!

msnyder424 commented 3 years ago

Well I noticed that wdl.tmPreferences was in a merge from a few years ago. This file appears to have the correct information according to this Stack Exchange post which links to this GitHub file. However, wdl.tmPreferences does not show up when I view the "WDL Syntax" package in the PackageResourceViewer. I installed the "WDL Syntax" package using Sublime Package Control.

I totally understand not having the bandwidth to maintain this package, but sadly I don't have the expertise in Sublime syntax packages in order to do any quality contribution. I hope the breadcrumbs I left here will help someone else fix this issue.

dinvlad commented 3 years ago

FWIW, this value is already set here: https://github.com/broadinstitute/wdl-sublime-syntax-highlighter/blob/b4818fb94e388a2437b8d2611a43c16a37bc8366/wdl.tmPreferences#L17

If this is the correct syntax, do you mean all we have to do is to "include" this file into the published package? I'm having trouble tracing who has access to publish it to Sublime store (as I only managed VS Code part of it..).

However, could you uninstall the published package, and install it from the clone of this repo? I suspect the file will show up then..

msnyder424 commented 3 years ago

Yup, that's the file I was referring to. Cloning this repo gives me the individual files but Sublime requires a *.sublime-package in order to install a syntax. I was able to build the .sublime-package using Package Control. Now ctrl+"/" works to comment lines! This is a working solution, but obviously you still want to push all the files to the Sublime store.

dinvlad commented 3 years ago

Sounds good - I've asked our developers if we can find anyone who could republish it.

Btw, we have greater WDL support in VS Code - it includes not just syntax highlighting, but also jump between tasks etc, so if you're interested I recommend checking it out: https://marketplace.visualstudio.com/items?itemName=broadinstitute.wdl-devtools

Alternatively, there's a way to add this support to Sublime - you'd just need to import our Language Server: https://github.com/broadinstitute/wdl-ide