Giter VIP home page Giter VIP logo

atom-ide-deno's Introduction

Works

  • fast favicon:コピペで設定完了する絵文字faviconジェネレーター。
  • atom-ide-deno:Denoユーザー向けのAtom Editor拡張機能。1400回ダウンロードされたらしいです。
  • ts-serve:TypeScriptのビルド付きサーバー。TypeScriptがブラウザで動く。
  • jsonlines:1行JSONをストリーミングするライブラリ。ブラウザ / Deno / Node.jsで動作します。
  • mock-file:DenoのファイルシステムAPIのポリフィル。deno deployなどのAPIが制限された環境下で役立ちます。
  • flaky_test:テストのフレークネス(不安定)に対処するためのDeno向けライブラリです。
  • 103 Early Hints:Denoのサーバーで103 Early Hintsを出すサーバー実装

Language and Tools

HTML / CSS 7year 個人開発でWebサイトを運営しています。
JavaScript 5year Webサイト構築やライブラリ作成に日常的に使用しています。
TypeScript 2year Webサイト構築やライブラリ作成に日常的に使用しています。
PHP 4year 一部のWebサイトのバックエンド構築に利用していました。
Python 4year 大学/大学院での研究やデスクトップアプリケーション開発に利用しています。
MySQL / SQLite 4year Webサイト構築の際にデータベースとしてに利用しています。
GitHub Actions 2year テスト自動化やビルド・リリースに使用。
Markdown 2year これを書いています。

JavaScript runtime

🦕Deno 2year
  • v1.5リリース時から使っています。
  • Deno向けライブラリを複数公開しています。
  • Denoの開発にOSSコントリビューターとして参加しています。
🦕deno deploy 1year 初期リリース時から使っています。
Node.js 2year Atom Editor向け拡張機能(パッケージ)開発に利用しています。

OSS contribute


Blog post

atom-ide-deno's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

atom-ide-deno's Issues

Workaround for "deno:/" URL

There is a problem handling the "deno: /" URL. It is difficult to fix everywhere because it is mistakenly treated as a relative path everywhere. I think it's easiest to intervene in json-rpc and rewrite it to a URL like "$$deno$$://".
image

Cannot import using URL or import map

Hello!

I can't import some typescript module using URL (for example: import { gray, blue, yellow, red, bold } from 'https://deno.land/std/fmt/colors.ts') or can't use import map as shown below in screencast.

Screencast:

2021-02-21.19-30-40.mp4

Will it be implemented or I am missing something?

Thanks!

Cannot find name 'Deno'

Hello!

I have an issue with Deno. There is errors that Cannot find name 'Deno' and it has type any.

Screencast

2021-02-21.19-45-12.mp4

Will it be implemented or I am missing something?

Thanks!

tried using typescript-deno-plugin

I noticed that typescript-deno-plugin should work with Atom Editor as well.
I've tried this, but I'm getting errors with namespaces, path resolution, etc.
I didn't know how to make this work, but I left this comment for your records.

ref: https://github.com/denoland/vscode_deno/tree/main/typescript-deno-plugin
ref: https://github.com/justjavac/typescript-deno-plugin

npm install --save-dev typescript-deno-plugin

tsconfig.json

{
  "compilerOptions": {
    "plugins": [
      {
        "name": "typescript-deno-plugin",
        "enable": true
      }
    ],
    "allowJs": true,
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "inlineSourceMap": true,
    "isolatedModules": true,
    "jsx": "react",
    "lib": ["deno.window"],
    "module": "esnext",
    "strict": true,
    "target": "esnext",
    "useDefineForClassFields": true
  }
}

roadmap, todo list

