Skip to content

kwruntime/vscode-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kwruntime-plugin

Plugin for vscode, atom-ide, or any editor using typescript server, that allows Intellisense for importing from other protocols, no only from files. Made for usage with kwruntime.

Features

Visual Studio Code without plugin enabled:

Without plugin

Visual Studio Code with plugin enabled:

With plugin

You can use intellisense for the same protocols supported by kwruntime

// Of course, kwruntime doesn't have support for `deno` modules
// but this shows how plugin can provide intellisense for http/https urls
import { serve } from "https://deno.land/[email protected]/http/server.ts"

// intelissense for npm:// imports
import axios from 'npm://[email protected]'

// intelissense for github
import * as async from 'github://kwruntime/[email protected]/util/async.ts'
//same as: import * as async from 'gh+/kwruntime/[email protected]/util/async.ts'

// intelissense for gitlab
import {Tmux} from 'gitlab://jamesxt94/tmux@d0e0b805/src/Tmux.ts'

See in action:

http or https npm gitlab

How to use?

  1. Install kwruntime.
  2. Create a tsconfig.json with this content (see the plugins section):
{
	"compilerOptions": {
		"moduleResolution": "node",
		"module": "es2020",
		"target": "esnext",
		"outDir": "out",
		"lib": [
			"es6",
			"dom"
		],
		"esModuleInterop": true,
		"sourceMap": true,
		"paths": {
			"*.ts": "*"
		},
		"plugins": [{ "enableForWorkspaceTypeScriptVersions": true, "name": "kwruntime-plugin" }]
	},
	"exclude": [
		"node_modules",
		".vscode-test"
	]
}
  1. Install this repo as the plugin. In your package.json add dev dependency
"devDepedencies": {
	"typescript": "^4.5.x",
	"kwruntime-plugin": "git://github.com/kwruntime/vscode-plugin"
}
  1. Install the module
  2. If you use vscode make CTRL+SHIFT+P and search "Select Typescript version", and please select the local node_modules installed typescript package.

About

Plugin for vscode, to allow https:// http:// npm:// import intellisense.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors