Skip to content

Commit

Permalink
feat(codemirror/asm): support comment command
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Dec 11, 2023
1 parent 483b4f3 commit 43fcbf3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/features/editor/codemirror/asm.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { CloseBracketConfig } from '@codemirror/autocomplete'
import type { CommentTokens } from '@codemirror/commands'
import {
defaultHighlightStyle,
indentUnit,
Expand Down Expand Up @@ -104,6 +106,10 @@ const asmLanguage = StreamLanguage.define<State>({
const spaceCount = whitespaces.length - tabCount
return tabCount * tabSize + spaceCount
},
languageData: {
commentTokens: { line: ';' } satisfies CommentTokens,
closeBrackets: { brackets: ['[', '"'] } satisfies CloseBracketConfig,
},
})

export const asm = (): Extension => {
Expand Down

0 comments on commit 43fcbf3

Please sign in to comment.