mirror of
https://github.com/Strum355/mcshader-lsp.git
synced 2025-08-31 13:57:27 +00:00
Updated validator output parsing for new method
This commit is contained in:
parent
96eaac213a
commit
8878b20631
4 changed files with 34 additions and 45 deletions
|
@ -23,11 +23,14 @@ export function restartExtension(e: Extension): Command {
|
|||
}
|
||||
|
||||
export function virtualMergedDocument(e: Extension): Command {
|
||||
const getVirtualDocument = async (path: string): Promise<string> => {
|
||||
const content = await e.lspClient.sendRequest<string>(lsp.ExecuteCommandRequest.type.method, {
|
||||
command: 'virtualMerge',
|
||||
arguments: [path]
|
||||
})
|
||||
const getVirtualDocument = async (path: string): Promise<string | null> => {
|
||||
let content: string = ""
|
||||
try {
|
||||
content = await e.lspClient.sendRequest<string>(lsp.ExecuteCommandRequest.type.method, {
|
||||
command: 'virtualMerge',
|
||||
arguments: [path]
|
||||
})
|
||||
} catch(e) {}
|
||||
|
||||
return content
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue