This commit is contained in:
Frederik Hanghøj Iversen 2020-11-08 12:39:44 +01:00
parent 91c769461d
commit 9d8e9fc4a1

View file

@ -82,6 +82,7 @@
'(flycheck-ghc-language-extensions (symbol-value 'haskell-language-extensions)) '(flycheck-ghc-language-extensions (symbol-value 'haskell-language-extensions))
'(flycheck-hlint-language-extensions (symbol-value 'haskell-language-extensions)) '(flycheck-hlint-language-extensions (symbol-value 'haskell-language-extensions))
'(flycheck-idris-executable "idris2") '(flycheck-idris-executable "idris2")
'(flycheck-javascript-eslint-executable nil)
'(forge-alist '(forge-alist
'(("github.com" "api.github.com" "github.com" forge-github-repository) '(("github.com" "api.github.com" "github.com" forge-github-repository)
("gitlab.com" "gitlab.com/api/v4" "gitlab.com" forge-gitlab-repository) ("gitlab.com" "gitlab.com/api/v4" "gitlab.com" forge-gitlab-repository)
@ -108,6 +109,7 @@
'(haskell-language-extensions (symbol-value 'haskell-language-extensions)) '(haskell-language-extensions (symbol-value 'haskell-language-extensions))
'(haskell-tags-on-save t) '(haskell-tags-on-save t)
'(idris-interpreter-path "idris2") '(idris-interpreter-path "idris2")
'(idris-semantic-source-highlighting nil)
'(indent-tabs-mode nil) '(indent-tabs-mode nil)
'(initial-scratch-message nil) '(initial-scratch-message nil)
'(js-indent-level 2) '(js-indent-level 2)
@ -116,6 +118,7 @@
'(kill-whole-line t) '(kill-whole-line t)
'(line-move-visual nil) '(line-move-visual nil)
'(lsp-auto-guess-root t) '(lsp-auto-guess-root t)
'(lsp-ui-sideline-show-code-actions nil)
'(magit-diff-refine-hunk "all") '(magit-diff-refine-hunk "all")
'(magit-display-buffer-function 'magit-display-buffer-same-window-except-diff-v1) '(magit-display-buffer-function 'magit-display-buffer-same-window-except-diff-v1)
'(magit-popup-display-buffer-action nil) '(magit-popup-display-buffer-action nil)
@ -126,7 +129,7 @@
'(org-agenda-files "~/.config/orgmode/agenda_files") '(org-agenda-files "~/.config/orgmode/agenda_files")
'(org-hide-leading-stars t) '(org-hide-leading-stars t)
'(package-selected-packages '(package-selected-packages
'(nhexl-mode idris-mode realgud-trepan-ni realgud-node-inspect realgud graphviz-dot-mode rust-mode lsp forge tide origami dhall-mode docker-tramp graphql-mode enh-ruby-mode scala-mode string-inflection prettier-js quelpa typescript-mode visual-fill-column ag ripgrep fill-column-indicator rjsx-mode image+ company org-jira which-key flycheck es-mode lsp-haskell projectile exec-path-from-shell lsp-ui lsp-mode editorconfig purescript-mode markdown-mode+ ssh-agency dash yaml-mode restart-emacs markdown-mode magit helm haskell-mode haml-mode form-feed dashboard)) '(jsonnet-mode eslint-fix nhexl-mode idris-mode realgud-trepan-ni realgud-node-inspect realgud graphviz-dot-mode rust-mode lsp forge tide origami dhall-mode docker-tramp graphql-mode enh-ruby-mode scala-mode string-inflection prettier-js quelpa typescript-mode visual-fill-column ag ripgrep fill-column-indicator rjsx-mode image+ company org-jira which-key flycheck es-mode lsp-haskell projectile exec-path-from-shell lsp-ui lsp-Mode editorconfig purescript-mode markdown-mode+ ssh-agency dash yaml-mode restart-emacs markdown-mode magit helm haskell-mode haml-mode form-feed dashboard))
'(prettier-js-command "prettier") '(prettier-js-command "prettier")
'(projectile-globally-ignored-directories '(projectile-globally-ignored-directories
'(".idea" ".ensime_cache" ".eunit" ".git" ".hg" ".fslckout" "_FOSSIL_" ".bzr" "_darcs" ".tox" ".svn" ".stack-work" "node_modules" "vendor")) '(".idea" ".ensime_cache" ".eunit" ".git" ".hg" ".fslckout" "_FOSSIL_" ".bzr" "_darcs" ".tox" ".svn" ".stack-work" "node_modules" "vendor"))
@ -155,7 +158,10 @@
(format "cd ~/git/zendesk/guide-acceptance-tests && rspec --no-color '%s'" (format "cd ~/git/zendesk/guide-acceptance-tests && rspec --no-color '%s'"
(projectile-get-relative-path-buffer)))) (projectile-get-relative-path-buffer))))
'(safe-local-variable-values '(safe-local-variable-values
'((add-to-list 'auto-mode-alist '((eval local-set-key
(kbd "C-M-\\")
'prettier-js)
(add-to-list 'auto-mode-alist
'("\\.js\\'" . js-mode)) '("\\.js\\'" . js-mode))
(prettier-js-mode) (prettier-js-mode)
(prettier-mode) (prettier-mode)
@ -187,6 +193,7 @@
'(set-mark-command-repeat-pop t) '(set-mark-command-repeat-pop t)
'(sgml-basic-offset 1) '(sgml-basic-offset 1)
'(sh-basic-offset 2) '(sh-basic-offset 2)
'(sh-here-document-word "eof")
'(show-paren-delay 0) '(show-paren-delay 0)
'(show-paren-mode t) '(show-paren-mode t)
'(shr-width 80) '(shr-width 80)
@ -201,7 +208,8 @@
'(vc-follow-symlinks nil) '(vc-follow-symlinks nil)
'(which-key-idle-delay 1e-05) '(which-key-idle-delay 1e-05)
'(window-combination-resize t) '(window-combination-resize t)
'(window-resize-pixelwise t)) '(window-resize-pixelwise t)
'(yaml-backspace-function 'delete-backward-char))
;;;; MAC setup ;;;; MAC setup
@ -331,7 +339,8 @@
(add-hook 'yaml-mode-hook (add-hook 'yaml-mode-hook
(lambda () (lambda ()
(flyspell-mode -1))) (flyspell-mode -1)
(local-set-key (kbd "DEL") 'delete-backward-char)))
(defvar html--html-template (concat (defvar html--html-template (concat
"<head>\n" "<head>\n"
@ -404,6 +413,13 @@
(setq js2-global-externs js2-globals) (setq js2-global-externs js2-globals)
(add-hook 'sh-mode-hook
(lambda ()
(sh-electric-here-document-mode -1)
(set (make-local-variable 'compile-command)
(buffer-file-name (current-buffer)))
(local-set-key (kbd "C-c C-c") 'compile)))
;;;; Projectile ;;;; Projectile
(require 'projectile) (require 'projectile)
@ -561,4 +577,29 @@ Requires that `sqlformat` is installed."
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer) (add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
(defun projectile--buffer-file-relative-path ()
"Get the project relative path of FILE-NAME."
(file-relative-name buffer-file-name (projectile-project-root)))
(defun projectile-eslint ()
"Run eslint on current buffers file."
(interactive)
(shell-command (format "yarn eslint --fix %s" (projectile--buffer-file-relative-path))))
(defun forge-browse-file ()
"Browse the currently visited file on the remote."
(interactive
(browse-url
(let
((rev (magit-get-current-branch))
(repo (forge-get-repository 'stub))
(file (projectile--buffer-file-relative-path)))
(forge--format repo "https://%h/%o/%n/blob/%r/%f"
`((?r . ,rev) (?f . ,file)))))))
(defun sort-words (beg end)
"Sort words between BEG and END."
(interactive "r")
(sort-regexp-fields nil "\\w+" "\\&" beg end))
;;; init.el ends here ;;; init.el ends here