-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(WIP) Use LanguageServer.jl for better completions #413
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,9 @@ | |
<xdebugger.breakpointType implementation="org.ice1000.julia.lang.execution.JuliaLineBreakpointType"/> | ||
<consoleFilterProvider implementation="org.ice1000.julia.lang.execution.JuliaConsoleFilterProvider"/> | ||
<console.folding implementation="org.ice1000.julia.lang.execution.JuliaConsoleFolding"/> | ||
<!-- | ||
<moduleConfigurationEditorProvider implementation="org.ice1000.julia.lang.module.JuliaModuleConfigEditor"/> | ||
--> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? |
||
<directoryProjectGenerator implementation="org.ice1000.julia.lang.module.JuliaProjectGenerator"/> | ||
<iconProvider implementation="org.ice1000.julia.lang.editing.JuliaIconProvider"/> | ||
<errorHandler implementation="org.ice1000.julia.lang.error.GitHubErrorReporter"/> | ||
|
@@ -54,12 +56,28 @@ | |
<stubIndex implementation="org.ice1000.julia.lang.psi.JuliaAbstractTypeDeclarationIndex"/> | ||
<stubIndex implementation="org.ice1000.julia.lang.psi.JuliaTypeDeclarationIndex"/> | ||
<stubIndex implementation="org.ice1000.julia.lang.psi.JuliaModuleDeclarationIndex"/> | ||
<localInspection displayName="LSP" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can the display name be changed to "language server" or "julia language server"? |
||
shortName="LSP" | ||
enabledByDefault="true" | ||
implementationClass="org.wso2.lsp4intellij.contributors.inspection.DummyLSPInspection"/> | ||
<gotoSymbolContributor implementation="org.wso2.lsp4intellij.contributors.symbol.LSPSymbolContributor" | ||
id="LSPSymbolContributor"/> | ||
<renameHandler implementation="org.wso2.lsp4intellij.contributors.rename.LSPRenameHandler" | ||
id="LSPRenameHandler" order="first"/> | ||
<renamePsiElementProcessor implementation="org.wso2.lsp4intellij.contributors.rename.LSPRenameProcessor" | ||
id="LSPRenameProcessor" order="first"/> | ||
<preloadingActivity implementation="org.ice1000.julia.lang.preload.JuliaPreloadingActivity" | ||
id="org.ice1000.julia.lang.preload.JuliaPreloadingActivity" /> | ||
<lang.refactoringSupport | ||
language="Julia" | ||
implementationClass="org.ice1000.julia.lang.editing.JuliaRefactoringSupportProvider"/> | ||
<completion.contributor implementationClass="org.wso2.lsp4intellij.contributors.LSPCompletionContributor" | ||
id="LSPCompletionContributor" language="Julia"/> | ||
<!-- | ||
<completion.contributor | ||
language="Julia" | ||
implementationClass="org.ice1000.julia.lang.editing.JuliaBasicCompletionContributor"/> | ||
--> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can keep this, no? |
||
<completion.contributor | ||
language="DocumentFormat" | ||
implementationClass="org.ice1000.julia.lang.docfmt.DocfmtCompletionContributor"/> | ||
|
@@ -250,4 +268,9 @@ | |
<keyboard-shortcut first-keystroke="shift ENTER" keymap="$default"/> | ||
</action> | ||
</actions> | ||
<application-components> | ||
<component> | ||
<implementation-class>org.wso2.lsp4intellij.IntellijLanguageClient</implementation-class> | ||
</component> | ||
</application-components> | ||
</idea-plugin> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using LanguageServer, Sockets, SymbolServer, Pkg | ||
|
||
const depot = Pkg.depots1() | ||
server = LanguageServer.LanguageServerInstance(stdin, stdout, false, string(depot, ""/environments/v1.1"), depot, Dict()) | ||
server.runlinter = true | ||
server.debug_mode = true | ||
run(server) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import icons.JuliaIcons | |
import org.ice1000.julia.lang.* | ||
import org.ice1000.julia.lang.action.errorNotification | ||
import org.ice1000.julia.lang.module.ui.JuliaSetupSdkWizardStepImpl | ||
import javax.swing.JComponent | ||
|
||
class JuliaModuleBuilder : ModuleBuilder(), ModuleBuilderListener { | ||
init { | ||
|
@@ -78,6 +79,8 @@ class JuliaModuleType : ModuleType<JuliaModuleBuilder>(JULIA_MODULE_ID) { | |
* @author: zxj5470 | ||
* @date: 2018/1/29 | ||
*/ | ||
|
||
/* | ||
class JuliaModuleConfigEditor : ModuleConfigurationEditorProvider { | ||
override fun createEditors(state: ModuleConfigurationState): Array<ModuleConfigurationEditor> { | ||
val module = state.rootModel?.module ?: return emptyArray() | ||
|
@@ -95,4 +98,4 @@ class JuliaCompileOutputEditor(state: ModuleConfigurationState) : ModuleElements | |
override fun getDisplayName() = "Paths" | ||
override fun getHelpTopic() = editor.helpTopic | ||
} | ||
|
||
*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.ice1000.julia.lang.preload | ||
|
||
import com.intellij.openapi.application.PreloadingActivity | ||
import com.intellij.openapi.progress.ProgressIndicator | ||
import org.wso2.lsp4intellij.IntellijLanguageClient | ||
import org.wso2.lsp4intellij.client.languageserver.serverdefinition.RawCommandServerDefinition | ||
|
||
class JuliaPreloadingActivity: PreloadingActivity() { | ||
override fun preload(indicator: ProgressIndicator) { | ||
indicator.isIndeterminate = true | ||
IntellijLanguageClient.addServerDefinition( | ||
RawCommandServerDefinition("jl", arrayOf("julia", "/home/quangio/IdeaProjects/julia-plugin-test/lsp.jl"))) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you eliminate these whitespaces changes?