 (setq flymake-luac-program "luac5.3")
 (add-hook 'lua-mode-hook 'flymake-lua-load)
 (setq lua-default-application '("localhost" . 5555))
+(setq lua-default-application "lua5.3")  ;; '("localhost" . 5555))
+
+(defun my-lua-switch-to-process-buffer ()
+  (interactive)
+  (when (lua-get-create-process)
+    (switch-to-buffer-other-window lua-process-buffer)))
+
 (bind-keys :map lua-mode-map
-           ("C-M-x" . lua-send-proc)
+           ("C-M-x" . lua-send-defun)
            ("M-." . dumb-jump-go)
-           ("M-," . 'dumb-jump-back))
+           ("M-," . dumb-jump-back)
+           ("C-c C-z" . my-lua-switch-to-process-buffer))
 
 (defun my-non-special-modes-setup ()
   (setq indicate-empty-lines t)

(add-to-list 'cff-source-regexps '("\\.m$" . (lambda (base) (concat base ".m"))))
(add-to-list 'cff-source-regexps '("\\.mm$" . (lambda (base) (concat base ".mm"))))

;; (require 'cquery)
;; ;; https://github.com/cquery-project/cquery/wiki/Getting-started
;; (setq cquery-executable (expand-file-name "~/cquery/build/release/bin/cquery"))
;; (setq cquery-extra-init-params '(:index (:comments 2) :cacheFormat "msgpack"))
;; (setq cquery-sem-highlight-method nil)   ;; 'font-lock)

;; (require 'lsp-mode)
;; (setq lsp-highlight-symbol-at-point nil
;;       lsp-enable-flycheck nil
;;       lsp-enable-indentation nil
;;       lsp-enable-eldoc nil)

;; (add-hook 'c-mode-hook #'lsp-cquery-enable)
;; (add-hook 'c++-mode-hook #'lsp-cquery-enable)

;; (require 'lsp-imenu)
;; (add-hook 'lsp-after-open-hook 'lsp-enable-imenu)


(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(when (< emacs-major-version 27)
  (package-initialize))

;; (package-initialize)

(menu-bar-mode -1)
(blink-cursor-mode 1)