この拡張機能で実装を検討している機能のリスト

  • 設定画面からのパッケージの有効化/無効化
  • ファイル名に基づいたパッケージの有効化/無効化
  • node.js拡張との共存)
  • 保存時にコードをフォーマットする。設定画面からのその機能の有効化/無効化 Deno lsp側で実装されました
  • コマンドのGUI操作
  • カスタムリクエスト(https://github.com/denoland/deno/tree/main/cli/lsp に記載されているもの)
  • vscode拡張で利用できる何か

これらの実装作業は現在行われていません…。
コメントでリクエストがあれば、実装作業を開始したいと思います。

Coexistence with Node.js package

(Originally posted on #47, but since it has become longer, I will organize it and repost it.)

Currently, when I install atom-typescript and atom-ide-deno, I get duplicate diagnostic messages.

It is necessary to consider coexistence with existing Node.js packages (prettier-atom, linter-eslint, atom-typescript).
image

Currently, we have no choice but to enable / disable each package, but I would like to allow users to configure settings for each project or folder.

  1. Settings for each window

    Makes deno code editable in one window and Node.js code editable in the other window.

  2. Settings for each folder

    In one window, makes deno code editable in one folder and Node.js code editable in the other folder.

There are several ideas about how to do this.

  1. Configuration file for Atom IDE package

    Create a configuration file for each folder that corresponds to the Language Server workspace configuration request. It's like .vscode/settings.json.

  2. Use the project-config package

    This is available for window-by-window settings. We need to add a setting like " enable ": true to each package to control enable / disable from the settings.

{
"atom-ide-deno": { "enable": true },
"atom-tyescript": { "enable": true },
"liter-eslint": { "enable": true },
"prettier-atom": { "enable": true },
}
  1. Use an existing configuration file

    • eslint: "Enable if eslintrc exists" setting
    • prettier: "Enable if prettierrc exists" setting
    • atom-typescript: "Enable if package.json / node_modules exists" setting
    • atom-ide-deno: "Enable otherwise" setting

Anyway, we need consensus from the people who manage the IDE packages.

innstall error

install failed with this message

$ apm --version
apm  2.4.2
npm  6.2.0
node 10.2.1 x64
atom 1.40.0
python 2.7.5
git 1.8.3.1
$ atom --version
Atom    : 1.40.0
Electron: 3.1.10
Chrome  : 66.0.3359.181
Node    : 10.2.0
[email protected] install /tmp/apm-install-dir-121312-24009-1nj9vwb.h24i/node_modules/atom-ide-deno/node_modules/zadeh
> node-gyp-build

make: ディレクトリ `/tmp/apm-install-dir-121312-24009-1nj9vwb.h24i/node_modules/atom-ide-deno/node_modules/zadeh/build' に入ります
  CXX(target) Release/obj.target/zadeh/src/binding/node.o
make: ディレクトリ `/tmp/apm-install-dir-121312-24009-1nj9vwb.h24i/node_modules/atom-ide-deno/node_modules/zadeh/build' から出ます

g++: エラー: unrecognized command line option ‘-std=c++17’
make: *** [Release/obj.target/zadeh/src/binding/node.o] エラー 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 3.10.0-1160.21.1.el7.x86_64
gyp ERR! command "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-121312-24009-1nj9vwb.h24i/node_modules/atom-ide-deno/node_modules/zadeh
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-121312-24009-1nj9vwb.h24i/package.json'
npm WARN apm-install-dir-121312-24009-1nj9vwb.h24i No description
npm WARN apm-install-dir-121312-24009-1nj9vwb.h24i No repository field.
npm WARN apm-install-dir-121312-24009-1nj9vwb.h24i No README data
npm WARN apm-install-dir-121312-24009-1nj9vwb.h24i No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/<<user name>>/.atom/.apm/_logs/2021-04-12T08_32_01_723Z-debug.log

Auto format option in package settings

Hello,

I am really happy to see first atom deno package.

But I found auto-formating code very annoying. Can enabling / disabling of this feature be implemented?

Can I also have contact to you? We maybe can discuss something about this package functionality.

Roman

Failed to activate the atom-ide-deno package

Occurs when developing locally.
Tracked at atom/atom#22455

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.57.0 x64
Electron: 9.4.4
OS: Unknown Windows version
Thrown From: atom-ide-deno package 1.8.0

Stack Trace

Failed to activate the atom-ide-deno package

At ENOENT, node_modules\typescript\lib\lib.d.ts not found in C:\Users\azusa\AppData\Local\atom\app-1.57.0\resources\app.asar

Error: ENOENT, node_modules\typescript\lib\lib.d.ts not found in C:\Users\azusa\AppData\Local\atom\app-1.57.0\resources\app.asar
    at createError (electron/js2c/asar.js:111:17)
    at Object.fs.readFileSync (electron/js2c/asar.js:548:24)
    at TypeScriptSimple.createService (/app.asar/node_modules/typescript-simple/index.js:79:61)
    at TypeScriptSimple.compile (/app.asar/node_modules/typescript-simple/index.js:63:37)
    at Object.e.compile (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:582100)
    at Object.compile (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:577878)
    at compileFileAtPath (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:150953)
    at Object.value [as .ts] (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:153351)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:149153)
    at Object.<anonymous> (call-hierarchy-adapter.ts:2:1)
    at Object.<anonymous> (call-hierarchy-adapter.ts:310:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:149837)
    at Object.value [as .ts] (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:153385)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:149153)
    at Object.<anonymous> (main.ts:27:1)
    at Object.<anonymous> (main.ts:469:2)
    at Module.get_Module._compile (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:149837)
    at Object.value [as .ts] (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:153385)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)

