                 popUpButton.bezelStyle = .texturedRounded
                 popUpButton.menu?.autoenablesItems = false
                 self.syntaxPopUpButton = popUpButton
-                self.buildSyntaxPopupButton()
+                self.buildSyntaxPopUpButton()
                 
                 let item = NSToolbarItem(itemIdentifier: itemIdentifier)
                 item.label = "Syntax Style".localized

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

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