     
     
     /// Build syntax style popup menu in toolbar.
-    private func buildSyntaxPopupButton() {
+    private func buildSyntaxPopUpButton() {
         
         guard let menu = self.syntaxPopUpButton?.menu else { return }
         

            }
            
            self.window?.toolbar?.items.lazy.compactMap { $0 as? NSSharingServicePickerToolbarItem }.first?.delegate = document
            self.selectSyntaxPopUp(with: document.syntaxParser.style.name)
            
            // observe document's style change
            self.documentStyleObserver = document.didChangeSyntaxStyle
                .receive(on: RunLoop.main)
                .sink { [weak self] in self?.selectSyntaxPopUp(with: $0) }
        }
    }
    

        menu.items += styleNames.map { NSMenuItem(title: $0, action: action, keyEquivalent: "") }
        
        if let styleName = (self.document as? Document)?.syntaxParser.style.name {
            self.selectSyntaxPopUpItem(with: styleName)
        }
    }
    
    
    private func selectSyntaxPopUpItem(with styleName: String) {
        
        guard let popUpButton = self.syntaxPopUpButton else { return }
        
