Added YAML and Dockerfile treesitter grammar
This commit is contained in:
@@ -43,8 +43,10 @@
|
|||||||
|
|
||||||
;; Languages
|
;; Languages
|
||||||
'lang/c
|
'lang/c
|
||||||
|
'lang/docker
|
||||||
'lang/golang
|
'lang/golang
|
||||||
'lang/shell
|
'lang/shell
|
||||||
|
'lang/yaml
|
||||||
|
|
||||||
;; Misc
|
;; Misc
|
||||||
'misc/custom-functions
|
'misc/custom-functions
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
;;;; Global / Core
|
;;;; Global / Core
|
||||||
|
|
||||||
(global-set-key (kbd "C-x C-b") #'ibuffer)
|
(global-set-key (kbd "C-x C-b") #'ibuffer)
|
||||||
|
(global-set-key (kbd "C-<return>") 'company-complete)
|
||||||
|
|
||||||
(defvar fscotto/leader-map (make-sparse-keymap)
|
(defvar fscotto/leader-map (make-sparse-keymap)
|
||||||
"Keymap per comandi sotto C-c.")
|
"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\\'"
|
:mode "\\.go\\'"
|
||||||
:hook
|
:hook
|
||||||
((go-ts-mode . lsp-deferred)
|
((go-ts-mode . lsp-deferred)
|
||||||
(go-ts-mode . fscotto/go-format-on-save))
|
(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")))))
|
|
||||||
|
|
||||||
(use-package go-mod-ts-mode
|
(use-package go-mod-ts-mode
|
||||||
:ensure nil
|
: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)
|
(python-mode . python-ts-mode)
|
||||||
(sh-mode . bash-ts-mode)))
|
(sh-mode . bash-ts-mode)))
|
||||||
(setq treesit-language-source-alist
|
(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")
|
(cpp "https://github.com/tree-sitter/tree-sitter-cpp")
|
||||||
(python "https://github.com/tree-sitter/tree-sitter-python")
|
(dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile")
|
||||||
(bash "https://github.com/tree-sitter/tree-sitter-bash")
|
|
||||||
(go "https://github.com/tree-sitter/tree-sitter-go")
|
(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)
|
(provide 'treesitter)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user