From 69c74f5d1678d3545b4d0b98e08f809b14cc29ac Mon Sep 17 00:00:00 2001 From: Irfan Shah Date: Wed, 23 Dec 2020 16:13:33 +0530 Subject: [PATCH] add minimal ts setup --- custom.el | 2 +- ide.org | 4 +++- init.el | 1 + ts.org | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 ts.org diff --git a/custom.el b/custom.el index 7280ecb..d51a338 100644 --- a/custom.el +++ b/custom.el @@ -14,7 +14,7 @@ ("melpa" . "https://melpa.org/packages/") ("ox-odt" . "https://kjambunathan.github.io/elpa/"))) '(package-selected-packages - '(ob-rust erlang-mode gotest dashboard flycheck-rust ox-odt mustache-mode mustache lua-mode srcery-theme vscdark-theme use-package terraform-mode suscolors-theme smex ruby-hash-syntax rubocopfmt rubocop rspec-mode rg rbenv rainbow-delimiters racer protobuf-mode plantuml-mode ox-gfm org-present org-gcal org-bullets ob-sml ob-go night-owl-theme neotree lsp-ui load-env-vars kubernetes k8s-mode jsonnet-mode intero inkpot-theme inf-ruby indent-tools helm-rg helm-projectile gruvbox-theme go-snippets go-guru go-eldoc flymake-yaml flymake-rust flymake-ruby flymake-go flycheck-golangci-lint exec-path-from-shell erlang enh-ruby-mode emoji-cheat-sheet-plus dracula-theme doom-modeline dockerfile-mode docker-compose-mode docker company-lsp company-go company-emoji company-distel clojure-mode-extra-font-locking cider cargo auto-org-md atom-one-dark-theme ansible-vault ample-zen-theme all-the-icons-dired alchemist ace-window)) + '(tide ob-rust erlang-mode gotest dashboard flycheck-rust ox-odt mustache-mode mustache lua-mode srcery-theme vscdark-theme use-package terraform-mode suscolors-theme smex ruby-hash-syntax rubocopfmt rubocop rspec-mode rg rbenv rainbow-delimiters racer protobuf-mode plantuml-mode ox-gfm org-present org-gcal org-bullets ob-sml ob-go night-owl-theme neotree lsp-ui load-env-vars kubernetes k8s-mode jsonnet-mode intero inkpot-theme inf-ruby indent-tools helm-rg helm-projectile gruvbox-theme go-snippets go-guru go-eldoc flymake-yaml flymake-rust flymake-ruby flymake-go flycheck-golangci-lint exec-path-from-shell erlang enh-ruby-mode emoji-cheat-sheet-plus dracula-theme doom-modeline dockerfile-mode docker-compose-mode docker company-lsp company-go company-emoji company-distel clojure-mode-extra-font-locking cider cargo auto-org-md atom-one-dark-theme ansible-vault ample-zen-theme all-the-icons-dired alchemist ace-window)) '(plantuml-default-exec-mode 'jar) '(plantuml-jar-args '("-charset" "UTF-8" "--illegal-access" "deny")) '(shell-file-name "/usr/local/bin/fish")) diff --git a/ide.org b/ide.org index 65a6b57..0910e1e 100644 --- a/ide.org +++ b/ide.org @@ -257,7 +257,9 @@ only Emacs can save your soul" #+BEGIN_SRC emacs-lisp (use-package flycheck :ensure t - :hook (prog-mode . flycheck-mode)) + :hook ( + (prog-mode . flycheck-mode) + (setq flycheck-check-syntax-automatically '(save mode-enabled)))) (use-package hi-lock :bind (("C-RET h l" . highlight-lines-matching-regexp) diff --git a/init.el b/init.el index df090d2..9925dbe 100644 --- a/init.el +++ b/init.el @@ -54,6 +54,7 @@ (tangle-file "haskell.org") (tangle-file "sml.org") (tangle-file "ruby.org") +(tangle-file "ts.org") (push (expand-file-name "~/.emacs.d/elisp") load-path) (require 'config) diff --git a/ts.org b/ts.org new file mode 100644 index 0000000..f4f3f02 --- /dev/null +++ b/ts.org @@ -0,0 +1,18 @@ +#+TITLE: Typescript IDE +#+AUTHOR: Irfan Shah + +* Tide + +Tide initialization + +#+BEGIN_SRC emacs-lisp +(use-package tide + :ensure t + :after (typescript-mode company flycheck) + :hook ((typescript-mode . tide-setup) + (typescript-mode . tide-hl-identifier-mode) + (before-save . tide-format-before-save) + (tide-start-server-if-required) + (eldoc-mode) + )) +#+END_SRC