I love the DevdocsOpenCurrent idea but it's too restrictive right now, especially for web development filetypes.
For example, executing DevdocsOpenCurrent in jsx/tsx files opens the React documentation source. However, there are frameworks besides React that use those filetypes (SolidJS, StencilJS, etc). So including other relevant sources would make the command more useful in a lot of cases. A couple other examples off the top of my head:
js filetypes should show dom and node in addition to javascript
scss should show css and possibly sass (open current in scss files doesn't do anything right now)
vue/svelte/astro should also include html, dom, css, tailwindcss, javascript, typescript because all of those concepts are regularly used in the templating filetypes
Solution
A potential solution would be creating a configuration option that maps filetypes to doc sources, so you could do something like this:
Personally, I think the DevdocsOpenCurrent default behavior should be to include all sources that are relevant to the filetype since we have fuzzy finding to filter it down from there. But leaving the defaults as is and adding the new config option would be great too.
Description
I love the
DevdocsOpenCurrent
idea but it's too restrictive right now, especially for web development filetypes.For example, executing
DevdocsOpenCurrent
injsx
/tsx
files opens the React documentation source. However, there are frameworks besides React that use those filetypes (SolidJS, StencilJS, etc). So including other relevant sources would make the command more useful in a lot of cases. A couple other examples off the top of my head:js
filetypes should showdom
andnode
in addition tojavascript
scss
should showcss
and possiblysass
(open current inscss
files doesn't do anything right now)vue
/svelte
/astro
should also includehtml
,dom
,css
,tailwindcss
,javascript
,typescript
because all of those concepts are regularly used in the templating filetypesSolution
A potential solution would be creating a configuration option that maps filetypes to doc sources, so you could do something like this:
Personally, I think the
DevdocsOpenCurrent
default behavior should be to include all sources that are relevant to the filetype since we have fuzzy finding to filter it down from there. But leaving the defaults as is and adding the new config option would be great too.Thanks for making this plugin!