Skip to content

Commit

Permalink
Merge pull request #73 from rycont/remove-monaco-editor-import-in-lan…
Browse files Browse the repository at this point in the history
…guage-provider

chore: remove monaco editor import in language provider
  • Loading branch information
rycont authored Jan 15, 2025
2 parents ab4b5d7 + 718e690 commit 6f3bf90
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
},
"name": "@dalbit-yaksok/core",
"exports": "./mod.ts",
"version": "0.2.0-RC.5"
"version": "0.2.0-RC.6"
}
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"test",
"monaco-language-provider"
],
"version": "0.2.0-RC.5",
"version": "0.2.0-RC.6",
"tasks": {
"apply-version": "deno run --allow-read --allow-write apply-version.ts",
"publish": "deno task --recursive test && deno publish --allow-dirty"
Expand Down
2 changes: 1 addition & 1 deletion monaco-language-provider/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
},
"name": "@dalbit-yaksok/monaco-language-provider",
"exports": "./mod.ts",
"version": "0.2.0-RC.5"
"version": "0.2.0-RC.6"
}
2 changes: 1 addition & 1 deletion monaco-language-provider/language.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { languages, editor } from 'monaco-editor'
import type { languages, editor } from 'monaco-editor'
import { LANG_ID } from './const.ts'
import { BaseProvider } from './provider/base.ts'
import {
Expand Down
40 changes: 36 additions & 4 deletions monaco-language-provider/provider/completion-item.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,54 @@
import { editor, languages, Position } from 'monaco-editor'
import type { editor, languages, Position } from 'monaco-editor'
import { BaseProvider } from './base.ts'

// From editor.api.d.ts
export enum CompletionItemKind {
Method = 0,
Function = 1,
Constructor = 2,
Field = 3,
Variable = 4,
Class = 5,
Struct = 6,
Interface = 7,
Module = 8,
Property = 9,
Event = 10,
Operator = 11,
Unit = 12,
Value = 13,
Constant = 14,
Enum = 15,
EnumMember = 16,
Keyword = 17,
Text = 18,
Color = 19,
File = 20,
Reference = 21,
Customcolor = 22,
Folder = 23,
TypeParameter = 24,
User = 25,
Issue = 26,
Snippet = 27,
}

const COMPLETION_SNIPPETS = [
{
label: '보여주기',
kind: languages.CompletionItemKind.Keyword,
kind: CompletionItemKind.Keyword,
insertText: '보여주기',
detail: '값을 화면에 보여줘요',
},
{
label: '약속',
kind: languages.CompletionItemKind.Snippet,
kind: CompletionItemKind.Snippet,
insertText: '약속, ',
detail: '새 약속을 만들어요',
},
{
label: '결과',
kind: languages.CompletionItemKind.Snippet,
kind: CompletionItemKind.Snippet,
insertText: '결과: ',
detail: '약속의 결과를 설정해요',
},
Expand Down
2 changes: 1 addition & 1 deletion quickjs/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"check-deploy": "deno publish --dry-run --allow-dirty",
"test": "deno test --quiet --allow-net --allow-read --parallel & deno lint & deno task check-deploy"
},
"version": "0.2.0-RC.5"
"version": "0.2.0-RC.6"
}

0 comments on commit 6f3bf90

Please sign in to comment.