Documentation
¶
Index ¶
- Variables
- func GetChromaStyleForTheme(themeName string) string
- func HasClients() bool
- func ListThemes()
- func Openbrowser(url, browser string) error
- func WaitForClients(timeout time.Duration) error
- type OpenDocumentRequest
- type Server
- func (s *Server) CloseDocument(documentURI string, isLastDocument bool)
- func (s *Server) GetWorkspaceRoot() string
- func (s *Server) SetWorkspaceRoot(root string)
- func (s *Server) Start()
- func (s *Server) Stop()
- func (s *Server) Update(filename, newContent string, meta map[string]any)
- func (s *Server) UpdateWithURI(filename, documentURI string, newContent string, meta map[string]any)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Browser string Theme string FixedPort int OpenBrowserOnStartup bool EnableTabs bool LSPRequestChan = make(chan OpenDocumentRequest) )
Functions ¶
func GetChromaStyleForTheme ¶ added in v0.17.0
GetChromaStyleForTheme returns a recommended chroma syntax highlighting style for a given theme. Since theme names match chroma conventions, most themes return their name directly.
func HasClients ¶ added in v0.20.0
func HasClients() bool
HasClients returns true if any WebSocket clients are connected.
func ListThemes ¶ added in v0.17.0
func ListThemes()
func Openbrowser ¶ added in v0.3.0
func WaitForClients ¶ added in v0.4.1
Types ¶
type OpenDocumentRequest ¶ added in v0.17.0
type Server ¶
func (*Server) CloseDocument ¶ added in v0.17.0
CloseDocument sends a close message to clients viewing the specified document.
func (*Server) GetWorkspaceRoot ¶ added in v0.17.0
func (*Server) SetWorkspaceRoot ¶ added in v0.17.0
Click to show internal directories.
Click to hide internal directories.