Added YAML and Dockerfile treesitter grammar
This commit is contained in:
@@ -43,8 +43,10 @@
|
||||
|
||||
;; Languages
|
||||
'lang/c
|
||||
'lang/docker
|
||||
'lang/golang
|
||||
'lang/shell
|
||||
'lang/yaml
|
||||
|
||||
;; Misc
|
||||
'misc/custom-functions
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
;;;; Global / Core
|
||||
|
||||
(global-set-key (kbd "C-x C-b") #'ibuffer)
|
||||
(global-set-key (kbd "C-<return>") 'company-complete)
|
||||
|
||||
(defvar fscotto/leader-map (make-sparse-keymap)
|
||||
"Keymap per comandi sotto C-c.")
|
||||
|
||||
8
emacs/.emacs.d/lisp/lang/docker.el
Normal file
8
emacs/.emacs.d/lisp/lang/docker.el
Normal file
@@ -0,0 +1,8 @@
|
||||
;;; docker.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package dockerfile-mode
|
||||
:ensure t)
|
||||
|
||||
(provide 'docker)
|
||||
|
||||
;;; docker.el ends here
|
||||
@@ -7,24 +7,7 @@
|
||||
:mode "\\.go\\'"
|
||||
:hook
|
||||
((go-ts-mode . lsp-deferred)
|
||||
(go-ts-mode . fscotto/go-format-on-save))
|
||||
:config
|
||||
;; Go project commands
|
||||
;; Modules
|
||||
(define-key go-ts-mode-map (kbd "C-c m t") #'fscotto/go-mod-tidy)
|
||||
(define-key go-ts-mode-map (kbd "C-c m d") #'fscotto/go-mod-download)
|
||||
;; Test
|
||||
(define-key go-ts-mode-map (kbd "C-c t p") #'fscotto/go-test-package)
|
||||
(define-key go-ts-mode-map (kbd "C-c t a") #'fscotto/go-test-module)
|
||||
(define-key go-ts-mode-map (kbd "C-c t t") #'fscotto/go-test-current-test)
|
||||
;; Debug tests
|
||||
(define-key go-ts-mode-map (kbd "C-c d t") #'dap-debug)
|
||||
(define-key go-ts-mode-map (kbd "C-c d T")
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(dap-debug
|
||||
(dap--debug-configuration
|
||||
"Go :: Debug test at point")))))
|
||||
(go-ts-mode . fscotto/go-format-on-save)))
|
||||
|
||||
(use-package go-mod-ts-mode
|
||||
:ensure nil
|
||||
|
||||
8
emacs/.emacs.d/lisp/lang/yaml.el
Normal file
8
emacs/.emacs.d/lisp/lang/yaml.el
Normal file
@@ -0,0 +1,8 @@
|
||||
;;; yaml.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package yaml-mode
|
||||
:ensure t)
|
||||
|
||||
(provide 'yaml)
|
||||
|
||||
;;; yaml.el ends here
|
||||
@@ -13,12 +13,16 @@
|
||||
(python-mode . python-ts-mode)
|
||||
(sh-mode . bash-ts-mode)))
|
||||
(setq treesit-language-source-alist
|
||||
'((c "https://github.com/tree-sitter/tree-sitter-c")
|
||||
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
|
||||
(c "https://github.com/tree-sitter/tree-sitter-c")
|
||||
(cpp "https://github.com/tree-sitter/tree-sitter-cpp")
|
||||
(python "https://github.com/tree-sitter/tree-sitter-python")
|
||||
(bash "https://github.com/tree-sitter/tree-sitter-bash")
|
||||
(dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile")
|
||||
(go "https://github.com/tree-sitter/tree-sitter-go")
|
||||
(gomod "https://github.com/camdencheek/tree-sitter-go-mod"))))
|
||||
(gomod "https://github.com/camdencheek/tree-sitter-go-mod")
|
||||
(js "https://github.com/tree-sitter/tree-sitter-javascript")
|
||||
(json "https://github.com/tree-sitter/tree-sitter-json")
|
||||
(node "https://github.com/tree-sitter/node-tree-sitter")
|
||||
(python "https://github.com/tree-sitter/tree-sitter-python"))))
|
||||
|
||||
(provide 'treesitter)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user