Skip to content

Commit

Permalink
Support for LaTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
massivemadness committed May 7, 2023
1 parent edcb144 commit bcc2abd
Show file tree
Hide file tree
Showing 11 changed files with 1,576 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ dependencies {
implementation 'com.blacksquircle.ui:language-json:2.7.0'
implementation 'com.blacksquircle.ui:language-julia:2.7.0'
implementation 'com.blacksquircle.ui:language-kotlin:2.7.0'
implementation 'com.blacksquircle.ui:language-latex:2.7.0'
implementation 'com.blacksquircle.ui:language-lisp:2.7.0'
implementation 'com.blacksquircle.ui:language-lua:2.7.0'
implementation 'com.blacksquircle.ui:language-markdown:2.7.0'
Expand Down
1 change: 1 addition & 0 deletions language-latex/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
46 changes: 46 additions & 0 deletions language-latex/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2023 Squircle CE contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
id 'java-library'
id 'kotlin'
}

ext.libraryGroupId = "com.blacksquircle.ui"
ext.libraryArtifactId = "language-latex"

apply from: rootProject.file("gradle/publish.gradle")

group libraryGroupId
version versions.publishVersionName

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

dependencies {

// Core
implementation library.kotlin

// Modules
api project(':editorkit:language-base')
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2023 Squircle CE contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.blacksquircle.ui.language.latex

import com.blacksquircle.ui.language.base.Language
import com.blacksquircle.ui.language.base.parser.LanguageParser
import com.blacksquircle.ui.language.base.provider.SuggestionProvider
import com.blacksquircle.ui.language.base.styler.LanguageStyler
import com.blacksquircle.ui.language.latex.parser.LatexParser
import com.blacksquircle.ui.language.latex.provider.LatexProvider
import com.blacksquircle.ui.language.latex.styler.LatexStyler

class LatexLanguage : Language {

companion object {
const val LANGUAGE_NAME = "latex"
}

override val languageName = LANGUAGE_NAME

override fun getParser(): LanguageParser {
return LatexParser.getInstance()
}

override fun getProvider(): SuggestionProvider {
return LatexProvider.getInstance()
}

override fun getStyler(): LanguageStyler {
return LatexStyler.getInstance()
}
}
Loading

0 comments on commit bcc2abd

Please sign in to comment.