(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.

;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)

(add-hook 'after-init-hook 'global-company-mode)

(package-install 'julia-mode)
(require 'julia-mode)

(add-to-list 'load-path "/usr/bin/")
(require 'julia-repl)
(julia-repl-set-terminal-backend 'vterm)
(add-hook 'julia-mode-hook 'julia-repl-mode)

;; Configure lsp + julia:
;; (require 'lsp-julia)
;; (require 'lsp-mode)
;; (use-package lsp-julia
;;   :config
;;   (setq lsp-julia-default-environment "~/.julia/environments/v1.11"))
;; (add-hook 'julia-mode-hook #'lsp-mode)
;; (add-hook 'julia-mode-hook #'lsp)


;; Eglot: M-x eglot-jl-init, M-x eglot
(use-package eglot
  :custom
  (eglot-connect-timeout nil))


(setq vterm-kill-buffer-on-exit nil)

(ido-mode 1)
(global-display-line-numbers-mode 1)

(require 'quarto-mode)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((python . t)))

(setq org-babel-python-command "python")

(global-set-key (kbd "M-o") 'ace-window)

(global-visual-line-mode t)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes '(deeper-blue))
 '(display-time-mode t)
 '(global-display-line-numbers-mode t)
 '(package-selected-packages
   '(eglot-jl python-mode yaml-mode ace-window copilot-chat json-mode company use-package lsp-ui lsp-julia lsp-mode org-babel-eval-in-repl quarto-mode vterm julia-repl julia-mode)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
