Skip to content

Commit

Permalink
Fix js-modes and add autocompletes
Browse files Browse the repository at this point in the history
  • Loading branch information
shevchuk committed Dec 25, 2020
1 parent 1f37285 commit a3ff5ca
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
28 changes: 20 additions & 8 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
:ensure t
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
(typescript-mode . lsp)
(js-mode . lsp)
(php-mode . lsp)
;(python-mode . lsp)
;; if you want which-key integration
Expand Down Expand Up @@ -125,11 +126,20 @@
;gherkin-mode
(use-package emmet-mode :ensure t)
(use-package super-save :ensure t)
(use-package gherkin-mode :ensure t)
;multi-eshell
;vue-mode
(use-package diff-hl :ensure t)
(use-package ws-butler :ensure t)
(use-package expand-region :ensure t)
(use-package flow-js2-mode :ensure t)

(use-package js2-mode
:ensure t
:hook (
(js2-mode . flow-js2-mode)
))

;js2-mode
;flow-js2-mode
;button-lock
Expand Down Expand Up @@ -232,13 +242,12 @@
;(require 'move-text)
;(require 'multi-eshell)
;(require 'orginit)
(require 'ox-confluence)
;;(require 'ox-confluence)
(require 'prog-mode-hooks)
;(require 'projectile-setup)
(require 'projectile-setup)
;(require 'puml)
(require 'swissknife)
(require 'transpose-frame)
(require 'ui-setup)
(require 'editor)

;(require 'web-dev)
Expand All @@ -253,17 +262,20 @@
;; 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-safe-themes
'("4ed20d30a768c1a9032cf63aa8980723c21589c68838cd972f79e7ca2a414b9d" "7ea491e912d419e6d4be9a339876293fff5c8d13f6e84e9f75388063b5f794d6" default))
'(package-selected-packages
(quote
(puml magit-todos ido-completing-read+ helm-flx yasnippet-snippets yasnippet flx-ido ytdl purescript-mode php-mode lsp-python-ms company company-mode company-capf modus-operandi-theme dap-firefox use-package)))
'(plantuml-default-exec-mode (quote jar))
'(flow-js2-mode js2-mode gherkin-mode puml magit-todos ido-completing-read+ helm-flx yasnippet-snippets yasnippet flx-ido ytdl purescript-mode php-mode lsp-python-ms company company-mode company-capf modus-operandi-theme dap-firefox use-package))
'(plantuml-default-exec-mode 'jar)
'(plantuml-jar-path "/home/mico/scripts/puml/plantuml.jar")
'(projectile-globally-ignored-directories
(quote
(".idea" ".vscode" ".ensime_cache" ".eunit" ".git" ".hg" ".fslckout" "_FOSSIL_" ".bzr" "_darcs" ".tox" ".svn" ".stack-work" ".ccls-cache" ".clangd" "ts_build" "node_modules"))))
'(".idea" ".vscode" ".ensime_cache" ".eunit" ".git" ".hg" ".fslckout" "_FOSSIL_" ".bzr" "_darcs" ".tox" ".svn" ".stack-work" ".ccls-cache" ".clangd" "ts_build" "node_modules")))

(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.
)

(require 'ui-setup)
12 changes: 4 additions & 8 deletions lisp/keymap.el
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
;; Move to beginning/ending of line

(defconst ergoemacs-move-beginning-of-line-key (kbd "M-H"))
(defconst ergoemacs-move-end-of-line-key (kbd "M-L"))
(defconst ergoemacs-move-beginning-of-line-key (kbd "M-H"))
(defconst ergoemacs-move-end-of-line-key (kbd "M-L"))

(defconst ergoemacs-isearch-forward-key (kbd "M-;"))
(defconst ergoemacs-isearch-forward-key (kbd "M-;"))
(defconst ergoemacs-isearch-backward-key (kbd "M-:"))

(defun copy-line (arg)
Expand Down Expand Up @@ -35,8 +35,6 @@
(defun js-mode-keys ()
"my keybindings for js2-mode"
(local-set-key (kbd "C-c C-b") 'js-beautify)
(local-set-key (kbd "s-SPC") 'company-tern)
;(local-set-key (kbd "C-c C-j") 'lsp-execute-code-action)
(local-unset-key (kbd "M-j"))
(local-set-key (kbd "<F9>") 'nodejs-repl-send-region)
(local-set-key (kbd "C-q") 'nodejs-repl-send-region))
Expand All @@ -61,7 +59,6 @@
(define-key eshell-cmd-key-map (kbd "r") 'run-test)
(define-key eshell-cmd-key-map (kbd "v") 'run-vpn)
(define-key eshell-cmd-key-map (kbd "t") 'run-vnc)
(define-key eshell-cmd-key-map (kbd "c") 'jiffy-go-to-component)
)

(global-set-key (kbd "<f6>") eshell-cmd-key-map)
Expand All @@ -84,7 +81,6 @@
(setq org-capture-templates
'(("i" "Inbox" entry (file+headline "~/Documents/personal-notes/inbox.org" "Tasks"))))


(add-hook 'org-mode-hook 'org-mode-keys)

(defun org-mode-keys ()
Expand Down Expand Up @@ -186,7 +182,7 @@
("C-k" . kill-whole-line)
("M-a" . mark-whole-buffer)
("<f10>" . icicle-select-frame)
;("M-." . lsp-find-definition)
("M-." . xref-find-definitions)
("M-p" . ace-window))

(provide 'keymap)
2 changes: 1 addition & 1 deletion lisp/projectile-setup.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
list-buffers-directory
default-directory))
ad-do-it))

(setq projectile-completion-system 'helm)
(projectile-global-mode)

(provide 'projectile-setup)
4 changes: 2 additions & 2 deletions lisp/ui-setup.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
(setq transient-mark-mode t)
(tool-bar-mode -1)

;;(load-theme 'modus-operandi)
;(load-theme 'airline-silver)
(load-theme 'modus-operandi)
(load-theme 'airline-silver)
(require 'modeline)

;; to make recent files section work in the dashboard, enabled recentf
Expand Down

0 comments on commit a3ff5ca

Please sign in to comment.