Skip to content

feat: User defined launch config lsp server - #48

Merged
fbricon merged 1 commit into
redhat-developer:mainfrom
angelozerr:launchconfig
Jan 12, 2024
Merged

fbricon merged 1 commit into
redhat-developer:mainfrom
angelozerr:launchconfig

Conversation

@angelozerr

Copy link
Copy Markdown
Contributor

feat: User defined launch config lsp server

@angelozerr
angelozerr force-pushed the launchconfig branch 27 times, most recently from 29d2ceb to 4e874c8 Compare December 22, 2023 15:22
@angelozerr
angelozerr force-pushed the launchconfig branch 2 times, most recently from e255dd1 to d635df3 Compare December 31, 2023 16:30
@angelozerr
angelozerr force-pushed the launchconfig branch 8 times, most recently from b8de52d to 5043576 Compare January 11, 2024 14:29
.collect(Collectors.toList())
.stream().sorted()
.collect(Collectors.toList());
//val configuredFileTypes = models.tableModel.items.map { it.fileTypeName }.toSet()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted it, but we need to remove the file types which are already used to avoid filling multiple mappings with the same file type.

return Arrays.asList(addAction, removeAction);
}

private static boolean isLaunchingLanguageServerDefinition(MyNode node) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isUserDefinedLanguageServerDefinition

@angelozerr
angelozerr marked this pull request as ready for review January 11, 2024 15:05
@angelozerr
angelozerr force-pushed the launchconfig branch 6 times, most recently from ff53c1b to 86ff49f Compare January 12, 2024 09:06
Comment thread src/main/resources/template-ls.json Outdated
{
"name": "CSS Language Server",
"instructions": [
"To consume CSS language server you need to:",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use Visual Studio Code's CSS language server by following these instructions:

Comment thread src/main/resources/template-ls.json Outdated
" <li><a href=\"https://nodejs.org/en/download\">download and install nodejs</a></li>",
" <li><a href=\"https://code.visualstudio.com/download\">download and install vscode</a>.</li>",
" <li>Once vscode is installed, it will store the CSS language server in <b>${BASE_DIR}/resources/app/extensions/css-language-features/server/dist/node/cssServerMain.js</b></li>",
" LSP4IJ tries to generate the proper <b>cssServerMain.js</b> file path according to your OS, but you will have to perhaps adjust it.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you may have to adjust it.

Comment thread src/main/resources/template-ls.json Outdated
"instructions": [
"To consume CSS language server you need to:",
"<ul>",
" <li><a href=\"https://nodejs.org/en/download\">download and install nodejs</a></li>",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js

Comment thread src/main/resources/template-ls.json Outdated
"To consume CSS language server you need to:",
"<ul>",
" <li><a href=\"https://nodejs.org/en/download\">download and install nodejs</a></li>",
" <li><a href=\"https://code.visualstudio.com/download\">download and install vscode</a>.</li>",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual Studio Code

Comment thread src/main/resources/template-ls.json Outdated
"<ul>",
" <li><a href=\"https://nodejs.org/en/download\">download and install nodejs</a></li>",
" <li><a href=\"https://code.visualstudio.com/download\">download and install vscode</a>.</li>",
" <li>Once vscode is installed, it will store the CSS language server in <b>${BASE_DIR}/resources/app/extensions/css-language-features/server/dist/node/cssServerMain.js</b></li>",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual Studio Code

Comment thread src/main/resources/template-ls.json Outdated
"To consume HTML language server you need to:",
"<ul>",
" <li><a href=\"https://nodejs.org/en/download\">download and install nodejs</a></li>",
" <li><a href=\"https://code.visualstudio.com/download\">download and install vscode</a>.</li>",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual Studio Code

Comment thread src/main/resources/template-ls.json Outdated
"<ul>",
" <li><a href=\"https://nodejs.org/en/download\">download and install nodejs</a></li>",
" <li><a href=\"https://code.visualstudio.com/download\">download and install vscode</a>.</li>",
" <li>Once vscode is installed, it will store the CSS language server in <b>${BASE_DIR}/resources/app/extensions/html-language-features/server/dist/node/htmlServerMain.js</b></li>",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSS -> HTML

Comment thread src/main/resources/template-ls.json Outdated
"<ul>",
" <li><a href=\"https://nodejs.org/en/download\">download and install nodejs</a></li>",
" <li><a href=\"https://code.visualstudio.com/download\">download and install vscode</a>.</li>",
" <li>Once vscode is installed, it will store the CSS language server in <b>${BASE_DIR}/resources/app/extensions/html-language-features/server/dist/node/htmlServerMain.js</b></li>",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visual Studio Code

Comment thread src/main/resources/template-ls.json Outdated
" <li><a href=\"https://nodejs.org/en/download\">download and install nodejs</a></li>",
" <li><a href=\"https://code.visualstudio.com/download\">download and install vscode</a>.</li>",
" <li>Once vscode is installed, it will store the CSS language server in <b>${BASE_DIR}/resources/app/extensions/html-language-features/server/dist/node/htmlServerMain.js</b></li>",
" LSP4IJ tries to generate the proper <b>htmlServerMain.js</b> file path according to your OS, but you will have to perhaps adjust it.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you may have to adjust it.

Comment thread src/main/resources/template-ls.json Outdated
Comment on lines +55 to +82
{
"name": "XML Language Server",
"instructions": [
"To consume <a href=\"https://github.com/eclipse/lemminx\">XML language server</a> you need to:",
"<ul>",
" <li><a href=\"https://download.eclipse.org/justj/?file=lemminx/releases\">download org.eclipse.lemminx-uber.jar JAR</a></li>",
" <li>Once <b>org.eclipse.lemminx-uber.jar</b> is downloaded you will need to adjust ${BASE_DIR} with your base dir",
" where <b>org.eclipse.lemminx-uber.jar</b> file is stored.",
" </li>",
"</ul>"
],
"runtime": "java",
"programArgs": {
"default": "-classpath \"${BASE_DIR}/org.eclipse.lemminx-uber.jar\" org.eclipse.lemminx.XMLServerLauncher"
},
"languageMappings": [
{
"language": "XML"
},
{
"language": "DTD"
},
{
"language": "RELAX-NG"
}
]
}
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this one

@fbricon

fbricon commented Jan 12, 2024

Copy link
Copy Markdown
Contributor

Great work @angelozerr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants