Commit 4e0e9640 authored by treyzania's avatar treyzania

Added {json,meson,yaml}-mode, some TRAMP packages, other (Go-related) tweaks.

parent b957714a
......@@ -27,11 +27,13 @@
;(if (null (string-match-p "go/bin" (getenv "PATH")))
; (setenv "PATH" (concat (substitute-in-file-name "$HOME/.go/bin") ":" (getenv "PATH"))))
;(if (null (getenv "GOPATH"))
; (setenv "GOPATH" (substitute-in-file-name "$HOME/.go")))
; (setenv "GOPATH" (substitute-in-file-name "$HOME/.go")))
(setenv "GO111MODULE" "off")
;;; Core stuff
(use-package flycheck
:ensure t
:init (global-flycheck-mode)
......@@ -65,10 +67,38 @@
:ensure t
:commands company-lsp)
(use-package tramp
:ensure t)
(use-package docker-tramp
:ensure t
'((tramp-login-program "docker")
(tramp-login-args (("exec" "-it") ("%h") ("/bin/bash")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-i") ("-c"))))
(defadvice tramp-completion-handle-file-name-all-completions
(around dotemacs-completion-docker activate)
"(tramp-completion-handle-file-name-all-completions \"\" \"/docker:\" returns
a list of active Docker container names, followed by colons."
(if (equal (ad-get-arg 1) "/docker:")
(let* ((dockernames-raw (shell-command-to-string "docker ps | awk '$NF != \"NAMES\" { print $NF \":\" }'"))
(dockernames (cl-remove-if-not
#'(lambda (dockerline) (string-match ":$" dockerline))
(split-string dockernames-raw "\n"))))
(setq ad-return-value dockernames))
;;; Rust stuff
(use-package rust-mode
:ensure t
:hook (rust-mode . company-lsp)
(setq rust-format-on-save t)
(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common))
......@@ -110,13 +140,15 @@
(when (not (null newgopath))
(message "Temporarily setting GOPATH to %s" newgopath)
(setenv "GOPATH" newgopath)))))
. (lambda () (setenv "GOPATH" dotemacs-original-gopath))))
; . (lambda () (setenv "GOPATH" dotemacs-original-gopath)))
(define-key go-mode-map (kbd "TAB") #'company-indent-or-complete-common))
;;; C stuff
(use-package cc-mode
:ensure t
:hook ((prog-mode . (lambda () (interactive)
......@@ -132,6 +164,26 @@
(add-hook 'c-mode-common-hook 'hs-minor-mode)
(setq c-default-style "linux")
;;; Other formats
;; Meson
(use-package meson-mode
:ensure t
:hook (meson-mode . company-mode))
;; Protobuf
(use-package protobuf-mode
:ensure t)
;; Yaml
(use-package yaml-mode
:ensure t)
(use-package json-mode
:ensure t)
;;; Other stuff
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment