   ;; ('normal magit-mode-map "SPC" leader-map)
   )
 
+;; set proper language (fixes cyrillic letters in ansi-term)
+(setenv "LANG" "pt_BR.UTF-8")
 ;; Set default font
+
 (set-face-attribute 'default nil
                     :family "Operator Mono"
                     :height 150
                     :weight 'normal 
                     :width 'normal)
+
+;; font for all unicode characters
+(set-fontset-font t 'unicode "Symbola" nil 'prepend)
+
+;; override font for cyrillic characters
+(set-fontset-font t 'cyrillic "Droid Sans Mono")
+
+;; https://fakedrake.github.io/teaching-emacs-to-copy-utf-8-on-mac-os-x.html
+(defun paste-to-osx (text &optional push)
+  (let ((process-connection-type nil)
+        (lang (getenv "LANG"))
+        (default-directory "~"))
+    (setenv "LANG" "en_US.UTF-8")
+    (let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
+      (process-send-string proc text)
+      (process-send-eof proc))
+    (setenv "LANG" lang)))
+(setq interprogram-cut-function 'paste-to-osx)
+
 
 (use-package js2-mode)
 (use-package web-mode)

  (tide-setup)
  (flycheck-mode +1)
  (eldoc-mode +1)
  (setq company-tooltip-align-annotations t)
  (tide-hl-identifier-mode +1)
  (company-mode +1))

(use-package tide
  :ensure t

	      (lambda ()
		(when (string-match-p "tsx?" (file-name-extension buffer-file-name))
		  (setup-tide-mode))))
    (flycheck-add-mode 'typescript-tide 'typescript-tslint)
  )

(custom-set-variables
