-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/com/tang/intellij/lua/comment/LuaCommenter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.tang.intellij.lua.comment | ||
|
||
import com.intellij.codeInsight.generation.IndentedCommenter | ||
import com.intellij.lang.Commenter | ||
|
||
class LuaCommenter : IndentedCommenter { | ||
override fun getLineCommentPrefix(): String { | ||
return "--" | ||
} | ||
|
||
override fun getBlockCommentPrefix(): String { | ||
return "--[[" | ||
} | ||
|
||
override fun getBlockCommentSuffix(): String { | ||
return "]]" | ||
} | ||
|
||
override fun getCommentedBlockCommentPrefix(): String? { | ||
return null | ||
} | ||
|
||
override fun getCommentedBlockCommentSuffix(): String? { | ||
return null | ||
} | ||
|
||
override fun forceIndentedLineComment(): Boolean { | ||
return true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters