Files
numscript/internal/cmd/lsp.go
Alessandro ScandoneandGitHub f8f9275974 feat: cli, change run args (#84)
* feat: change cli command args

* feat: better docs and improve err handling

* fix: fix error handling

* feat: added schema for inputs file

* feat: improve error output

* feat: more reliable exit from cli (no explicit exit() call)
2025-07-24 14:59:48 +02:00

25 lines
480 B
Go

package cmd
import (
"github.com/formancehq/numscript/internal/lsp"
"github.com/spf13/cobra"
)
var lspCmd = &cobra.Command{
Use: "lsp",
Short: "Run the lsp server",
Long: "Run the lsp server. This command is usually meant to be used for editors integration.",
Hidden: true,
RunE: func(cmd *cobra.Command, args []string) error {
err := lsp.RunServer()
if err != nil {
cmd.SilenceErrors = true
cmd.SilenceUsage = true
return err
}
return nil
},
}