 (add-to-list 'load-path (expand-file-name "~/dotfiles/emacs/vanilla/libs"))
 
 ;;; Functions
+
+;; lookup symbol under cursor
 (defun ab/help-symbol-lookup()
   "Lookup the symbol under cursor."
   (interactive)
-  (describe-symbol (symbol-at-point)))
+  (if (bound-and-true-p lsp-mode)
+      (lsp-describe-thing-at-point)
+    (describe-symbol (symbol-at-point))))
+
+;; split window right and move to it
 (defun ab/window-split-right ()
   "Split windows right and move to the new split"
   (interactive)
   (split-window-right)
   (windmove-right))
+
+;; split window down and move to it
 (defun ab/window-split-down ()
   "Split windows down and move to the new split"
   (interactive)
   (split-window-below)
   (windmove-down))
-;; tslint fix
-;; not used but leaving it for future references e.g. syntax for shell command
-(defun ab/tslint-fix-file ()
-  "Apply tslint --fix to the current file"
-  (interactive)
-  (message "tslint --fixing the file" (buffer-file-name))
-  (call-process-shell-command (concat "tslint --fix --config " (projectile-project-root) "tslint.json " (buffer-file-name) " &") nil 0))
-;; (revert-buffer t t))
+
 ;;; eshell helper functions
 (defun ab/eshell-insert-mode ()
   "jump to end of buffer i.e. the prompt before switching to insert mode"



;; custom keybindings for window management. same as tmux
(global-set-key (kbd "C-n z") 'doom/window-maximize-buffer)
(global-set-key (kbd "C-n h") 'evil-window-left)
(global-set-key (kbd "C-n H") 'evil-window-move-far-left)
(global-set-key (kbd "C-n l") 'evil-window-right)
(global-set-key (kbd "C-n L") 'evil-window-move-far-right)
(global-set-key (kbd "C-n j") 'evil-window-down)
(global-set-key (kbd "C-n J") 'evil-window-move-very-bottom)
(global-set-key (kbd "C-n k") 'evil-window-up)
(global-set-key (kbd "C-n K") 'evil-window-move-very-top)
(global-set-key (kbd "C-n %") 'ab/window-split-right)
(global-set-key (kbd "C-n \"") 'ab/window-split-down)
(global-set-key (kbd "C-n x") 'evil-window-delete)

  :config
  (with-eval-after-load "json-mode"
    (define-key json-mode-map (kbd "C-c C-j") #'counsel-jq)
    (define-key json-mode-map (kbd "C-c C-f") #'json-mode-beautify)))

;;; auto tail log files
(add-to-list 'auto-mode-alist '("\\.log\\'" . auto-revert-mode))
