wkillerud / some-sass

Improved support for SCSS, Sass indented and SassDoc. Workspace awareness and full support for Sass modules.
https://wkillerud.github.io/some-sass/
60 stars 6 forks source link

Open in browser for Sass modules not working in Sublime Text #256

Open niksy opened 1 month ago

niksy commented 1 month ago

In which editor is this a problem?

Sublime Text

Describe the bug

I don’t know if this is related to Sublime LSP or Some Sass, but clicking on "Open in browser" for Sass modules link doesn’t do anything.

Screenshot 2024-10-07 at 20 09 34

What's the expected result?

Sass module documentation is opened in default browser.

Link to minimal reproducible example

No response

Participation

wkillerud commented 1 month ago

I think this is a Sublime or Sublime LSP issue. Some Sass doesn't provide link information for Sass built-in modules.

Here's an example from VS Code, only the pkg: is a clickable link.

niksy commented 1 month ago

Yeah, seems like it.

Some Sass doesn't provide link information for Sass built-in modules.

Would it make sense to make them clickable and open official Sass documentation?

wkillerud commented 1 month ago

I have had this idea of making a "virtual" file for the built-in modules, kind of like how the TypeScript definitions for JavaScript built-ins work (in VS Code at least). I envision an SCSS file with the module's variable and method names + SassDoc, again similar to type definitions.

Clicking the "sass:math" link in this scenario should, I think, open a virtual file like that at line 1 column 1. We could combine that with hover info for "sass:math", perhaps? And have a link to the Sass docs in the hover info, similar to how hover works on f. ex. math.abs().

JavaScript code navigation. Clicking Object.defineProperty opens the type definitions for Object in general, and defineProperty in particular.