mirror of
https://github.com/Myzel394/config-lsp.git
synced 2025-06-19 23:45:27 +02:00
26 lines
594 B
Go
26 lines
594 B
Go
package roothandler
|
|
|
|
import (
|
|
"config-lsp/handlers/wireguard"
|
|
|
|
"github.com/tliron/glsp"
|
|
protocol "github.com/tliron/glsp/protocol_3_16"
|
|
)
|
|
|
|
func TextDocumentDidClose(context *glsp.Context, params *protocol.DidCloseTextDocumentParams) error {
|
|
language := rootHandler.GetLanguageForDocument(params.TextDocument.URI)
|
|
|
|
delete(openedFiles, params.TextDocument.URI)
|
|
rootHandler.RemoveDocument(params.TextDocument.URI)
|
|
|
|
switch language {
|
|
case LanguageFstab:
|
|
case LanguageSSHDConfig:
|
|
case LanguageWireguard:
|
|
return wireguard.TextDocumentDidClose(context, params)
|
|
default:
|
|
}
|
|
|
|
return nil
|
|
}
|