-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multiple language server association with syntax elements
Fix redundant blank line
- Loading branch information
Indelog
committed
Apr 9, 2024
1 parent
8255965
commit 33e3b3f
Showing
13 changed files
with
336 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ test/X*.cpp | |
# test/Xtest.c | ||
# test/Xtest.cpp | ||
test/results.txt | ||
test/dummy-lsp/node_modules/ |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "dummy-lsp", | ||
"version": "0.0.0", | ||
"description": "Mock for LSP server", | ||
"main": "server.js", | ||
"dependencies": { | ||
"vscode-languageserver": "^9.0.1", | ||
"vscode-languageserver-textdocument": "^1.0.11" | ||
} | ||
} |
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,43 @@ | ||
#!/usr/bin/env node | ||
|
||
(async () => { | ||
const { | ||
createConnection, | ||
TextDocuments, | ||
ProposedFeatures, | ||
} = await import('vscode-languageserver'); | ||
const { | ||
TextDocument, | ||
} = await import('vscode-languageserver-textdocument'); | ||
|
||
async function main() { | ||
const connection = createConnection(ProposedFeatures.all); | ||
const documents = new TextDocuments(TextDocument); | ||
|
||
const settings = {}; | ||
|
||
connection.onInitialize((params) => { | ||
|
||
settings.hoverReply = params.initializationOptions?.hoverReply || 'DEFAULT'; | ||
|
||
const result = { | ||
capabilities: { | ||
hoverProvider: true, | ||
} | ||
}; | ||
|
||
return result; | ||
}); | ||
|
||
connection.onHover(param => { | ||
return { | ||
contents: settings.hoverReply, | ||
} | ||
}) | ||
|
||
documents.listen(connection); | ||
connection.listen(); | ||
} | ||
|
||
await main(); | ||
})() |
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
Oops, something went wrong.