Commands

Non-Core Packages

atom-html-preview 0.2.6 
atom-ide-base 3.1.0 
atom-ide-call-hierarchy 0.0.0 
atom-ide-datatip 0.25.0 
atom-ide-definitions 0.4.1 
atom-ide-deno 1.8.0 
atom-ide-hyperclick 1.0.11 
atom-ide-javascript 1.5.0 
atom-ide-markdown-service 2.1.0 
atom-ide-outline 2.3.4 
atom-ide-signature-help 0.16.0 
atom-ide-ui 0.13.0 
atom-runner 2.7.1 
atom-typescript 14.3.1 
atomic-terminal 1.1.4 
auto-encoding 0.7.2 
autocomplete-paths undefined 
busy-signal 2.0.1 
css-color-name 0.4.0 
docblockr 0.13.7 
export-html 3.1.0 
file-icons 2.1.47 
highlight-selected 0.17.0 
ide-rust 1.0.0 
indent-guide-improved 1.4.13 
intentions 2.1.1 
japanese-menu 1.15.0 
javascript-drag-import 0.1.13 
json-colorer 1.0.0 
language-latex 1.2.0 
latex 0.50.2 
latexer 0.3.0 
linter 3.4.0 
linter-eslint 8.6.6 
linter-ui-default 3.3.1 
minimap 4.39.14 
pdf-view 0.73.0 
pear-dark-syntax 1.0.9 
pear-syntax 0.1.8 
pigments 0.40.6 
prettier-atom 0.60.1 
pretty-json 2.1.2 
print-atom 0.1.1 
tango-syntax 0.5.0 

Uncaught TypeError: e?.getURI is not a function

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.56.0 x64
Electron: 9.4.4
OS: Unknown Windows version
Thrown From: Atom Core

Stack Trace

Uncaught TypeError: e?.getURI is not a function

At C:\Users\azusa\work\Atom\atom-ide-deno\lib\auto_config.ts:29

TypeError: e?.getURI is not a function
    at ~/work/Atom/atom-ide-deno/lib/auto_config.ts:29:58
    at Array.some (<anonymous>)
    at ~/work/Atom/atom-ide-deno/lib/auto_config.ts:29:43
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:1182710)
    at Emitter.emit (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:1184151)
    at Workspace.didChangeActivePaneItemOnPaneContainer (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:427460)
    at ~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:14:44736
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:1182710)
    at Emitter.emit (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:1184151)
    at PaneContainer.didChangeActiveItemOnPane (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:449569)
    at Pane.setActiveItem (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:458413)
    at Pane.activateItem (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:460583)
    at TabBarView.onClick (~/AppData/Local/atom/app-1.56.0/resources/app/static/<embedded>:11:1133631)

Commands

     -5:00.8.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-atom-light-syntax.theme-atom-light-ui)
     -4:17.4.0 window:toggle-dev-tools (input.hidden-input)
     -4:07.3.0 autocomplete-plus:confirm (input.hidden-input)
     -4:00.5.0 core:backspace (input.hidden-input)
  2x -3:58 core:move-down (input.hidden-input)
     -3:57.5.0 autocomplete-plus:confirm (input.hidden-input)
     -3:15.7.0 linter-ui-default:toggle-panel (atom-workspace.workspace.scrollbars-visible-always.theme-atom-light-syntax.theme-atom-light-ui)

Non-Core Packages

atom-html-preview 0.2.6 
atom-ide-base 2.6.0 
atom-ide-datatip 0.24.1 
atom-ide-definitions 0.4.1 
atom-ide-deno 1.6.0 
atom-ide-hyperclick 1.0.10 
atom-ide-javascript 1.5.0 
atom-ide-markdown-service 2.1.0 
atom-ide-outline 2.3.4 
atom-ide-signature-help 0.15.3 
atom-ide-ui 0.13.0 
atom-runner 2.7.1 
atom-typescript 14.2.1 
atomic-terminal 1.1.0 
auto-encoding 0.7.2 
autocomplete-paths undefined 
busy-signal 2.0.1 
css-color-name 0.4.0 
docblockr 0.13.7 
export-html 3.1.0 
file-icons 2.1.47 
highlight-selected 0.17.0 
ide-rust 0.22.0-beta.3 
indent-guide-improved 1.4.13 
japanese-menu 1.15.0 
javascript-drag-import 0.1.13 
json-colorer 1.0.0 
language-latex 1.2.0 
latex 0.50.2 
latexer 0.3.0 
linter 3.3.1 
linter-eslint 8.6.6 
linter-ui-default 3.3.1 
minimap 4.39.13 
pdf-view 0.72.0 
pear-dark-syntax 1.0.9 
pear-syntax 0.1.8 
pigments 0.40.6 
prettier-atom 0.60.1 
pretty-json 2.1.2 
print-atom 0.1.1 
tango-syntax 0.5.0 

TS4.5

Deno1.17 and TS 4.5 will come.

  • .mts, .cts support
  • and more??

and bug fix

  • support .tsx and jsx formatting

Migrate the code here to typescript?

TODO: I want to move to typescript, so I need to find out how to do it.

In particular, replacing require() with import may provide completion support from denolsp for this extension via import-map.

Add configuration file

As I used this extension, I started to think that I needed a config file for each folder. Since the configuration file for each folder has been introduced in the vscode version of the extension, I would like to introduce it in this extension as well.
I will be able to specify the path of the configuration file from the setting screen.

I'm thinking about whether to go project manager (3rd party) or .vscode/setting.json.

using deno lint & fmt

This code is executed on Node.js, but it is excellent if we can use deno lint and fmt

Release failed.

The release failed and the v1.9.0 tag was skipped.
I don't know if this causes problems, but I made a note.
image

Do not disable Eslint provider

I have been trying to debug this issue for more than a week now until I found out that atom-ide-deno has disabled my Eslint through disabeldProviders settings of the Linter package, although I have disabled atom-ide-deno due to low performance (described separately in #45)

Coexistence with Node.js package (config for each workspace folder)

Currently, atom-typescript and this package display duplicate messages. (There is no compatibility because the dependency resolution method is different)
It's a hassle to enable / disable packages every time you go back and forth between projects.

image


Memo the terms:

  • Workspace (vscode concept) == Project (Atom concept)
  • Workspace folder (vscode concept) == Project folder (Atom concept)
  • "Project" includes multiple "Project folders".

I would like to support editing deno code on one side of a multi folder projects (https://blog.atom.io/2015/04/15/multi-folder-projects.html) and Node.js code on the other side. (vscode_deno does this via ./vscode/settings.json)

This can be done using lsp's workspace folder request.
image

I tried to implement this but realized there was still a upstream issue.

  • deno lsp
    Added support for workspace folders in v1.10 (2021.05.11). The documentation says the client needs to implement the workspaceConfiguration request.

  • atom-languageclient
    Workspace folder support was added in v1.9.0 (2021-05-13), but it looks like the workspaceConfiguration request is not yet supported.

  • atom
    Atom has multiple packages that set the "workspace" level, but I can't find an packages that sets the "workspace folder" level.
    I think that such a thing was added at atom/atom#16845, but I don't know how it works in multi folder projects (https://blog.atom.io/2015/04/15/multi-folder-projects.html). It seems that it was deleted at atom/atom#17212, but I don't know what happened after that. In some cases, you may need to invent the concept of custom configuration files.

  • atom-tyescript
    In order to suppress the diagnosis for Node.js, I need to turn off the function only in a particular folder. There is a need to allow for such a configuration.

  • linter-eslint
    I can enable eslint on a folder-by-folder basis by enabling "Disable when no ESLint config is found (in package.json or .eslintrc)". However, some people may not want to make such a setting.

  • prettier-atom
    It cannot be disabled for each folder.

I need to decide how to determine (set) whether the folder is Node.js or Deno code. I wish there was packages to support such a configuration file ...

Improvement of the formatter

Leftover at #61
I want to use atom-ide-code-format for single file format and deno fmt command and atom-ide-terminal for multiple file format.

try dnt

I need to see if the dependencies can be downloaded from esm.sh.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.