Skip to content

Commit

Permalink
fix: Add missing lsp handlers to the root-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Sep 11, 2024
1 parent 01bda3b commit ea6fdd8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions root-handler/text-document-did-change.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
aliases "config-lsp/handlers/aliases/lsp"
fstab "config-lsp/handlers/fstab/lsp"
hosts "config-lsp/handlers/hosts/lsp"
sshdconfig "config-lsp/handlers/sshd_config/lsp"
wireguard "config-lsp/handlers/wireguard/lsp"

"github.com/tliron/glsp"
Expand Down Expand Up @@ -41,7 +42,7 @@ func TextDocumentDidChange(context *glsp.Context, params *protocol.DidChangeText
case LanguageFstab:
return fstab.TextDocumentDidOpen(context, params)
case LanguageSSHDConfig:
break
return sshdconfig.TextDocumentDidOpen(context, params)
case LanguageWireguard:
return wireguard.TextDocumentDidOpen(context, params)
case LanguageHosts:
Expand All @@ -55,7 +56,7 @@ func TextDocumentDidChange(context *glsp.Context, params *protocol.DidChangeText
case LanguageFstab:
return fstab.TextDocumentDidChange(context, params)
case LanguageSSHDConfig:
return nil
return sshdconfig.TextDocumentDidChange(context, params)
case LanguageWireguard:
return wireguard.TextDocumentDidChange(context, params)
case LanguageHosts:
Expand Down
3 changes: 2 additions & 1 deletion root-handler/text-document-did-open.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
aliases "config-lsp/handlers/aliases/lsp"
fstab "config-lsp/handlers/fstab/lsp"
hosts "config-lsp/handlers/hosts/lsp"
sshdconfig "config-lsp/handlers/sshd_config/lsp"
wireguard "config-lsp/handlers/wireguard/lsp"

"github.com/tliron/glsp"
Expand All @@ -33,7 +34,7 @@ func TextDocumentDidOpen(context *glsp.Context, params *protocol.DidOpenTextDocu
case LanguageFstab:
return fstab.TextDocumentDidOpen(context, params)
case LanguageSSHDConfig:
break
return sshdconfig.TextDocumentDidOpen(context, params)
case LanguageWireguard:
return wireguard.TextDocumentDidOpen(context, params)
case LanguageHosts:
Expand Down
3 changes: 3 additions & 0 deletions root-handler/workspace-execute-command.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package roothandler

import (
aliases "config-lsp/handlers/aliases/lsp"
hosts "config-lsp/handlers/hosts/lsp"
wireguard "config-lsp/handlers/wireguard/lsp"

Expand All @@ -21,6 +22,8 @@ func WorkspaceExecuteCommand(context *glsp.Context, params *protocol.ExecuteComm
edit, err = wireguard.WorkspaceExecuteCommand(context, params)
case "hosts":
edit, err = hosts.WorkspaceExecuteCommand(context, params)
case "aliases":
edit, err = aliases.WorkspaceExecuteCommand(context, params)
}

if err != nil {
Expand Down

0 comments on commit ea6fdd8

Please sign in to comment.